2 lines
310 KiB
JavaScript
2 lines
310 KiB
JavaScript
var LMV;(()=>{var t={6247:(t,e,r)=>{"use strict";function n(t){return t[t.LMV_APP_NAMESPACE]=t[t.LMV_APP_NAMESPACE]||{}}function i(){const t="undefined"!=typeof window&&null!==window?window:"undefined"!=typeof self&&null!==self?self:r.g;return t.USE_LMV_APP_NAMESPACES?(t.globalProxy||(t.globalProxy=new Proxy({},{get(e,r){let n=t[r];return"function"==typeof n?function(t,e){return new Proxy(e,{get:(t,e)=>t[e],apply:(e,r,n)=>e.call(t||r,...n)})}(t,n):n},set:(e,r,i)=>(Object.prototype.hasOwnProperty.call(t,r)?t[r]!==i&&(t[r]=i):(n(t)[r]=i,Object.defineProperty(t,r,{get:()=>n(t)[r],set:e=>{n(t)[r]=e}})),!0)})),t.globalProxy):t}var s;r.d(e,{mS:()=>i,Xb:()=>f,Gz:()=>u,nr:()=>d,CN:()=>c});const o=i(),a=(o&&o.document,"undefined"!=typeof navigator),u=function(){return!a};function c(){return"undefined"!=typeof window&&("ontouchstart"in window||navigator.maxTouchPoints>0)}a&&navigator.userAgent.match(/Edge|Trident\/7\./),a&&navigator.userAgent.match(/Trident\/7\./);const h=a&&(/ip(ad|hone|od)/.test(navigator.userAgent.toLowerCase())||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/^ip(ad|hone|od)$/.test(null===(s=navigator.platform)||void 0===s?void 0:s.toLowerCase()));const l=a&&-1!==navigator.userAgent.toLowerCase().indexOf("android");function f(){return!!a&&(h||l)}function d(){if(!a)return!1;var t=navigator.userAgent.toLowerCase();return-1!==t.indexOf("safari")&&-1===t.indexOf("chrome")}},3293:(t,e,r)=>{"use strict";r.d(e,{z:()=>l});var n=r(2759),i=new ArrayBuffer(8),s=new Uint8Array(i),o=new Uint16Array(i),a=new Int32Array(i),u=new Uint32Array(i),c=new Float32Array(i),h=new Float64Array(i);function l(t){this.buffer=t,this.offset=0,this.byteLength=t.length}l.prototype.seek=function(t){this.offset=t},l.prototype.getBytes=function(t){var e=new Uint8Array(this.buffer.buffer,this.offset,t);return this.offset+=t,e},l.prototype.getVarints=function(){var t,e=0,r=0;do{e|=(127&(t=this.buffer[this.offset++]))<<r,r+=7}while(128&t);return e},l.prototype.getUint8=function(){return this.buffer[this.offset++]},l.prototype.getUint16=function(){return s[0]=this.buffer[this.offset++],s[1]=this.buffer[this.offset++],o[0]},l.prototype.getInt16=function(){var t=this.getUint16();return t>32767&&(t|=4294901760),t},l.prototype.getInt32=function(){var t=this.buffer,e=s,r=this.offset;return e[0]=t[r],e[1]=t[r+1],e[2]=t[r+2],e[3]=t[r+3],this.offset+=4,a[0]},l.prototype.getUint32=function(){var t=this.buffer,e=s,r=this.offset;return e[0]=t[r],e[1]=t[r+1],e[2]=t[r+2],e[3]=t[r+3],this.offset+=4,u[0]},l.prototype.getFloat32=function(){var t=this.buffer,e=s,r=this.offset;return e[0]=t[r],e[1]=t[r+1],e[2]=t[r+2],e[3]=t[r+3],this.offset+=4,c[0]},l.prototype.getIndicesArray=function(t,e,r){for(var n=this.buffer,i=new Uint8Array(t,e,2*r),s=this.offset,o=0,a=2*r;o<a;o+=2)i[o]=n[s],i[o+1]=n[s+1],s+=4;this.offset=s},l.prototype.getVector3Array=function(t,e,r,n){var i=this.buffer,s=this.offset,o=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);if(3===n&&0===r){var a=12*e;o.set(i.subarray(s,s+a)),this.offset+=a}else{n*=4;for(var u=4*r,c=0;c<e;c++){for(var h=0;h<12;h++)o[u+h]=i[s++];u+=n}this.offset=s}},l.prototype.getVector2Array=function(t,e,r,n){var i=this.buffer,s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),o=this.offset;n*=4;for(var a=4*r,u=0;u<e;u++){for(var c=0;c<8;c++)s[a+c]=i[o++];a+=n}this.offset=o},l.prototype.getVector4=function(t,e){for(var r=this.buffer,n=s,i=this.offset,o=c,a=0;a<4;a++)n[0]=r[i],n[1]=r[i+1],n[2]=r[i+2],n[3]=r[i+3],t[e+a]=o[0],i+=4;this.offset=i},l.prototype.getFloat64=function(){for(var t=this.buffer,e=s,r=this.offset,n=0;n<8;n++)e[n]=t[r+n];return this.offset+=8,h[0]},l.prototype.getString=function(t){var e=(0,n.xH)(this.buffer,this.offset,t);return this.offset+=t,e},l.prototype.reset=function(t){this.buffer=t,this.offset=0,this.byteLength=t.length}},8983:(t,e,r)=>{"use strict";r.d(e,{J:()=>h});var n,i,s,o,a,u=r(3293),c=r(7365);function h(t){var e=this.stream=new u.z(t),r=e.getInt32();this.type=e.getString(r),this.version=e.getInt32(),this.types=null,this.entryOffsets=[];var n=e.offset;e.seek(e.byteLength-8);var i=e.getUint32();this.typesOffset=e.getUint32(),e.seek(this.typesOffset);var s=this.readU32V();this.types=[];for(var o=0;o<s;++o)this.types.push({entryClass:this.readString(),entryType:this.readString(),version:this.readU32V()});e.seek(i);var a=this.readU32V(),c=this.entryOffsets;for(let t=0;t<a;++t)c.push(e.getUint32());e.seek(n)}h.prototype.readVarint=function(){var t,e=0,r=0;do{e|=(127&(t=this.stream.getUint8()))<<r,r+=7}while(128&t);return e},h.prototype.readU32V=h.prototype.readVarint,h.prototype.readU16=function(){return this.stream.getUint16()},h.prototype.readU8=function(){return this.stream.getUint8()},h.prototype.readString=function(){return this.stream.getString(this.readU32V())},h.prototype.readVector3f=function(){var t=this.stream;return{x:t.getFloat32(),y:t.getFloat32(),z:t.getFloat32()}},h.prototype.readF32=function(){return this.stream.getFloat32()},h.prototype.readF64=function(){return this.stream.getFloat64()},h.prototype.readVector3d=(n={x:0,y:0,z:0},function(){var t=this.stream;return n.x=t.getFloat64(),n.y=t.getFloat64(),n.z=t.getFloat64(),n}),h.prototype.readQuaternionf=(i={x:0,y:0,z:0,w:0},function(){var t=this.stream;return i.x=t.getFloat32(),i.y=t.getFloat32(),i.z=t.getFloat32(),i.w=t.getFloat32(),i}),h.prototype.readMatrix3f=(s=new c.T,function(t){t||(t=s);var e=this.stream;t.identity();for(var r=0;r<3;++r)for(var n=0;n<3;++n)t.elements[4*r+n]=e.getFloat32();return t}),h.prototype.readTransform=(o={x:1,y:1,z:1},a=new c.T(!0),function(t,e,r,n,i,s){var u,h,l=this.stream;switch(l.getUint8()){case 4:a.identity();break;case 0:u=this.readVector3d(),a.makeTranslation(u.x,u.y,u.z);break;case 1:h=this.readQuaternionf(),u=this.readVector3d(),o.x=1,o.y=1,o.z=1,a.compose(u,h,o);break;case 2:var f=l.getFloat32();h=this.readQuaternionf(),u=this.readVector3d(),o.x=f,o.y=f,o.z=f,a.compose(u,h,o);break;case 3:this.readMatrix3f(a),u=this.readVector3d(),a.setPosition(u)}if(s&&(s[0]=a.elements[12],s[1]=a.elements[13],s[2]=a.elements[14]),n&&a.multiplyMatrices(n,a),i&&(a.elements[12]-=i.x,a.elements[13]-=i.y,a.elements[14]-=i.z),void 0===t)return(new c.T).copy(a);var d=a.elements;e&&(e[r+0]=d[0],e[r+1]=d[1],e[r+2]=d[2],e[r+3]=d[4],e[r+4]=d[5],e[r+5]=d[6],e[r+6]=d[8],e[r+7]=d[9],e[r+8]=d[10],e[r+9]=d[12],e[r+10]=d[13],e[r+11]=d[14])}),h.prototype.getEntryCounts=function(){return this.entryOffsets.length},h.prototype.seekToEntry=function(t){if(t>=this.getEntryCounts())return null;this.stream.seek(this.entryOffsets[t]);var e=this.stream.getUint32();return e>=this.types.length?null:this.types[e]},h.prototype.readPathID=function(){let t,e=this.stream;if(this.version<2){let r=e.getUint16();if(!r)return null;if(e.getUint16(),1==r)return"";t=e.getUint16();for(let n=2;n<r;++n)t+="/"+e.getUint16()}else{let e=this.readU32V();if(!e)return null;if(this.readU32V(),1==e)return"";t=this.readU32V();for(let r=2;r<e;++r)t+="/"+this.readU32V()}return t}},2759:(t,e,r)=>{"use strict";function n(t,e,r){var n,i,s,o,a,u;for(n="",s=r,i=0;i<s;)switch((o=t[e+i++])>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n+=String.fromCharCode(o);break;case 12:case 13:a=t[e+i++],n+=String.fromCharCode((31&o)<<6|63&a);break;case 14:a=t[e+i++],u=t[e+i++],n+=String.fromCharCode((15&o)<<12|(63&a)<<6|63&u)}return n}function i(t,e,r){var n,i,s,o=r||0;if(i=t.length,e)for(n=0;n<i;n++)(s=t.charCodeAt(n))>=1&&s<=127?e[o++]=s:s>2047?(e[o++]=224|s>>12&15,e[o++]=128|s>>6&63,e[o++]=128|63&s):(e[o++]=192|s>>6&31,e[o++]=128|63&s);else for(n=0;n<i;n++)(s=t.charCodeAt(n))>=1&&s<=127?o++:o+=s>2047?3:2;return o-(r||0)}r.d(e,{$d:()=>c,GB:()=>l,Pd:()=>f,TN:()=>u,WC:()=>i,_f:()=>h,jI:()=>n,xH:()=>a});var s=!0,o=1048576;function a(t,e,r){if(void 0===e&&(e=0),void 0===r&&(r=t.length),s)return r>o?function(t,e,r){var n,i,s,o,a,u,c,h;for(n="",a=[],s=r,u=0,i=0;i<s;){switch((o=t[e+i++])>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:a.push(String.fromCharCode(o));break;case 12:case 13:c=t[e+i++],a.push(String.fromCharCode((31&o)<<6|63&c));break;case 14:c=t[e+i++],h=t[e+i++],a.push(String.fromCharCode((15&o)<<12|(63&c)<<6|63&h))}(++u>=32768||i>=s)&&(n+=a.join(""),a.length=0,u=0)}return n}(t,e,r):n(t,e,r);for(var i="",a=e,u=e+r;a<u;a++)i+=String.fromCharCode(t[a]);return decodeURIComponent(escape(i))}function u(t){var e=a(t,0,t.length);return e=e.replace(/\u000e/gi,""),JSON.parse(e)}function c(t,e){if(void 0===e)return"";for(var r=e;r<t.length-1;){var n=t[r];if(44==n&&(10==t[r+1]||13==t[r+1]))break;if(10==n||13==n)break;r++}var i=a(t,e,r-e);try{return JSON.parse(i)}catch(t){return console.error("Error parsing property blob to JSON : "+i),i}}function h(t,e){var r=0,n=e;for(34==t[n]&&n++;n<t.length-1;){var i=t[n];if(44==i&&(10==t[n+1]||13==t[n+1]))break;if(10==i||13==i||34==i)break;i>=48&&i<=57&&(r=10*r+(i-48)),n++}return r}function l(t,e){for(var r=0,n=0,i=t.length;n<i;n++)44==t[n]&&r++;r++;var s=new Uint32Array(r+(e?1:0));n=0;for(var o=t.length;91!=t[n]&&n<o;)n++;if(n==t.length)return null;n++;var a=!1;r=0;for(var u=0;n<o;){var c=t[n];c>=48&&c<=57?(u=10*u+(c-48),a=!0):44==c||93==c?a&&(s[r++]=u,a=!1,u=0):(a=!1,u=0),n++}return s}function f(t){for(var e=0,r=t.length-1,n=0;n<r;n++)44!=t[n]||10!=t[n+1]&&13!=t[n+1]||e++;if(!e)return null;e++;var i=new Uint32Array(e);for(n=0,e=0;91!=t[n]&&n<r;)n++;n++,i[e++]=n;for(var s=!1;n<r;)10==t[n]||13==t[n]?s=!0:s&&(s=!1,i[e++]=n),n++;return i}},2816:(t,e,r)=>{"use strict";r.d(e,{s:()=>n});const n={deduceUVRepetition:function(t){for(var e in t.vblayout)if(0==e.indexOf("uv")&&0!=e.indexOf("uvw"))for(var r=t.vblayout[e].offset,n=t.vbstride,i=t.vb,s=t.vb.length/n,o=0,a=r;o<s;o++,a+=n){var u=i[a],c=i[a+1];if(u>2||u<0||c>2||c<0){t.vblayout[e].isPattern=!0;break}}},computeBounds3D:function(t){var e,r,n,i,s,o=1/0,a=1/0,u=1/0,c=-1/0,h=-1/0,l=-1/0,f=t.vbstride,d=t.vblayout.position.offset,p=t.vb,m=t.vb.length/f;for(e=0,r=d;e<m;e++,r+=f)o>(n=p[r])&&(o=n),a>(i=p[r+1])&&(a=i),u>(s=p[r+2])&&(u=s),c<n&&(c=n),h<i&&(h=i),l<s&&(l=s);t.boundingBox={min:{x:o,y:a,z:u},max:{x:c,y:h,z:l}};var g=.5*(o+c),v=.5*(a+h),y=.5*(u+l),b=t.boundingSphere={};b.center={x:g,y:v,z:y};var x=0;for(e=0,r=d;e<m;e++,r+=f){var w=(n=p[r])-g,_=(i=p[r+1])-v,I=(s=p[r+2])-y,A=w*w+_*_+I*I;A>x&&(x=A)}b.radius=Math.sqrt(x)},bboxUnion:function(t,e){e.min.x<t.min.x&&(t.min.x=e.min.x),e.min.y<t.min.y&&(t.min.y=e.min.y),e.min.z<t.min.z&&(t.min.z=e.min.z),e.max.x>t.max.x&&(t.max.x=e.max.x),e.max.y>t.max.y&&(t.max.y=e.max.y),e.max.z>t.max.z&&(t.max.z=e.max.z)}}},8661:(t,e,r)=>{"use strict";r.d(e,{nW:()=>b,d$:()=>g,xL:()=>v,uq:()=>y});var n=2*Math.PI,i=[0,1,3,0,3,2];function s(t,e,r,n){var i=e||65536;this.FULL_COUNT=0|(r||32767),this.useInstancing=t,this.useCompactBuffers=n,this.stride=10,this.allocVcount=4*(this.useInstancing?i/4:i),this.vb=new ArrayBuffer(this.stride*this.allocVcount),this.vbf=new Float32Array(this.vb),this.vbi=new Int32Array(this.vb),this.ib=this.useInstancing?null:new Uint16Array(i),this.minLineWidth=Number.MAX_VALUE,this.reset(0)}s.FORCE_BUTT_CAPS_FOR_TESTING=!1,s.prototype.reset=function(t){this.vcount=t,this.icount=0,this.minx=this.miny=1/0,this.maxx=this.maxy=-1/0,this.dbIds={},this.lastDbId=null,this.colors={},this.numEllipticals=0,this.numCirculars=0,this.numTriangleGeoms=0,this.numMiterLines=0,this.hasLineStyles=!1,this.changeTracking={},this.stride=10},s.prototype.expandStride=function(){var t=this.stride;if(!(t>=12)){for(var e=this.stride+2,r=new ArrayBuffer(e*this.allocVcount),n=new Uint8Array(this.vb),i=new Uint8Array(r),s=0,o=this.vcount;s<o;s++)for(var a=s*t*4,u=s*e*4,c=0;c<4*t;c++)i[u+c]=n[a+c];this.vb=r,this.vbf=new Float32Array(r),this.vbi=new Int32Array(r),this.stride=e}},s.prototype.addToBounds=function(t,e){t<this.minx&&(this.minx=t),t>this.maxx&&(this.maxx=t),e<this.miny&&(this.miny=e),e>this.maxy&&(this.maxy=e)},s.prototype.addToBoundsWithLineWidth=function(t,e,r,n,i){if(i<0)return this.addToBounds(t,e),void this.addToBounds(r,n);const s=[Math.min(t,r)-.5*i,Math.max(t,r)+.5*i],o=[Math.min(e,n)-.5*i,Math.max(e,n)+.5*i];this.addToBounds(s[0],o[0]),this.addToBounds(s[1],o[1])};var o=new Int32Array(1);function a(t){return o[0]=t,o[0]}s.prototype.trackChanges=function(t,e,r,n,i,s){if(r!==this.lastDbId&&(this.dbIds[a(r)]=1,this.lastDbId=r),s&&(this.hasLineStyles=!0),this.useCompactBuffers){var o=this.changeTracking;u("geomType",t),u("color",e),u("dbId",r),u("layerId",n),u("viewportId",i),u("linePattern",s),this.colors[a(e)]=1}function u(e,r){void 0===o[e]?o[e]=t:o[e]===r&&(o[e+"Varies"]=!0)}},s.prototype.setCommonVertexAttribs=function(t,e,r,n,i,s,o,a){this.trackChanges(r,n,i,s,o,a),e&=255,r&=255,a&=255,s&=65535,o&=65535,this.vbi[t+8]=e|r<<8|a<<16,this.vbi[t+6]=n,this.vbi[t+7]=i,this.vbi[t+9]=s|o<<16},s.prototype.addVertexTriangleGeom=function(t,e,r,n,i,s,o,a,u,c){for(var h=this.vcount,l=this.vbf,f=this.useInstancing?1:4,d=0;d<f;d++){var p=(h+d)*this.stride;l[p]=t,l[p+1]=e,l[p+2]=r,l[p+3]=n,l[p+4]=i,l[p+5]=s,this.setCommonVertexAttribs(p,0+d,5,o,a,u,c,0),this.vcount++}return h},s.prototype.addVertexLine=function(t,e,r,i,o,a,u,c,h,l,f,d,p){var m=this.vcount,g=this.vbf;c>=0&&a>0&&i>0&&(this.minLineWidth=Math.min(this.minLineWidth,a)),s.FORCE_BUTT_CAPS_FOR_TESTING&&(d=!0,p=!0);var v=1;d&&p?v=8:d?v=9:p&&(v=10);for(var y=this.useInstancing?1:4,b=0;b<y;b++){var x=(m+b)*this.stride;g[x]=t,g[x+1]=e,g[x+2]=(r+Math.PI)/n,g[x+3]=i,g[x+4]=.5*a,g[x+5]=o,this.setCommonVertexAttribs(x,0+b,v,u,c,h,l,f),this.vcount++}return m},s.prototype.addVertexMiterLine=function(t,e,r,i,s,o,a,u,c,h,l,f,d){var p=this.vcount,m=this.vbf;h>=0&&u>0&&(this.minLineWidth=Math.min(this.minLineWidth,u));for(var g=this.useInstancing?1:4,v=0;v<g;v++){var y=(p+v)*this.stride;m[y]=t,m[y+1]=e,m[y+2]=(r+Math.PI)/n,m[y+3]=o,m[y+4]=.5*u,m[y+5]=(i+Math.PI)/n,m[y+10]=(s+Math.PI)/n,m[y+11]=a,this.setCommonVertexAttribs(y,0+v,11,c,h,l,f,d),this.vcount++}return p},s.prototype.addVertexTexQuad=function(t,e,r,i,s,o,a,u,c){for(var h=this.vcount,l=this.vbf,f=this.useInstancing?1:4,d=0;d<f;d++){var p=(h+d)*this.stride;l[p]=t,l[p+1]=e,l[p+2]=s/n,l[p+3]=r,l[p+4]=i,this.setCommonVertexAttribs(p,0+d,4,o,a,u,c,0),this.vcount++}return h},s.prototype.addVertexArc=function(t,e,r,i,s,o,a,u,c,h,l,f){for(var d=this.vcount,p=this.vbf,m=s==o?2:3,g=this.useInstancing?1:4,v=0;v<g;v++){var y=(d+v)*this.stride;p[y]=t,p[y+1]=e,p[y+2]=r/n,p[y+3]=i/n,p[y+4]=.5*u,p[y+5]=s,3===m&&(p[y+10]=o,p[y+11]=a),this.setCommonVertexAttribs(y,0+v,m,c,h,l,f,0),this.vcount++}return d},s.prototype.addVertex=function(t,e,r,n,i,s){let o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;if(!this.useInstancing){var a=this.vcount,u=this.stride*a,c=this.vbf;return c[u]=t,c[u+1]=e,this.setCommonVertexAttribs(u,0,o,r,n,i,s,0),this.vcount++,a}},s.prototype.addVertexPolytriangle=function(t,e,r,n,i,s){this.useInstancing||(this.addVertex(t,e,r,n,i,s),this.addToBounds(t,e))},s.prototype.addVertexMSDFPolytriangle=function(t,e,r,n,i,s,o,a){this.addVertexTexPolytriangle(t,e,r,n,i,s,o,a,6)},s.prototype.addIndices=function(t,e){if(!this.useInstancing){var r=this.ib,n=this.icount;if(n+t.length>=r.length){var i=new Uint16Array(2*Math.max(t.length,r.length));for(let t=0;t<n;++t)i[t]=r[t];this.ib=r=i}for(let i=0;i<t.length;++i)r[n+i]=e+t[i];this.icount+=t.length}},s.prototype.finalizeQuad=function(t){this.useInstancing||this.addIndices(i,t)},s.prototype.addSegment=function(t,e,r,n,i,s,o,a,u,c,h,l,f){var d=r-t,p=n-e,m=d||p?Math.atan2(p,d):0,g=d||p?Math.sqrt(d*d+p*p):0,v=this.addVertexLine(t,e,m,g,i,s,o,a,u,c,h,l,f);this.finalizeQuad(v),this.addToBoundsWithLineWidth(t,e,r,n,s)},s.prototype.addMiterSegment=function(t,e,r,n,i,s,o,a,u,c,h,l,f,d,p,m,g){if(this.useCompactBuffers)this.addSegment(r,n,i,s,u,c,h,l,f,d,p,m,g);else{this.numMiterLines++,this.expandStride();var v=i-r,y=s-n,b=v||y?Math.atan2(y,v):0,x=v||y?Math.sqrt(v*v+y*y):0,w=r-t,_=n-e,I=w||_?Math.atan2(_,w):b,A=w||_?Math.sqrt(w*w+_*_):1,O=o-i,S=a-s,P=O||S?Math.atan2(S,O):b,k=O||S?Math.sqrt(O*O+S*S):1,C=Math.floor(1023*Math.min(64,A)),T=65536*Math.floor(1023*Math.min(64,k))+C,M=this.addVertexMiterLine(r,n,b,I,P,x,T,c,h,l,f,d,p);this.finalizeQuad(M),this.addToBoundsWithLineWidth(r,n,i,s,c)}},s.prototype.addTriangleGeom=function(t,e,r,n,i,s,o,a,u,c){this.numTriangleGeoms++;var h=this.addVertexTriangleGeom(t,e,r,n,i,s,o,a,u,c);this.finalizeQuad(h),this.addToBounds(t,e),this.addToBounds(r,n),this.addToBounds(i,s)},s.prototype.addArc=function(t,e,r,i,s,o,a,c,h,l,f,d){s==o?this.numCirculars++:(this.numEllipticals++,this.expandStride());var p=u(r,i);r=p.start,i=p.end,0==r&&0==i&&(i=n);{var m=Math.abs(r-i);if(m>1e-4&&Math.abs(m-n)>1e-4){var g=t+s*Math.cos(r),v=e+o*Math.sin(r);this.addSegment(g,v,g,v,0,c,h,l,f,d);var y=t+s*Math.cos(i),b=e+o*Math.sin(i);this.addSegment(y,b,y,b,0,c,h,l,f,d)}else this.addToBoundsWithLineWidth(t-s,e-o,t+s,e+o,c);const a=33554431;var x=this.addVertexLine(t,e,0,1e-4,0,0,a,l,f,d);this.finalizeQuad(x)}var w=this.addVertexArc(t,e,r,i,s,o,a,c,h,l,f,d);this.finalizeQuad(w)},s.prototype.addTexturedQuad=function(t,e,r,n,i,s,o,a,u){var c=this.addVertexTexQuad(t,e,r,n,i,s,o,a,u);this.finalizeQuad(c);var h=.5*Math.cos(i),l=.5*Math.sin(i),f=Math.abs(r*h)+Math.abs(n*l),d=Math.abs(r*l)+Math.abs(n*h);this.addToBounds(t-f,e-d),this.addToBounds(t+f,e+d)},s.prototype.addVertexImagePolytriangle=function(t,e,r,n,i,s,o,a){return this.addVertexTexPolytriangle(t,e,r,n,i,s,o,a,7)},s.prototype.addVertexTexPolytriangle=function(t,e,r,n,i,s,o,a,u){if(this.useInstancing)return;let c=this.vcount,h=this.vbf;this.addVertex(t,e,i,s,o,a,u),h[c*this.stride+2]=r,h[c*this.stride+3]=n,this.addToBounds(t,e)},s.prototype.isFull=function(t){t=t||3;var e=this.useInstancing?4:1;return this.vcount*e+t>this.FULL_COUNT},s.prototype.makeCompactVertexLayout=function(){var t=Object.keys(this.colors),e=Object.keys(this.dbIds);if(10!==this.stride)return null;var r=t.length+e.length;if(t.length+e.length>65536)return null;var n=new Int32Array(r+1);n[0]=0;var i=1;for(let e=0;e<t.length;e++,i++)n[i]=parseInt(t[e]),this.colors[t[e]]=i;for(let t=0;t<e.length;t++,i++)n[i]=parseInt(e[t]),this.dbIds[e[t]]=i;var s=new ArrayBuffer(24*this.vcount),o=new Int32Array(s),a=new Uint16Array(s),u=this.maxx-this.minx||1,c=this.maxy-this.miny||1,h=this.minx,l=this.miny,f=Math.max(u,c);function d(t){return 0|Math.round((t-h)/u*65535)}function p(t){return 0|Math.round((t-l)/c*65535)}function m(t){return 0|Math.round(t/f*65535)}function g(t){return 0|65535*t}function v(t){return t<0?32768+32767*Math.min(1,-t/1024):t?0|Math.round(t/f*32767)||1:t}for(var y=0;y<this.vcount;y++){var b=this.stride*y,x=6*y,w=2*x;switch(this.vbi[b+8]>>8&255){case 0:a[w]=d(this.vbf[b]),a[w+1]=p(this.vbf[b+1]);break;case 1:case 8:case 9:case 10:a[w]=d(this.vbf[b]),a[w+1]=p(this.vbf[b+1]),a[w+2]=g(this.vbf[b+2]),a[w+3]=m(this.vbf[b+3]),a[w+4]=v(this.vbf[b+4]);break;case 2:a[w]=d(this.vbf[b]),a[w+1]=p(this.vbf[b+1]),a[w+2]=g(this.vbf[b+2]),a[w+3]=g(this.vbf[b+3]),a[w+4]=v(this.vbf[b+4]),a[w+5]=m(this.vbf[b+5]);break;case 3:case 11:break;case 4:a[w]=d(this.vbf[b]),a[w+1]=p(this.vbf[b+1]),a[w+2]=g(this.vbf[b+2]),a[w+3]=m(this.vbf[b+3]),a[w+4]=m(this.vbf[b+4]);break;case 5:a[w]=d(this.vbf[b]),a[w+1]=p(this.vbf[b+1]),a[w+2]=d(this.vbf[b+2]),a[w+3]=p(this.vbf[b+3]),a[w+4]=d(this.vbf[b+4]),a[w+5]=p(this.vbf[b+5]);break;default:console.error("Unknown geometry type")}a[w+6]=this.colors[this.vbi[b+6]]||0,a[w+7]=this.dbIds[this.vbi[b+7]]||0,o[x+4]=this.vbi[b+8],o[x+5]=this.vbi[b+9]}var _={};_.vb=new Float32Array(s),_.vbstride=6;var I=this.useInstancing?1:0;return _.vblayout={fields1:{offset:0,itemSize:2,bytesPerItem:2,divisor:I,normalized:!0},fields2:{offset:1,itemSize:4,bytesPerItem:2,divisor:I,normalized:!0},uvIdColor:{offset:3,itemSize:2,bytesPerItem:2,divisor:I,normalized:!1},flags4b:{offset:4,itemSize:4,bytesPerItem:1,divisor:I,normalized:!1},layerVp4b:{offset:5,itemSize:4,bytesPerItem:1,divisor:I,normalized:!1}},_.unpackXform={x:u,y:c,z:h,w:l},_.texData=n,_},s.prototype.makeWideVertexLayout=function(){var t={};t.vb=new Float32Array(this.vb.slice(0,this.vcount*this.stride*4)),t.vbstride=this.stride;var e=this.useInstancing?1:0;return t.vblayout={fields1:{offset:0,itemSize:2,bytesPerItem:4,divisor:e,normalized:!1},fields2:{offset:2,itemSize:4,bytesPerItem:4,divisor:e,normalized:!1},color4b:{offset:6,itemSize:4,bytesPerItem:1,divisor:e,normalized:!0},dbId4b:{offset:7,itemSize:4,bytesPerItem:1,divisor:e,normalized:!1},flags4b:{offset:8,itemSize:4,bytesPerItem:1,divisor:e,normalized:!1},layerVp4b:{offset:9,itemSize:4,bytesPerItem:1,divisor:e,normalized:!1}},t.vblayout.extraParams={offset:this.stride-2,itemSize:2,bytesPerItem:4,divisor:e,normalized:!1},t},s.prototype.toMesh=function(){var t=null;if(this.useCompactBuffers&&(t=this.makeCompactVertexLayout()),t||(t=this.makeWideVertexLayout()),this.useInstancing){t.numInstances=this.vcount;var e=new Int32Array([0,1,2,3]);t.vblayout.instFlags4b={offset:0,itemSize:4,bytesPerItem:1,divisor:0,normalized:!1},t.vblayout.instFlags4b.array=e.buffer,t.indices=new Uint16Array(i)}else t.indices=new Uint16Array(this.ib.buffer.slice(0,2*this.icount));t.dbIds=this.dbIds;var r=this.maxx-this.minx,n=this.maxy-this.miny,s=Math.max(r,n);return t.boundingBox={min:{x:this.minx,y:this.miny,z:.001*-s},max:{x:this.maxx,y:this.maxy,z:.001*s}},t.boundingSphere={center:{x:.5*(this.minx+this.maxx),y:.5*(this.miny+this.maxy),z:0},radius:.5*Math.sqrt(r*r+n*n)},t};var u=function(t,e){function r(){function r(t,e){return Math.abs(t-e)<.001}r(t,0)&&(t=0),r(e,0)&&(e=0),r(t,n)&&(t=n),r(e,n)&&(e=n)}if(r(),t>e)for(;t>n;)t-=n,e-=n;else for(;e>n;)t-=n,e-=n;return r(),t<0&&e>0&&(t+=n),{start:t,end:e}},c=r(1706),h=r(6118),l=r(2816),f=r(3293),d=r(6916),p=r(7480),m=16383,g={dt_object:0,dt_void:1,dt_byte:2,dt_int:3,dt_float:4,dt_double:5,dt_varint:6,dt_point_varint:7,dt_byte_array:32,dt_int_array:33,dt_float_array:34,dt_double_array:35,dt_varint_array:36,dt_point_varint_array:37,dt_arc:38,dt_circle:39,dt_circular_arc:40,dt_string:63,dt_last_data_type:127},v={st_object_member:0,st_fill:1,st_fill_off:2,st_clip_off:3,st_layer:4,st_link:5,st_line_weight:6,st_miter_angle:7,st_miter_length:8,st_line_pattern_ref:9,st_back_color:10,st_color:11,st_markup:12,st_object_id:13,st_markup_id:14,st_reset_rel_offset:15,st_font_ref:16,st_begin_object:32,st_clip:33,st_line_caps:34,st_line_join:35,st_line_pattern_def:36,st_font_def:37,st_viewport:38,st_sheet:42,st_arc:43,st_polyline:44,st_raster:45,st_text:46,st_polytriangle:47,st_dot:48,st_end_object:63,st_last_semantic_type:127};function y(t){return 1&t?-(t>>>1):t>>>1}function b(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(this.metadata=t,this.scaleX=1,this.scaleY=1,this.bbox={min:{x:0,y:0,z:0},max:{x:0,y:0,z:0}},this.is2d=!0,this.layersMap={},this.fontDefs={},this.fontCount=0,this.fontId=0,this.manifestAvailable=!1,this.geomMetricsSum=0,this.objectMemberQueue=[],this.propertydb={attrs:[],avs:[],ids:[],values:[],offsets:[],viewables:[]},t){var i=t.page_dimensions;this.paperWidth=i.page_width,this.paperHeight=i.page_height,this.scaleX=this.paperWidth/i.plot_width,this.scaleY=this.paperHeight/i.plot_height,this.hidePaper=i.hide_paper;var o=this.paperWidth,a=this.paperHeight;this.bbox.max.x=o,this.bbox.max.y=a;var u=t.page_dimensions||{};if(isFinite(u.paper_rotation)&&0!==u.paper_rotation){var h=u.paper_rotation*Math.PI/180,l=Math.cos(h),f=Math.sin(h),d=o*l,p=o*f,g=-a*f,v=a*l;this.bbox.min.x=Math.min(0,d,g,d+g),this.bbox.max.x=Math.max(0,d,g,d+g),this.bbox.min.y=Math.min(0,p,v,p+v),this.bbox.max.y=Math.max(0,p,v,p+v)}isFinite(u.paper_offset_x)&&0!==u.paper_offset_x&&(this.bbox.min.x+=u.paper_offset_x,this.bbox.max.x+=u.paper_offset_x),isFinite(u.paper_offset_y)&&0!==u.paper_offset_y&&(this.bbox.min.y+=u.paper_offset_y,this.bbox.max.y+=u.paper_offset_y);var y=0;for(var b in this.layersMap[0]=y++,t.layers){var x=parseInt(b);this.layersMap[x]=y++}if(this.layerCount=y,this.createLayerGroups(t.layers),t.geom_metrics){var w=Object.keys(t.geom_metrics).map((function(e){return t.geom_metrics[e]}));this.geomMetricsSum=w.reduce(((t,e)=>t+e))}}this.hidePaper=this.hidePaper||n.modelSpace,this.noShadow=!!n.noShadow,this.hasPageShadow=!1,this.opCount=0,this.excludeTextGeometry=n.excludeTextGeometry,this.extendStringsFetching=n.extendStringsFetching,this.fontFaces=[],this.fontFamilies=[],this.viewports=[{}],this.currentVpId=0,this.viewports[0].geom_metrics=this.currentGeomMetrics={arcs:0,circles:0,circ_arcs:0,viewports:0,clips:0,colors:0,db_ids:0,dots:0,fills:0,layers:0,line_caps:0,line_joins:0,line_patterns:0,line_pat_refs:0,plines:0,pline_points:0,line_weights:0,links:0,miters:0,ptris:0,ptri_indices:0,ptri_points:0,rasters:0,texts:0,strings:[]},this.clips=[0],this.strings=[],this.stringDbIds=[],this.stringBoxes=[],this.extendStringsFetching&&(this.stringCharWidths=[],this.stringAngles=[],this.stringPositions=[],this.stringHeights=[]),this.currentStringNumber=-1,this.currentStringBox=new c.K,this.linkBoxes=[],this.currentLinkBox=new c.K,this.objectNumber=0,this.currentFakeId=-2,this.imageNumber=0,this.linkNumber=0,this.maxObjectNumber=0,this.objectStack=[],this.objectNameStack=[],this.parseObjState={polyTriangle:{},viewport:{},clip:{},raster:{},text:{},fontDef:{},uknown:{}},this.layer=0,this.bgColor="number"==typeof n.bgColor?n.bgColor:4294967295,this.contrastColor=this.color=this.fillColor=4278190080,this.hidePaper&&(this.contrastColor=4294967040),this.isMobile=n&&!!n.isMobile;var _=this.isMobile,I=this.isMobile;if(this.max_vcount=this.isMobile?m:void 0,this.currentVbb=new s(_,void 0,this.max_vcount,I),this.meshes=[],this.numCircles=this.numEllipses=this.numPolylines=this.numLineSegs=0,this.numPolytriangles=this.numTriangles=0,this.error=!1,this.offsetX=0,this.offsetY=0,e){this.manifestAvailable=!0,this.imageId2URI={};for(var A=e.assets,O=0,S=A.length;O<S;++O){var P=A[O];if(-1!==P.mime.indexOf("image/")){var k=P.id;k=k.substr(0,k.indexOf(".")),this.imageId2URI[k]=r+P.URI}"Autodesk.CloudPlatform.PropertyAttributes"===P.type&&this.propertydb.attrs.push({path:P.URI}),"Autodesk.CloudPlatform.PropertyValues"===P.type&&this.propertydb.values.push({path:P.URI}),"Autodesk.CloudPlatform.PropertyIDs"===P.type&&this.propertydb.ids.push({path:P.URI}),"Autodesk.CloudPlatform.PropertyViewables"===P.type&&this.propertydb.viewables.push({path:P.URI}),"Autodesk.CloudPlatform.PropertyOffsets"===P.type&&-1===P.id.indexOf("rcv")&&this.propertydb.offsets.push({path:P.URI}),"Autodesk.CloudPlatform.PropertyAVs"===P.type&&this.propertydb.avs.push({path:P.URI})}}}b.prototype.load=function(t,e){if(e instanceof Uint8Array||(e=new Uint8Array(e)),this.data=e,this.parse(),this.stringBoxes.length){var r=new Float32Array(this.stringBoxes.length);r.set(this.stringBoxes),this.stringBoxes=r}t.loadDoneCB(!0)},b.prototype.loadFrames=function(t){this.loadContext=t;var e=t.data;if(e)e instanceof Uint8Array||(e=new Uint8Array(e)),this.data=e;else if(t.finalFrame&&(this.data=null,this.stringBoxes.length)){var r=new Float32Array(this.stringBoxes.length);r.set(this.stringBoxes),this.stringBoxes=r}this.parseFrames(t.finalFrame),t.loadDoneCB(!0)},b.prototype.pushMesh=function(t){this.meshes.push(t),t.material={skipEllipticals:!this.currentVbb.numEllipticals,skipCircles:!this.currentVbb.numCirculars,skipTriangleGeoms:!this.currentVbb.numTriangleGeoms,skipMiterLines:!this.currentVbb.numMiterLines,useInstancing:this.currentVbb.useInstancing,unpackPositions:!!t.unpackXform},this.currentImage&&(t.material.image=this.currentImage,t.material.image.name=this.imageNumber++,this.currentImage=null)},b.prototype.flushBuffer=function(t,e){if(this.currentVbb.vcount||e){if(e||this.currentVbb.isFull(t)){if(this.currentVbb.vcount){var r=this.currentVbb.toMesh();l.s.bboxUnion(this.bbox,r.boundingBox),this.pushMesh(r),this.currentVbb.reset(0)}this.loadContext&&this.loadContext.loadDoneCB(!0,e)}}},b.prototype.tx=function(t){return this.sx(t)},b.prototype.ty=function(t){return this.sy(t)},b.prototype.sx=function(t){return t*this.scaleX},b.prototype.sy=function(t){return t*this.scaleY},b.prototype.invertColor=function(t){var e=t>>16&255,r=t>>8&255,n=255&t;return(t>>24&255)<<24|(e=255-e)<<16|(r=255-r)<<8|255-n},b.prototype.mapColor=function(t,e){if(!this.hidePaper||0!==this.bgColor)return t;var r=255&t;return r<127||r===(65280&t)>>8&&r===(16711680&t)>>16&&e&&(t&=1442840575),t},b.prototype.parsePointPositions=function(){var t=this.stream.getVarints(),e=this.stream.getVarints();return t=y(t),e=y(e),t+=this.offsetX,e+=this.offsetY,this.offsetX=t,this.offsetY=e,[this.tx(t),this.ty(e)]},b.prototype.parserAssert=function(t,e,r){return t!=e&&(d.vF.warn("Expect "+e+"; actual type is "+t+"; in function "+r),this.error=!0,!0)},b.prototype.unhandledTypeWarning=function(t,e){d.vF.warn("Unhandled semantic type : "+e+" in function "+t)},b.prototype.parseObject=function(){var t=this.stream.getVarints();switch(this.objectStack.push(t),t){case v.st_sheet:this.objectNameStack.push("sheet"),this.objectMemberQueue.unshift("paperColor");break;case v.st_viewport:this.objectNameStack.push("viewport"),this.objectMemberQueue.unshift("units","transform");break;case v.st_clip:this.objectNameStack.push("clip"),this.objectMemberQueue.unshift("contourCounts","points","indices");break;case v.st_polytriangle:this.objectNameStack.push("polyTriangle"),this.objectMemberQueue.unshift("points","indices","colors");break;case v.st_raster:this.objectNameStack.push("raster"),this.objectMemberQueue.unshift("position","width","height","imageId");break;case v.st_text:this.currentStringNumber=this.strings.length,0===this.objectNumber&&(this.objectNumber=this.currentFakeId--),this.currentStringBox.makeEmpty(),this.objectNameStack.push("text"),this.objectMemberQueue.unshift("string","position","height","widthScale","rotation","oblique","charWidths");break;case v.st_font_def:this.objectNameStack.push("fontDef"),this.objectMemberQueue.unshift("name","fullName","flags","spacing","panose");break;case v.st_end_object:if(this.objectStack.pop(),this.objectStack.length){switch(this.objectStack.pop()){case v.st_polytriangle:this.actOnPolyTriangle();break;case v.st_viewport:this.actOnViewport();break;case v.st_clip:this.actOnClip();break;case v.st_raster:this.actOnRaster();break;case v.st_text:this.actOnText();break;case v.st_font_def:this.actOnFontDef()}var e=this.objectNameStack.pop(),r=this.parseObjState[e];for(var n in r)r[n]=null}else this.parserAssert(0,1,"parseEndObject (Stack Empty)");this.objectMemberQueue.length=0;break;default:this.objectNameStack.push("unknown"),this.error=!0,this.unhandledTypeWarning("parseObject",t)}},b.prototype.initSheet=function(t){if(!this.hidePaper&&(this.bgColor=t,this.metadata)){var e=this.paperWidth,r=this.paperHeight,n={x:0,y:0},i={x:e,y:0},s={x:0,y:r},o=this.metadata.page_dimensions||{};if(isFinite(o.paper_rotation)&&0!==o.paper_rotation){var a=o.paper_rotation*Math.PI/180,u=Math.cos(a),c=Math.sin(a);i.y=e*c,i.x=e*u,s.x=-r*c,s.y=r*u}isFinite(o.paper_offset_x)&&0!==o.paper_offset_x&&(n.x=o.paper_offset_x),isFinite(o.paper_offset_y)&&0!==o.paper_offset_y&&(n.y=o.paper_offset_y);var h=this.currentVbb,l=[n.x,n.y,n.x+i.x,n.y+i.y,n.x+i.x+s.x,n.y+i.y+s.y,n.x+s.x,n.y+s.y],f=[t,t,t,t],d=[0,1,2,0,2,3];if(!this.noShadow){var p=.0075*e,m={x:i.x*p/e,y:i.y*p/e},g={x:s.x*p/r,y:s.y*p/r},v={x:n.x+m.x,y:n.y+m.y},y={x:n.x+i.x,y:n.y+i.y},b=4283782485;l=l.concat([v.x-g.x,v.y-g.y,v.x-g.x+i.x,v.y-g.y+i.y,v.x+i.x,v.y+i.y,v.x,v.y,y.x,y.y,y.x+m.x,y.y+m.y,y.x+m.x-g.x+s.x,y.y+m.y-g.y+s.y,y.x-g.x+s.x,y.y-g.y+s.y]),f=f.concat([b,b,b,b,b,b,b,b]),d=d.concat([4,5,6,4,6,7,8,9,10,8,10,11]),this.hasPageShadow=!0}this.addPolyTriangle(l,f,d,4294967295,-1,0,!1),h.addSegment(n.x,n.y,n.x+i.x,n.y+i.y,0,1e-6,4278190080,-1,0,this.currentVpId),h.addSegment(n.x+i.x,n.y+i.y,n.x+i.x+s.x,n.y+i.y+s.y,0,1e-6,4278190080,-1,0,this.currentVpId),h.addSegment(n.x+i.x+s.x,n.y+i.y+s.y,n.x+s.x,n.y+s.y,0,1e-6,4278190080,-1,0,this.currentVpId),h.addSegment(n.x+s.x,n.y+s.y,n.x,n.y,0,1e-6,4278190080,-1,0,this.currentVpId)}},b.prototype.setObjectMember=function(t){if(!this.objectMemberQueue.length)return d.vF.warn("Unexpected object member. "+t+" on object "+this.objectNameStack[this.objectNameStack.length-1]),!1;var e=this.objectMemberQueue.shift(),r=this.objectNameStack[this.objectNameStack.length-1];return"sheet"==r&&"paperColor"==e?(this.initSheet(t),!0):!!r&&(this.parseObjState[r][e]=t,!0)},b.prototype.parseString=function(){var t=this.stream,e=t.getVarints(),r=t.getVarints(),n=t.getString(r);if(e===v.st_object_member){if(this.setObjectMember(n))return}else d.vF.info("Unexpected opcode semantic type for string.");return n},b.prototype.actOnFontDef=function(){var t=this.parseObjState.fontDef;this.fontDefs[++this.fontCount]=t,this.fontId=this.fontCount},b.prototype.parsePoint=function(){var t=this.stream.getVarints(),e=this.parsePointPositions();if(t===v.st_object_member){if(this.setObjectMember(e))return}else d.vF.info("Unexpected opcode semantic type for point.");return e},b.prototype.parsePointsArray=function(){var t=this.stream,e=t.getVarints(),r=t.getVarints();if(r){r/=2;for(var n,i=[],s=0;s<r;++s)n=this.parsePointPositions(),i.push(n[0]),i.push(n[1]);switch(e){case v.st_polyline:return void this.actOnPolylinePointsArray(i);case v.st_dot:return void this.actOnDot(i);case v.st_object_member:if(this.setObjectMember(i))return;break;default:d.vF.info("Unexpected opcode semantic type for points array.")}return i}},b.prototype.parseIntArray=function(){for(var t=this.stream,e=t.getVarints(),r=t.getVarints(),n=[],i=0;i<r;++i)n.push(t.getUint32());if(e===v.st_object_member){if(this.setObjectMember(n))return}else this.unhandledTypeWarning("parseIntArray",e);return n},b.prototype.parseDoubleArray=function(){for(var t=this.stream,e=t.getVarints(),r=t.getVarints(),n=[],i=0;i<r;++i)n.push(t.getFloat64());if(e===v.st_object_member){if(this.setObjectMember(n))return}else this.unhandledTypeWarning("parseDoubleArray",e);return n},b.prototype.parseByteArray=function(){for(var t=this.stream,e=t.getVarints(),r=t.getVarints(),n=[],i=0;i<r;++i)n.push(t.getUint8());if(e===v.st_object_member){if(this.setObjectMember(n))return}else this.unhandledTypeWarning("parseByteArray",e);return n},b.prototype.parseVarintArray=function(){for(var t=this.stream,e=t.getVarints(),r=[],n=t.getVarints(),i=0;i<n;++i)r.push(t.getVarints());if(e===v.st_object_member){if(this.setObjectMember(r))return}else this.unhandledTypeWarning("parseVarIntArray",e);return r},b.prototype.parseInt=function(){var t=this.stream,e=t.getVarints(),r=t.getUint32();switch(e){case v.st_color:this.color=this.mapColor(r,!1),this.currentGeomMetrics.colors++;break;case v.st_fill:this.fill=!0,this.fillColor=this.mapColor(r,!0),this.currentGeomMetrics.fills++;break;case v.st_object_member:if(this.setObjectMember(r))return;default:this.unhandledTypeWarning("parseInt",e)}return r},b.prototype.parseVoid=function(){var t=this.stream.getVarints();t===v.st_fill_off?(this.fill=!1,this.currentGeomMetrics.fills++):this.unhandledTypeWarning("parseVoid",t)},b.prototype.parseVarint=function(){var t=this.stream,e=t.getVarints(),r=t.getVarints();switch(e){case v.st_line_weight:this.lineWeight=this.tx(r),this.currentGeomMetrics.line_weights++;break;case v.st_line_caps:this.currentGeomMetrics.line_caps++;break;case v.st_line_join:this.currentGeomMetrics.line_joins++;break;case v.st_object_id:case v.st_markup_id:this.objectNumber=r,this.maxObjectNumber=Math.max(this.maxObjectNumber,r),this.currentGeomMetrics.db_ids++;break;case v.st_link:this.linkNumber&&(this.linkBoxes[this.linkNumber]=this.currentLinkBox.clone(),this.currentLinkBox.makeEmpty()),this.linkNumber=r;break;case v.st_layer:this.currentGeomMetrics.layers++,this.layer=this.layersMap[r];break;case v.st_font_ref:this.fontId=r;break;case v.st_object_member:if(this.setObjectMember(r))return}return r},b.prototype.parseFloat=function(){var t=this.stream,e=t.getVarints(),r=t.getFloat32();switch(e){case v.st_miter_angle:case v.st_miter_length:break;case v.st_object_member:if(this.setObjectMember(r))return}return r},b.prototype.parseCircularArc=function(){var t=this.stream,e=t.getVarints();if(!this.parserAssert(e,v.st_arc,"parseCircularArc")){var r=this.parsePointPositions(),n=t.getVarints(),i=t.getFloat32(),s=t.getFloat32();this.actOnCircularArc(r[0],r[1],i,s,this.sx(n))}},b.prototype.parseCircle=function(){var t=this.stream,e=t.getVarints();if(!this.parserAssert(e,v.st_arc,"parseCircle")){var r=this.parsePointPositions(),n=t.getVarints();this.actOnCompleteCircle(r[0],r[1],this.sx(n))}},b.prototype.parseArc=function(){var t=this.stream,e=t.getVarints();if(!this.parserAssert(e,v.st_arc,"parseArc")){var r=this.parsePointPositions(),n=t.getVarints(),i=t.getVarints(),s=t.getFloat32(),o=t.getFloat32(),a=t.getFloat32();this.actOnArc(r[0],r[1],o,a,this.sx(n),this.sy(i),s)}},b.prototype.parseDataType=function(){var t=this.stream.getVarints();switch(t){case g.dt_void:this.parseVoid();break;case g.dt_int:this.parseInt();break;case g.dt_object:this.parseObject();break;case g.dt_varint:this.parseVarint();break;case g.dt_point_varint:this.parsePoint();break;case g.dt_float:this.parseFloat();break;case g.dt_point_varint_array:this.parsePointsArray();break;case g.dt_circular_arc:this.parseCircularArc();break;case g.dt_circle:this.parseCircle();break;case g.dt_arc:this.parseArc();break;case g.dt_int_array:this.parseIntArray();break;case g.dt_varint_array:this.parseVarintArray();break;case g.dt_byte_array:this.parseByteArray();break;case g.dt_string:this.parseString();break;case g.dt_double_array:this.parseDoubleArray();break;default:this.error=!0,d.vF.info("Data type not supported yet: "+t)}},b.prototype.readHeader=function(){var t=this.stream=new f.z(this.data),e=t.getString(3);if("F2D"!==e)return d.vF.error("Invalid F2D header : "+e,(0,p.$f)(p.tG.BAD_DATA)),!1;var r=t.getString(2);return"01"!==r?(d.vF.error("Only support f2d major version 1; actual version is : "+r,(0,p.$f)(p.tG.BAD_DATA)),!1):"."!==t.getString(1)?(d.vF.error("Invalid version delimiter.",(0,p.$f)(p.tG.BAD_DATA)),!1):(t.getString(2),!0)},b.prototype.parse=function(){if(this.readHeader()){for(var t=this.stream;t.offset<t.byteLength&&(this.parseDataType(),!this.error);)this.opCount++;this.linkNumber&&(this.linkBoxes[this.linkNumber]=this.currentLinkBox.clone(),this.currentLinkBox.makeEmpty()),this.flushBuffer(0,!0),this.currentVbb=null,this.stream=null,this.data=null,d.vF.info("F2d parse: data types count : "+this.opCount)}},b.prototype.parseFrames=function(t){if(this.data)for(var e=this.stream=new f.z(this.data);e.offset<e.byteLength&&(this.parseDataType(),!this.error);)this.opCount++;else t||d.vF.warn("Unexpected F2D parse state: If there is no data, we only expect a flush command, but flush was false.");t&&this.flushBuffer(0,!0),this.stream=null,this.data=null},b.prototype.actOnPolylinePointsArray=function(t){this.flushBuffer();for(var e=t.length/2,r=0,n=t[0],i=t[1],s=1;s<e;++s){var o=t[2*s],a=t[2*s+1];this.currentVbb.addSegment(n,i,o,a,r,this.lineWeight,this.color,this.objectNumber,this.layer,this.currentVpId),r+=Math.sqrt((o-n)*(o-n)+(a-i)*(a-i)),n=o,i=a}this.numPolylines++,this.numLineSegs+=e-1,this.currentGeomMetrics.plines++,this.currentGeomMetrics.pline_points+=e-1},b.prototype.actOnDot=function(t){this.currentGeomMetrics.dots++;var e=t[0],r=t[1];this.actOnCompleteCircle(e,r,this.sx(1),!0)},b.prototype.actOnCompleteCircle=function(t,e,r,n){this.flushBuffer(),this.numCircles++,n||this.currentGeomMetrics.circles++,this.fill?this.currentVbb.addSegment(t,e,t,e,0,2*r,this.color,this.objectNumber,this.layer,this.currentVpId):this.currentVbb.addArc(t,e,0,2*Math.PI,r,r,0,this.lineWeight,this.color,this.objectNumber,this.layer,this.currentVpId)},b.prototype.actOnCircularArc=function(t,e,r,n,i){this.numCircles++,this.currentGeomMetrics.circ_arcs++,this.flushBuffer(),this.currentVbb.addArc(t,e,r,n,i,i,0,this.lineWeight,this.color,this.objectNumber,this.layer,this.currentVpId)},b.prototype.actOnArc=function(t,e,r,n,i,s,o){this.numEllipses++,this.currentGeomMetrics.arcs++,this.flushBuffer(),this.currentVbb.addArc(t,e,r,n,i,s,o,this.lineWeight,this.color,this.objectNumber,this.layer,this.currentVpId)},b.prototype.actOnRaster=function(){if(this.manifestAvailable){this.flushBuffer(4,!0);var t=this.parseObjState.raster,e=t.position,r=t.imageId,n=this.imageId2URI[r],i=this.sx(t.width),s=this.sy(t.height),o=e[0]+.5*i,a=e[1]-.5*s;this.currentVbb.addTexturedQuad(o,a,i,s,0,4278255615,this.objectNumber,this.layer,this.currentVpId),this.currentImage={dataURI:n},this.flushBuffer(0,!0),this.currentGeomMetrics.rasters++}},b.prototype.actOnClip=function(){var t=this.parseObjState.clip;this.parseObjState.clip={},this.clips.push(t),this.currentGeomMetrics.clips++},b.prototype.actOnText=function(){this.strings[this.currentStringNumber]=this.parseObjState.text.string,this.currentGeomMetrics.texts++,this.currentGeomMetrics.strings.push(this.parseObjState.text.string),this.stringDbIds[this.currentStringNumber]=this.objectNumber,this.stringBoxes.push(this.currentStringBox.min.x,this.currentStringBox.min.y,this.currentStringBox.max.x,this.currentStringBox.max.y),this.extendStringsFetching&&(this.stringCharWidths.push(this.parseObjState.text.charWidths),this.stringAngles.push(this.parseObjState.text.rotation),this.stringPositions.push(this.parseObjState.text.position),this.stringHeights.push(this.parseObjState.text.height)),this.currentStringBox.makeEmpty(),this.currentStringNumber=-1,this.objectNumber<-1&&(this.objectNumber=0)};var x=new h.S;b.prototype.addPolyTriangle=function(t,e,r,n,i,s,o){var a=this,u=null,c=-1;function h(t,e){if(t>e){var r=t;t=e,e=r}if(u[t]){var n=u[t],i=n.lastIndexOf(e);-1==i?n.push(e):n[i]=-1}else u[t]=[e]}function l(r,o){if(r>o){var h=r;r=o,o=h}var l=u[r];l&&-1!=l.indexOf(o)&&(a.flushBuffer(4),a.currentVbb.addSegment(t[2*r],t[2*r+1],t[2*o],t[2*o+1],0,c,a.mapColor(e?e[r]:n,!0),i,s,a.currentVpId),e&&e[r]!=e[o]&&d.vF.warn("Gouraud triangle encountered. Will have incorrect antialiasing."))}if(this.objectStack[this.objectStack.length-1]==v.st_text&&(c=-.5),o){u=new Array(t.length/2);for(let t=0,e=r.length;t<e;t+=3){let e=r[t],n=r[t+1],i=r[t+2];h(e,n),h(n,i),h(i,e)}}if(-1!==this.currentStringNumber||this.linkNumber){let e=t.length/2;for(let r=0;r<e;++r)x.set(t[2*r],t[2*r+1],0),-1!==this.currentStringNumber&&this.currentStringBox.expandByPoint(x),this.linkNumber&&this.currentLinkBox.expandByPoint(x)}if(this.currentVbb.useInstancing){let a=r.length;for(let u=0;u<a;u+=3){let a=r[u],c=r[u+1],h=r[u+2];this.flushBuffer(4),this.currentVbb.addTriangleGeom(t[2*a],t[2*a+1],t[2*c],t[2*c+1],t[2*h],t[2*h+1],this.mapColor(e?e[a]:n,!0),i,s,this.currentVpId),o&&(l(a,c),l(c,h),l(h,a))}}else{var f=t.length/2;this.flushBuffer(f);for(var p=this.currentVbb,m=p.vcount,g=0;g<f;++g){var y=t[2*g],b=t[2*g+1];p.addVertexPolytriangle(y,b,this.mapColor(e?e[g]:n,!0),i,s,this.currentVpId)}p.addIndices(r,m),o&&function(){for(var r=0,o=u.length;r<o;r++){var h=u[r];if(h)for(var l=0;l<h.length;l++){var f=h[l];-1!=f&&(a.flushBuffer(4),a.currentVbb.addSegment(t[2*r],t[2*r+1],t[2*f],t[2*f+1],0,c,a.mapColor(e?e[r]:n,!0),i,s,a.currentVpId),e&&e[r]!=e[f]&&d.vF.warn("Gouraud triangle encountered. Will have incorrect antialiasing."))}}}()}},b.prototype.actOnPolyTriangle=function(){var t=this.parseObjState.polyTriangle;this.parseObjState.polyTriangle={};var e=t.points,r=t.indices,n=t.colors;if(e&&r){if(this.objectStack[this.objectStack.length-1]==v.st_text){if(this.excludeTextGeometry)return}else this.currentGeomMetrics.ptris++,this.currentGeomMetrics.ptri_points+=e.length/2,this.currentGeomMetrics.ptri_indices+=r.length;this.numPolytriangles++,this.numTriangles+=r.length/3,this.addPolyTriangle(e,n,r,this.color,this.objectNumber,this.layer,!0)}else d.vF.warn("Malformed polytriangle.")},b.prototype.actOnViewport=function(){var t=this.parseObjState.viewport;this.parseObjState.viewport={},t.geom_metrics=this.currentGeomMetrics={arcs:0,circles:0,circ_arcs:0,viewports:0,clips:0,colors:0,db_ids:0,dots:0,fills:0,layers:0,line_caps:0,line_joins:0,line_patterns:0,line_pat_refs:0,plines:0,pline_points:0,line_weights:0,links:0,miters:0,ptris:0,ptri_indices:0,ptri_points:0,rasters:0,texts:0,strings:[]},this.viewports.push(t),this.currentVpId=this.viewports.length-1},b.prototype.createLayerGroups=function(t){var e=this.layersRoot={name:"root",id:"root",childrenByName:{},isLayer:!1},r=0,n=0;for(var i in t){var s=parseInt(i),o=t[i],a="string"==typeof o?o:o.name;a||(a=i);var u=a.split("|"),c=e;if(u.length>1)for(var h=0;h<u.length-1;++h){var l=u[h],f=c.childrenByName[l];f||(f={name:l,id:"group-"+r++,childrenByName:{},isLayer:!1},c.childrenByName[l]=f),c=f}c.childrenByName[a]={name:a,index:s,id:n++,childrenByName:{},isLayer:!0}}!function t(e){var r=Object.keys(e.childrenByName).map((function(t){return e.childrenByName[t]}));if(delete e.childrenByName,r.length){e.children=r,e.childCount=0;for(var n=0;n<r.length;++n)e.childCount+=t(r[n]);r.sort((function(t,e){return t.isLayer&&!e.isLayer?-1:!t.isLayer&&e.isLayer?1:t.name.localeCompare(e.name,void 0,{sensitivity:"base",numeric:!0})}))}return e.isLayer?1:e.childCount}(this.layersRoot)}},5982:t=>{const e=new Array(256);for(let t=0;t<256;t++){let r=t.toString(16);1===r.length&&(r="0"+r),e[t]=r}var r=new Array(20),n=new Array(10);t.exports={binToPackedString:function(t,e,r){for(var i=20===r?n:[],s=0;s<r;s+=2){var o=t[e+s],a=t[e+s+1];i[s/2]=a<<8|o}return String.fromCharCode.apply(null,i)},bin16ToPackedString:function(t,e){return String.fromCharCode(t[e],t[e+1],t[e+2],t[e+3],t[e+4],t[e+5],t[e+6],t[e+7],t[e+8],t[e+9])},unpackHexString:function(t){for(var n=10===t.length?r:[],i=0;i<t.length;i++){var s=t.charCodeAt(i);n[2*i]=e[255&s],n[2*i+1]=e[s>>8&255]}return n.join("")},packedToBin:function(t,e,r){for(let n=0;n<t.length;n++){let i=t.charCodeAt(n);e[r+2*n]=255&i,e[r+2*n+1]=i>>8&255}}}},3314:(t,e,r)=>{const{WebSocketBase:n,STATE:i}=r(4318),s=r(5982).packedToBin,o=r(5982).binToPackedString;class a extends n{clone(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const e=new a(this.url,this.queryParams,this.headers,this.onResourcesReceived,this.onResourceFailed,this.onConnectionFailed);return this.authorizeUrns.forEach((r=>{e.addAuthorizeUrn(r,t)})),e}_decodeMessage(t){const e=new Int32Array(t,0,3);if(827019343!==e[0])return void console.error("Invalid message format",e[0].toString(16),e[1],t);const r=String.fromCharCode(255&e[1]),n=e[2],i=new Int32Array(t,12,n),s=new Uint8Array(t,12+4*n),a=[],u=[],c=[];for(let t=0;t<i.length;t++){const e=i[t],n=t<i.length-1?i[t+1]:s.byteLength,h=o(s,e,20),l=s.subarray(e+20,n);if(this.numRequestsReceived++,"e"===r){let t=(new TextDecoder).decode(l.subarray(4));t="The service returned the following message: "+t;let e=this.inFlightRequests.get(h).type;this.onResourceFailed(h,e,t)}a.push(h),u.push(this.inFlightRequests.get(h).lineageUrn),c.push(l),this.inFlightRequests.delete(h)}"e"!==r&&this.onResourcesReceived(a,u,c,r)}_flushSendQueue(){var t;if((null===(t=this.ws)||void 0===t?void 0:t.readyState)===i.OPEN){for(const[t,e]of this._pendingSends){this.accountIdSent!==t&&(this.ws.send("/account_id/"+t),this.accountIdSent=t);for(const[t,r]of e){if(!r.length)continue;this.numRequestsSent+=r.length;const e=1+20*r.length;this.msgBuffer.length<e&&(this.msgBuffer=new Uint8Array(e)),this.msgBuffer[0]=t.charCodeAt(0);for(let t=0;t<r.length;t++)s(r[t],this.msgBuffer,1+20*t);this.ws.send(new Uint8Array(this.msgBuffer.buffer,0,e))}}this._pendingSends.clear(),this._numPendingSends=0}else this._openWebSocket()}requestResource(t,e,r,n,i){if(this.hasPermanentError)return void console.error("requestResource called on unusable WebSocket");const s=t.slice(t.indexOf("/cdn/")+5).split("/")[1];this._pendingSends.has(s)||this._pendingSends.set(s,new Map([["g",[]],["m",[]]])),this._pendingSends.get(s).get(n).push(r),this._numPendingSends++,this.inFlightRequests.set(r,{url:t,lineageUrn:e,type:n,queryParams:i})}}t.exports.f=a},4318:(t,e,r)=>{const n=r(169),i="undefined"!=typeof navigator,s=function(){return!i},o=Object.freeze({CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3});t.exports.WebSocketBase=class{constructor(t,e,r,i,s,o){this.ws=null,this.url=t,this.queryParams=e,this.headers=r,this.numRequestsSent=0,this.numRequestsReceived=0,this.authorizeUrns=new Set,this._retriedOpen=0,this.retryEvent=null,this.hasPermanentError=void 0===n||!this.url,this.lastError=null,this.lastErrorNumInFlight=null,this.onResourcesReceived=i,this.onResourceFailed=s,this.onConnectionFailed=o,this._pendingSends=new Map,this._numPendingSends=0,this.inFlightRequests=new Map,this.msgBuffer=new Uint8Array(201)}addAuthorizeUrn(t){var e;let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.authorizeUrns.has(t)||this.hasPermanentError||(r&&this._openWebSocket(),(null===(e=this.ws)||void 0===e?void 0:e.readyState)===o.OPEN&&this.ws.send("/auth/"+t),this.authorizeUrns.add(t))}_openWebSocket(){if(this.ws||this.hasPermanentError)return;let t=this.url.replace("https:","wss:").replace("http:","ws:").replace(":7124",":7125");this.queryParams&&(t+="?"+this.queryParams),this.ws=new n(t,void 0,s()?{headers:this.headers}:{}),this.ws.onopen=()=>{this.accountIdSent=null,this.ws.binaryType="arraybuffer",s()||this.ws.send("/headers/"+JSON.stringify(this.headers)),this.ws.send("/options/"+JSON.stringify({batch_responses:!0,report_errors:!0}));for(const t of this.authorizeUrns)this.ws.send("/auth/"+t)},this.ws.onmessage=t=>this._decodeMessage(t.data),this.ws.onclose=t=>{1e3!==t.code||0!==this.inFlightRequests.size?(console.warn("Abnormal socket close.","pending sends:",this._numPendingSends,"in flight",this.inFlightRequests.size,"event:",t),this._pendingSends=new Map,this._numPendingSends=0,this._retriedOpen<3?(console.warn("Retrying"),this._retriedOpen++,this.retryEvent=setTimeout((()=>{this.retryEvent=null,this.ws=null,this._openWebSocket()}),2e3)):(console.error("Too many WebSocket failures. Giving up."),this.hasPermanentError=!0,this.lastError=t,this.lastErrorNumInFlight=this.inFlightRequests.size),this.onConnectionFailed(this.inFlightRequests),this.inFlightRequests.clear()):this.closeWebSocket()}}closeWebSocket(){if(!this.ws)return;console.assert(0===this.inFlightRequests.size,"closeWebSocket called even though there are requests in flight"),this.retryEvent&&(clearTimeout(this.retryEvent),this.retryEvent=null),this.ws.onclose=null;const t=this.ws;this.ws.readyState===o.CONNECTING?this.ws.onopen=()=>t.close(1e3,"no more work expected"):this.ws.close(1e3,"no more work expected"),this.ws=null}_decodeMessage(t){throw new Error("Implement!")}_flushSendQueue(){throw new Error("Implement!")}requestResource(){throw new Error("Implement!")}},t.exports.STATE=o},7480:(t,e,r)=>{"use strict";r.d(e,{$f:()=>i,tG:()=>n});const n={UNKNOWN_FAILURE:1,BAD_DATA:2,NETWORK_FAILURE:3,NETWORK_ACCESS_DENIED:4,NETWORK_FILE_NOT_FOUND:5,NETWORK_SERVER_ERROR:6,NETWORK_UNHANDLED_RESPONSE_CODE:7,BROWSER_WEBGL_NOT_SUPPORTED:8,BAD_DATA_NO_VIEWABLE_CONTENT:9,BROWSER_WEBGL_DISABLED:10,BAD_DATA_MODEL_IS_EMPTY:11,UNSUPORTED_FILE_EXTENSION:13,VIEWER_INTERNAL_ERROR:14,WEBGL_LOST_CONTEXT:15,LOAD_CANCELED:16};function i(t){return"ErrorCode:"+t+"."}},1136:(t,e,r)=>{"use strict";r.d(e,{PG:()=>h}),r(4423),r(9479),r(8845),r(7656),r(5105),r(7467),r(586),r(1517),r(3777),r(4190),r(2359),r(6097),r(9172),r(7019),r(7273),r(1723),r(7415),r(9929),r(7583),r(5122),r(6385),r(230),r(7268),r(9733),r(8179),r(456),r(4017),r(9310),r(3062),r(6369),r(5637),r(2848),r(4842),r(4746),r(3454),r(6660),r(5941),r(2101),r(2917),r(7628),r(5186),r(2978),r(2527),r(9852),r(2376),r(617),r(3067),r(6820),r(8288),r(5509),r(5223),r(321),r(1927),r(1632),r(4377),r(9522),r(6771),r(2516),r(8931),r(2514),r(5694),r(2774),r(3283),r(9536),r(1926),r(4483),r(6215),r(8898),r(4176),r(3275),r(2793),r(7208),r(7348),r(6957),r(9732),r(3742),r(6422),r(2451),r(6270),r(9848);var n=r(6916),i=r(7480),s=r(2759),o=r(577),a=r(6247),u=r(4406),c=r(9861);let h={WORKER_REGISTER_FILE_PORT:"REGISTER_FILE_PORT",WORKER_READ_FILE:"READ_FILE"};var l=!1;function f(t){var e=t.split("/");if(0==e.length)return t;for(var r=[],n=0;n<e.length;++n){var i=e[n];"."!==i&&(".."===i&&r.length?r.pop():r.push(i))}return 0==r.length?"":r.join("/")}function d(t,e){return-1===e.indexOf("file://")&&(-1!==e.indexOf("://")||!!t||void 0)}if(h.simplifyPath=f,h.OSS_PREFIX="urn:adsk.objects:os.object:",h.generateUrl=function(t,e,r,n,i,s){if(r=r||"",(0,a.Gz)()&&!d(t,r))return r;var u=(r=f(r)).indexOf("urn:"),c=r.indexOf("?");if(r=-1!=u?-1!==c?r.slice(0,u)+encodeURIComponent(r.slice(u,c))+r.slice(c):r.slice(0,u)+encodeURIComponent(r.slice(u)):encodeURI(r),i&&h.isOSSUrl(r)){var l=r.indexOf("/objects/")+9,p=r.substring(l);r=r.substring(0,l)+encodeURIComponent(p)}if(!e||0!==decodeURIComponent(r).indexOf("urn:"))return d(null,r)?r:t+r;switch("items"!==e&&(r=r.substr(6)),e){case"items":return o.sR.getItemApi(t,r,n);case"bubbles":return o.sR.getManifestApi(t,r,n);case"thumbnails":return o.sR.getThumbnailApi(t,r,n);case"properties":return o.sR.getPropertyQueryApi(t,r,n,s)}},(0,a.Gz)())!function(){var t=r(9709),e=r(315),s=r(9631),o=r(684),a=r(8215);let u=new s.Agent({keepAlive:!0,keepAliveMsecs:100,maxSockets:10}),c=new o.Agent({keepAlive:!0,keepAliveMsecs:100,maxSockets:10});var l=new s.Agent({maxSockets:10});h.rawGet=function(r,f,p,m,g,v){if(v=v||{},d(r,p=h.generateUrl(r,f,p,void 0,v.escapeOssObjects))){if(v.queryParams){var y=-1===p.indexOf("?")?"?":"&";p=p+y+v.queryParams}var b=a.parse(p),x={host:b.hostname,port:b.port,method:v.method||"GET",path:b.path,headers:{},retryCount:0,agent:"https:"===b.protocol?u:c};if(x.host.endsWith(".api.autodesk.com")&&(x.path.startsWith("/derivativeservice")||x.path.startsWith("/modelderivative"))&&(x.agent=l),v.headers)for(var w in v.headers)x.headers[w]=v.headers[w];x.headers["accept-encoding"]||(x.headers["accept-encoding"]="gzip, deflate"),v.range&&(x.headers.Range="bytes="+v.range.min+"-"+v.range.max),v.ondata&&(v.responseType="arraybuffer");var _=("https:"===b.protocol?s:o).request(x,(function(t){var r=!(t.statusCode>=200&&t.statusCode<400),s=t;!r&&function(t,e){return!!("gzip"===t.headers["content-encoding"]||e.endsWith(".json.gz")||e.endsWith("FragmentList.pack")||e.endsWith("LightList.bin")||e.endsWith("CameraList.bin")||e.endsWith("CameraDefinitions.bin")||e.endsWith("LightDefinitions.bin"))}(t,b.pathname)&&(s=t.pipe(e.createGunzip())),"json"!==v.responseType&&"text"!==v.responseType&&v.responseType||s.setEncoding("utf8");var o=[],a=(Buffer.allocUnsafe(65536),0);s.on("data",(function(t){o.push(t),v.ondata&&v.ondata(t)})),s.on("end",(function(){if(t.statusCode>=200&&t.statusCode<400){if("json"===v.responseType){var r=JSON.parse(o.join(""));return void m(r)}if("text"===v.responseType||""===v.responseType){var s=o.join("");return void m(s)}var u=Buffer.concat(o);if(31===u[0]&&139===u[1]){n.vF.warn("An LMV resource ("+p+") was double compressed, or Content-Encoding header missing");try{u=e.gunzipSync(u),a=u.length}catch(t){g(i.tG.BAD_DATA,"Malformed data received when requesting file",{url:p,exception:t.toString(),stack:t.stack})}}200===_.status&&v.range&&(u=new Uint8Array(u,v.range.min,v.range.max-v.range.min)),m(u,a)}else g&&g(t.statusCode,t.statusMessage,{url:p})}))}));_.on("error",(function(t){g&&g(t.code,t.message,{url:p})})),v.postData&&_.write(v.postData),_.end()}else!function(r,n,i,s){function o(t){if("json"===s.responseType)try{return JSON.parse(t.toString("utf8"))}catch(t){i(t)}return t}0===r.indexOf("file://")&&(r=r.substr(7)),t.readFile(r,(function(t,a){t?i(0,0,{httpStatusText:t,url:r}):31===a[0]&&139===a[1]?e.gunzip(a,null,(function(t,e){t?i(0,0,{httpStatusText:t,url:r}):(e=o(e),s.ondata&&s.ondata(e),n(e))})):(a=o(a),s.ondata&&s.ondata(a),n(a))}))}(p,m,g,v)}}();else{var p=new(r(1436));p.max=25;var m={},g={},v={};h.registerProtocolPort=function(t,e){/^(http(s)?|file):/gi.test(t)?console.warn("http(s) or file protocol were not allowed to be handled"):e?(m[t]=e,e.onmessage=function(t){var e=t.data.url;if(g[e]){var r=g[e];if(t.data.error)r.onFailureWrapped(i.tG.BAD_DATA,"Malformed data received when requesting file",{url:e,exception:t.data.error.message,stack:t.data.error.stack});else{var n=t.data.buffer;if(g[e]=void 0,31===n[0]&&139===n[1]&&e.match(/(.f2d|.gz)$/gi))try{n=(0,c.Wt)(n),r.options&&r.options.ondata&&r.options.ondata(n),r.onSuccessWrapped(n)}catch(t){r.onFailureWrapped(i.tG.BAD_DATA,"Malformed data received when requesting file",{url:e,exception:t.toString(),stack:t.stack})}else r.onSuccessWrapped(n)}}else if(v[e]){var s=[];t.data&&t.data.buffer&&t.data.buffer.buffer instanceof ArrayBuffer&&s.push(t.data.buffer.buffer),v[e].postMessage(t.data,s),v[e]=void 0}}):m[t]&&m[t]instanceof MessagePort&&(m[t].onmessage=void 0,m[t]=void 0)},h.handlerProtocol=function(t,e,r,n,i){var s=m[t];g[e]={onSuccessWrapped:r,onFailureWrapped:n,options:i},s.postMessage({operation:h.WORKER_READ_FILE,url:e})},h.forwardProtocolHandlerToWorker=function(t){var e={},r=new MessageChannel;for(var n in r.port1.onmessage=function(t){var e=new URL(t.data.url);m[e.protocol].postMessage(t.data),v[e]=r.port1},m)m[n]instanceof MessagePort&&(e[n]=r.port2);t.doOperation({operation:h.WORKER_REGISTER_FILE_PORT,protocolPortMap:e},[r.port2])},h.rawGet=function(t,e,r,i,s,o){p.go((a=>{let u=function(){a();for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];s&&s.apply(s,e)},c=function(){a();for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];i&&i.apply(i,e)};var l=/^(\w+:)\/\//gi.exec(r);if(l&&2==l.length&&m[l[1]])h.handlerProtocol(l[1],r,c,u,o);else{let i=h._rawGet;null!=o&&o.useFetch&&(i=h._rawGetFetch),i(t,e,r,c,(function(){const i=arguments.length<=0?void 0:arguments[0];let s="get"===((null==o?void 0:o.method)||(null!=o&&o.noBody?"HEAD":"GET")).toLowerCase()&&(0===i||429===i||i>=500);if((arguments.length<=2?void 0:arguments[2]).aborted&&(s=!1),s){const s=arguments.length<=3?void 0:arguments[3];let a=100,l=5,f=!1;if(429!==i&&503!==i||null==s||!s.getResponseHeader("Retry-After")?0===i&&(f=3,l=2):f=s.getResponseHeader("Retry-After"),f){const t=Number(f);a=!isNaN(t)&&1e3*t||Date.parse(f)-(new Date).getTime(),a=a>100?a:100}h._retryRequest(t,e,r,o,a,l).then((t=>{n.vF.warn(`request ${r} successful after retries.`),c(...t)})).catch((t=>{n.vF.warn(`request ${r} unsuccessful after retries.`),u(...t)}))}else u(...arguments)}),o)}}))},h._retryRequest=function(t,e,r,i,s,o){const a={delayFirstAttempt:!0,startingDelay:s,numOfAttempts:4,retry:(t,e)=>{let[r,i,{url:s}]=t;return n.vF.warn(`request ${s} failed with status ${r} ${i}. Attempt ${e}`),!0},timeMultiple:o};return(0,u.backOff)((()=>new Promise(((n,s)=>{let o=h._rawGet;null!=i&&i.useFetch&&(o=h._rawGetFetch),o(t,e,r,(function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return n(e)}),(function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return s(e)}),i)}))),a)},h.isOSSUrl=function(t){return!!t&&-1!==t.indexOf("/oss/v2/buckets")},h.getSignedS3DownloadUrl=function(t){return new Promise((e=>{const r=t.indexOf("?acmsession=");-1!==r&&(t=t.substring(0,r)),t+="/signeds3download?useCdn=true";const n=new XMLHttpRequest;n.open("GET",t),n.setRequestHeader("Authorization",o.sR.HTTP_REQUEST_HEADERS.Authorization),n.responseType="json",n.send();const i=()=>{e(null)};n.onload=t=>{const r=t.currentTarget.response;e(r.url)},n.onerror=i,n.ontimeout=i,n.onabort=i}))},h._rawGet=async function(t,e,r,o,a,u){u=u||{},r=h.generateUrl(t,e,r,u.apiData,u.escapeOssObjects,u.guid);let f=!1;if(h.isOSSUrl(r)){const t=await h.getSignedS3DownloadUrl(r);t?(r=t,f=!0):console.warn("Failed getting signed URL - Fallback to direct OSS resource.")}if(u.queryParams&&!f){var d=-1===r.indexOf("?")?"?":"&";r=r+d+u.queryParams}var p=new XMLHttpRequest;function m(t){a&&a(p.status,p.statusText,{url:r},p)}function g(t){if("json"===u.responseType)try{if(t instanceof Uint8Array)return(0,s.TN)(t);if("string"==typeof t)return JSON.parse(t)}catch(t){}return t}function v(t){if(p.status>=200&&p.status<400)if(p.response&&p.response instanceof ArrayBuffer){var e;if(31===(e=200===p.status&&u.range?new Uint8Array(p.response,u.range.min,u.range.max-u.range.min):new Uint8Array(p.response))[0]&&139===e[1]){l||(l=!0,n.vF.warn("An LMV resource ("+r+") was not uncompressed by the browser. This hurts performance. Check the Content-Encoding header returned by the server and check whether you're getting double-compressed streams. The warning prints only once but it's likely the problem affects multiple resources."));try{e=(0,c.Wt)(e)}catch(t){a(i.tG.BAD_DATA,"Malformed data received when requesting file",{url:r,exception:t.toString(),stack:t.stack},p)}}o&&o(g(e))}else{var s=p.response;s||u.responseType&&"text"!==u.responseType||(s=p.responseText),o&&o(g(s))}else m()}try{var y=!Object.prototype.hasOwnProperty.call(u,"asynchronous")||u.asynchronous;if(p.open(u.method||(u.noBody?"HEAD":"GET"),r,y),Object.prototype.hasOwnProperty.call(u,"responseType")&&(p.responseType=u.responseType),u.range&&p.setRequestHeader("Range","bytes="+u.range.min+"-"+u.range.max),!f&&(p.withCredentials=!0,Object.prototype.hasOwnProperty.call(u,"withCredentials")&&(p.withCredentials=u.withCredentials),u.headers))for(var b in u.headers)p.setRequestHeader(b,u.headers[b]),"authorization"===b.toLocaleLowerCase()&&(p.withCredentials=!1);y&&(p.onload=v,p.onerror=m,p.ontimeout=m,p.onabort=function(t){a&&a(p.status,"request was aborted",{url:r,aborted:!0},p)},u.ondata&&(p.overrideMimeType("text/plain; charset=x-user-defined"),u._dlProgress={streamOffset:0},p.onreadystatechange=function(){if(p.readyState>2&&200===p.status&&u.ondata){var t=p.responseText;if(u._dlProgress.streamOffset>=t.length)return;var e=function(t,e){for(var r=t.length-e,n=new ArrayBuffer(r),i=new Uint8Array(n,0),s=0,o=e;s<r;s++,o++)i[s]=255&t.charCodeAt(o);return i}(t,u._dlProgress.streamOffset);u._dlProgress.streamOffset=t.length,u.ondata(e)}})),p.send(u.postData),y||v()}catch(t){a(p.status,p.statusText,{url:r,exception:t},p)}},h._rawGetFetch=async function(t,e,r,n,i,s){s=s||{},r=h.generateUrl(t,e,r,s.apiData,s.escapeOssObjects,s.guid);let o=!1;if(h.isOSSUrl(r)){const t=await h.getSignedS3DownloadUrl(r);t?(r=t,o=!0):console.warn("Failed getting signed URL - Fallback to direct OSS resource.")}if(s.queryParams&&!o){var a=-1===r.indexOf("?")?"?":"&";r=r+a+s.queryParams}var u,c=new Request(r);function l(t){return{getResponseHeader:e=>{var r;return null==t||null===(r=t.headers)||void 0===r?void 0:r.get(e)}}}try{const t={method:s.method||(s.noBody?"HEAD":"GET"),body:s.postData,headers:s.headers||{},signal:s.abortSignal};if(s.range&&(t.headers.Range="bytes="+s.range.min+"-"+s.range.max),!o&&(t.credentials="include",Object.prototype.hasOwnProperty.call(s,"withCredentials")&&!1===s.withCredentials&&(t.credentials="omit"),s.headers))for(var f in s.headers)"authorization"===f.toLocaleLowerCase()&&(t.credentials="omit");if(!(u=await fetch(c,t)).ok){let t=await u.text();return void i(u.status,t,{url:r},l(u))}if(s.ondata){const t=u.body.getReader();for(;;){let{done:e,value:r}=await t.read();if(e)return void(n&&n(null));s.ondata(r)}}else{let t;s.responseType&&"text"!==s.responseType?"json"===s.responseType?t=await u.json():(t=await u.arrayBuffer(),200===c.status&&s.range&&(t=new Uint8Array(t,s.range.min,s.range.max-s.range.min))):t=await u.text(),n&&n(t)}}catch(t){"AbortError"===t.name?i(0,"request was aborted",{url:r,aborted:!0},l(u)):u?i(u.status,u.statusText,{url:r,exception:t},l(u)):i(0,"network error",{url:r,exception:t})}}}function y(t,e){Object.prototype.hasOwnProperty.call(e,"responseType")||(e.responseType="arraybuffer"),Object.prototype.hasOwnProperty.call(e,"withCredentials")||(e.withCredentials=!!t.auth),e.headers=t.headers,e.queryParams=t.queryParams,e.endpoint=t.endpoint,e.escapeOssObjects=t.escapeOssObjects}h.defaultFailureCallback=function(t,e,r){403==t?this.raiseError(i.tG.NETWORK_ACCESS_DENIED,"Access denied to remote resource",{url:r.url,httpStatus:t,httpStatusText:e}):404==t?this.raiseError(i.tG.NETWORK_FILE_NOT_FOUND,"Remote resource not found",{url:r.url,httpStatus:t,httpStatusText:e}):0===t&&r.aborted?this.raiseError(i.tG.LOAD_CANCELED,"Request aborted",{url:r.url,httpStatus:t,httpStatusText:e}):t>=500&&t<600?this.raiseError(i.tG.NETWORK_SERVER_ERROR,"Server error when accessing resource",{url:r.url,httpStatus:t,httpStatusText:e}):r.exception?this.raiseError(i.tG.NETWORK_FAILURE,"Network failure",{url:r.url,exception:r.exception.toString(),stack:r.exception.stack}):this.raiseError(i.tG.NETWORK_UNHANDLED_RESPONSE_CODE,"Unhandled response code from server",{url:r.url,httpStatus:t,httpStatusText:e,data:r})},h.getItem=function(t,e,r,n,i){if(y(t,i=i||{}),i.range&&!t.supportsRangeRequests){let t="start="+i.range.min+"&end="+i.range.max;i.queryParams?i.queryParams+="&"+t:i.queryParams=t,i.range=void 0}h.rawGet(t.endpoint,"items",e,r,n,i)},h.getManifest=function(t,e,r,n,i){i=i||{},Object.prototype.hasOwnProperty.call(i,"responseType")||(i.responseType="json"),y(t,i),h.rawGet(t.endpoint,"bubbles",e,r,n,i)},h.getProperties=function(t,e,r,n,i,s){const o={};y(t,o),o.responseType="json",o.guid=r,o.method="POST",o.postData=JSON.stringify(n),o.headers["Content-Type"]="application/json",o.headers.accept="application/json",o.headers["Access-Control-Allow-Origin"]="*",h.rawGet(t.endpoint,"properties",e,i,s,o)},h.getThumbnail=function(t,e,r,n,i){y(t,i=i||{});var s=i.queryParams||"",o=[];if(-1===s.indexOf("guid=")&&i.guid&&o.push("guid="+encodeURIComponent(i.guid)),-1===s.indexOf("role=")){var a=i.role||"rendered";o.push("role="+a)}if(-1===s.indexOf("width=")){let t=i.size||400;o.push("width="+t)}if(-1===s.indexOf("height=")){let t=i.size||400;o.push("height="+t)}-1===s.indexOf("acmsession=")&&i.acmsession&&o.push("acmsession="+i.acmsession);var u=o.join("&");i.queryParams?i.queryParams=i.queryParams+"&"+u:i.queryParams=u,h.rawGet(t.endpoint,"thumbnails",e,r,n,i)},h.getACMSession=function(t,e,r,i){const s={numOfAttempts:4,timeMultiple:5,retry:(t,e)=>(n.vF.warn(`acmsession request failed. Attempt #${e}`),!0)};(0,u.backOff)((()=>new Promise(((r,n)=>{h._getACMSession(t,e,r,n)}))),s).then((function(){return r(...arguments)})).catch((function(){return i(...arguments)}))},h._getACMSession=function(t,e,r,n){var i,s={};for(var o in e)"oauth2AccessToken"===o?i=e[o]:-1!==o.indexOf("x-ads-acm")&&(s[o]=e[o]);s.application="autodesk";var a=new XMLHttpRequest;a.open("POST",t+"/oss-ext/v2/acmsessions",!0),a.setRequestHeader("Content-Type","application/json"),a.setRequestHeader("Authorization","Bearer "+i),a.responseType="json",a.onload=function(){if(200===a.status&&a.response){var t="string"==typeof a.response?JSON.parse(a.response):a.response;t&&t.acmsession?r(t.acmsession):n(a.status,"Can't get acm session from response.")}else n(a.status)},a.onerror=n,a.ontimeout=n,a.send(JSON.stringify(s)),delete s.application}},577:(t,e,r)=>{"use strict";r.d(e,{sR:()=>x,_$:()=>v,aK:()=>b});var n=r(6247),i=(0,n.mS)(),s=i;s&&s.document,i.LOCALIZATION_REL_PATH="",i.LMV_VIEWER_VERSION="7.99.1",i.LMV_BUILD_TYPE="Production",i.LMV_RESOURCE_ROOT="",i.LMV_IS_FLUENT_BUILD=!1,i.USE_OTG_DS_PROXY=!1,i.LMV_THIRD_PARTY_COOKIE=!(0,n.Gz)()&&void 0,"v"===i.LMV_VIEWER_VERSION.charAt(0)&&(i.LMV_VIEWER_VERSION=i.LMV_VIEWER_VERSION.substr(1)),i.LMV_VECTOR_PDF=!1,i.LMV_RASTER_PDF=!0;const o=(0,n.mS)();var a={},u=null;a.ENDPOINT_API_DERIVATIVE_SERVICE_V2="derivativeV2",a.ENDPOINT_API_MODEL_DERIVATIVE_V2="modelDerivativeV2",a.ENDPOINT_API_FLUENT="fluent",a.ENDPOINT_API_D3S="D3S",a.ENDPOINT_API_DERIVATIVE_STREAMING="streamingV2";var c,h={derivativeV2:{baseURL:"/derivativeservice/v2",itemURL:"/derivativeservice/v2/derivatives/:derivativeurn",manifestURL:"/derivativeservice/v2/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/thumbnails/:urn",propertyQueryURL:"/modelderivative/v2/designdata/:urn/metadata/:guid/properties:query"},derivativeV2_EU:{baseURL:"/derivativeservice/v2/regions/eu",itemURL:"/derivativeservice/v2/regions/eu/derivatives/:derivativeurn",manifestURL:"/derivativeservice/v2/regions/eu/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/regions/eu/thumbnails/:urn"},derivativeV2_APAC:{baseURL:"/derivativeservice/v2/regions/apac",itemURL:"/derivativeservice/v2/regions/apac/derivatives/:derivativeurn",manifestURL:"/derivativeservice/v2/regions/apac/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/regions/apac/thumbnails/:urn"},derivativeV2_Fedramp:{baseURL:"/derivativeservice/v2",itemURL:"/derivativeservice/v2/derivatives/:derivativeurn",manifestURL:"/derivativeservice/v2/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/thumbnails/:urn"},modelDerivativeV2:{baseURL:"/modelderivative/v2/",itemURL:"/modelderivative/v2/designdata/:urn/manifest/:derivativeurn",manifestURL:"/modelderivative/v2/designdata/:urn/manifest",thumbnailsURL:"/modelderivative/v2/designdata/:urn/thumbnail",propertyQueryURL:"/modelderivative/v2/designdata/:urn/metadata/:guid/properties:query"},fluent:{baseURL:"/modeldata",itemURL:"/modeldata/file/:derivativeurn",manifestURL:"/modeldata/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/thumbnails/:urn",cdnURL:"/cdn",cdnWS:"/cdnws"},D3S:{baseURL:"/modeldata",itemURL:"/modeldata/file/:derivativeurn",manifestURL:"/modeldata/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/thumbnails/:urn",cdnURL:"/cdn",cdnWS:"/cdnws"},D3S_EU:{baseURL:"/modeldata",itemURL:"/modeldata/file/:derivativeurn",manifestURL:"/modeldata/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/regions/eu/thumbnails/:urn",cdnURL:"/cdn",cdnWS:"/cdnws"},D3S_APAC:{baseURL:"/modeldata",itemURL:"/modeldata/file/:derivativeurn",manifestURL:"/modeldata/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/regions/APAC/thumbnails/:urn",cdnURL:"/cdn",cdnWS:"/cdnws"},streamingV2:{baseURL:"/modeldata",itemURL:"/modeldata/file/:derivativeurn",manifestURL:"/modeldata/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/thumbnails/:urn",cdnURL:"/cdn",cdnWS:"/cdnws"},streamingV2_EU:{baseURL:"/regions/eu/modeldata",itemURL:"/regions/eu/modeldata/file/:derivativeurn",manifestURL:"/regions/eu/modeldata/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/regions/eu/thumbnails/:urn",cdnURL:"/regions/eu/cdn",cdnWS:"/regions/eu/cdnws"},streamingV2_APAC:{baseURL:"/modeldata",itemURL:"/modeldata/file/:derivativeurn",manifestURL:"/modeldata/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/thumbnails/:urn",cdnURL:"/cdn",cdnWS:"/cdnws"},streamingV2_Fedramp:{baseURL:"/modeldata",itemURL:"/modeldata/file/:derivativeurn",manifestURL:"/modeldata/manifest/:urn",thumbnailsURL:"/derivativeservice/v2/thumbnails/:urn",cdnURL:"/cdn",cdnWS:"/cdnws"}},l="",f=a.ENDPOINT_API_DERIVATIVE_SERVICE_V2,d=!1,p=!1,m="",g=!1;function v(){return c}a.HTTP_REQUEST_HEADERS={},a.queryParams={},a.setEndpointAndApi=function(t,e){null!=t&&(l=t),e&&(f=e,e.startsWith("D3S")&&console.warn(`api=${e} is deprecated and will be removed in a future release. Use streamingV2 or streamingV2_EU (europe region) instead`))},a.getEndpointAndApi=function(){return l+h[f].baseURL},a.getApiEndpoint=function(){return l},a.getApiFlavor=function(){return f},a.getCdnUrl=function(){return u||(l?l+h[f].cdnURL:void 0)},a.getCdnWebSocketEndpoint=function(){return l+(h[f].cdnWS||"")},a.setCdnUrl=function(t){u=t},a.getCdnRedirectUrl=function(){var t=h[f].cdnRedirectURL;return t?l+t:null},a.setAcmSession=function(t){m=t},a.getAcmSession=function(){return m},a.getManifestApi=function(t,e,r){var n=t||l;return e=e||"",(n+=h[r=r||f].manifestURL).replace(":urn",e)},a.getItemApi=function(t,e,r){var n=r||f,i=(t||l)+h[n].itemURL;e=e||"";var s=decodeURIComponent(e);if(-1!==i.indexOf(":urn")){var o=s.split("/")[0]||"";o=(o=o.split(":"))[o.length-1]||"",i=i.replace(":urn",o)}return n===a.ENDPOINT_API_MODEL_DERIVATIVE_V2&&(e=encodeURIComponent(s)),i.replace(":derivativeurn",e)},a.getThumbnailApi=function(t,e,r){return((t||l)+h[r||f].thumbnailsURL).replace(":urn",e||"")},a.getPropertyQueryApi=function(t,e,r,n){let i=(t||l)+h[r||f].propertyQueryURL;return i=i.replace(":urn",e||""),i.replace(":guid",n||"")},a.getUseCredentials=function(){return d},a.getDomainParam=function(){return console.warn("getDomainParam is deprecated, switch to getQueryParams instead."),this.getUseCredentials()&&!(0,n.Gz)()?"domain="+encodeURIComponent(o.location.origin):""},a.addQueryParam=function(t,e){this.queryParams[t]=e},a.deleteQueryParam=function(t){delete this.queryParams[t]},a.getQueryParams=function(t){let e=this.getUseCredentials()&&!(0,n.Gz)()?"domain="+encodeURIComponent(o.location.origin):"";var r;r="bypassds","undefined"!=typeof window&&function(t,e){t=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var r=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);return null==r?"":decodeURIComponent(r[1].replace(/\+/g," "))}(r,s.location.href)&&(e=e?e+"&bypassds=1":"bypassds=1");let i=[];for(let t in this.queryParams)i.push(encodeURIComponent(t)+"="+encodeURIComponent(this.queryParams[t]));return i.length&&(e?e+="&"+i.join("&"):e=i.join("&")),e&&t&&(t.queryParams?t.queryParams+="&"+e:t.queryParams=e),e},a.setUseCredentials=function(t){d=t},a.setUseCookie=function(t){p=t},a.getUseCookie=function(){return p},a.isOtgBackend=function(){return this.getApiFlavor()===this.ENDPOINT_API_FLUENT},a.isSVF2Backend=function(){let t=this.getApiFlavor();return t.startsWith(this.ENDPOINT_API_D3S)||t.startsWith(this.ENDPOINT_API_DERIVATIVE_STREAMING)},a.setEscapeOssObjects=function(t){g=t},a.getEscapeOssObjects=function(){return g},a.initLoadContext=function(t){for(var e in(t=t||{}).auth=this.getUseCredentials(),t.endpoint||(t.endpoint=this.getApiEndpoint()),t.api||(t.api=this.getApiFlavor()),t.headers||(t.headers={}),this.HTTP_REQUEST_HEADERS)t.headers[e]=this.HTTP_REQUEST_HEADERS[e];return t.api,this.ENDPOINT_API_FLUENT,this.getQueryParams(t),t.otg_cdn=u||this.getCdnUrl(),t.otg_ws=this.getCdnWebSocketEndpoint(),t.escapeOssObjects=this.getEscapeOssObjects(),t};var y=!1;function b(){return y}let x=a;a.initLoadContext.bind(a)},7676:(t,e,r)=>{"use strict";r.d(e,{k:()=>s});var n=r(5468);function i(t){var e=new n.iD(t.fragments);e.finfo.wantSort=t.fragments.wantSort,e.build(t.bvhOptions);var r={nodes:e.nodes.getRawData(),primitives:e.primitives};t.worker.postMessage({bvh:r,modelId:t.modelId,jobId:t.jobId},[r.nodes,r.primitives.buffer])}function s(t){t.register("COMPUTE_BVH",{doOperation:i})}},1711:(t,e,r)=>{"use strict";r.d(e,{k:()=>d});var n=r(7365),i=r(6118),s=1;function o(){this.vb=null,this.vbstride=0,this.posOffset=0,this.normalOffset=0,this.matrices=null,this.ranges=null,this.dbIds=null,this.id=s++}function a(t){t.x=.5*(1+Math.atan2(t.y,t.x)/Math.PI),t.y=.5*(1+t.z),t.z=0}function u(t,e,r){e[r++]=255&t,e[r++]=t>>8&255,e[r++]=t>>16&255,e[r]=0}var c=function(t,e,r,n,i,s,o){for(var u,c,h,l,f,d,p,m=t.posOffset,g=n;g<i;g++){var v=g*t.vbstride+m;o.set(t.vb[v],t.vb[v+1],t.vb[v+2]),o.applyMatrix4(r),t.vb[v]=o.x,t.vb[v+1]=o.y,t.vb[v+2]=o.z}if(-1!==t.normalOffset){var y=2*t.vbstride,b=2*t.normalOffset,x=function(t,e){return e.copy(t),e[12]=0,e[13]=0,e[14]=0,e.invert().transpose()}(r,s);for(g=n;g<i;g++){var w=g*y+b;o.set(e[w],e[w+1],0),o.divideScalar(65535),void 0,void 0,void 0,void 0,void 0,void 0,c=2*(u=o).x-1,h=2*u.y-1,l=Math.sin(c*Math.PI),f=Math.cos(c*Math.PI),d=Math.sqrt(1-h*h),p=h,u.x=f*d,u.y=l*d,u.z=p,o.applyMatrix4(x),o.normalize(),a(o),o.multiplyScalar(65535),e[w]=o.x,e[w+1]=o.y}}};function h(t,e,r){for(var n=16*t,i=0;i<16;i++)r.elements[i]=e[i+n]}function l(t){var e=new n.T,r=new i.S,s=[];for(let n=0;n<t.tasks.length;n++){var a=t.tasks[n],u=o.prototype.run.call(a,e,r);s.push(u)}var c=[];for(let t=0;t<s.length;t++)c.push(s[t].vb.buffer),c.push(s[t].vertexIds.buffer);t.worker.postMessage(s,c)}function f(t){var e,r,n,i,s;e=t.fragIds,r=t.geomIds,n=t.memCosts,i=t.materialIds,s=t.fragIdToNodeIdx,e.sort((function(t,e){var o=r[t],a=r[e],u=n[t],c=n[e];if(u!=c)return u-c;if(o!=a)return o-a;var h=i[t],l=i[e];return h!=l?h-l:s?s[t]-s[e]:0})),t.worker.postMessage({fragIds:t.fragIds,jobId:t.jobId},[t.fragIds.buffer])}function d(t){t.register("MERGE_GEOMETRY",{doOperation:l}),t.register("SORT_FRAGMENTS",{doOperation:f})}o.prototype.run=function(t,e){for(var r=this.vb,n=r.length/this.vbstride,i=t.clone(),s=new Uint8Array(3*n),o=-1!==this.normalOffset?new Uint16Array(r.buffer,r.byteOffset,2*r.length):null,a=this.ranges,l=this.matrices,f=a.length-1,d=0;d<f;d++){var p=a[d],m=a[d+1];h(d,l,t),c(this,o,t,p,m,i,e);for(var g=3*p,v=m-p,y=this.dbIds[d],b=0;b<v;b++)u(y,s,g),g+=3}return{taskId:this.id,vb:this.vb,vertexIds:s}}},8262:(t,e,r)=>{"use strict";r.d(e,{k:()=>d});var n=r(8661);class i{constructor(){this.numPolyLine=0,this.numEllipticals=0,this.numCirculars=0,this.numSegments=0,this.geometries=[]}addPolyLine(t,e,r){this.numPolyLine++;const n=t.length/2,i=[];for(let e=0;e<n;e++)i.push({x:t[2*e],y:t[2*e+1]});const s=((t,e,r)=>({type:"polyLine",vertices:t,fillColor:e,dbId:r}))(i,e,r);this.geometries.push(s)}addSegment(t,e,r){this.numSegments++;const n=((t,e,r)=>({type:"lineSegment",from:t,to:e,dbId:r}))(t,e,r);this.geometries.push(n)}addCircularArc(t,e,r,n,i,s){this.numCirculars++;const o=((t,e,r,n,i)=>({type:"circularCurve",circle:{center:t,radius:e},startInRadians:r,endInRadians:n,dbId:i}))([t,e],r,n,i,s);this.geometries.push(o)}addEllipticalArc(t,e,r,n,i,s,o){this.numEllipticals++;const a={ellipse:{center:[t,e],majorAxis:i,minorAxis:s,tiltInRadians:r},startInRadians:n,endInRadians:o,dbId:void 0};this.geometries.push(a)}}var s=r(3293),o=r(6916),a=r(7480);class u{constructor(t,e){if(this.metadata=t,this.scaleX=1,this.scaleY=1,this.bbox={min:{x:0,y:0,z:0},max:{x:0,y:0,z:0}},this.fillColor=null,t){const e=t.page_dimensions;this.setScale(e)}this.excludeTextGeometry=e.excludeTextGeometry||!0,this.dbId=0,this.maxDbId=0,this.geometry=new i,this.error=!1,this.offsetX=0,this.offsetY=0}setScale(t){this.paperWidth=t.page_width,this.paperHeight=t.page_height,this.scaleX=this.paperWidth/t.plot_width,this.scaleY=this.paperHeight/t.plot_height}load(t,e){e instanceof Uint8Array||(e=new Uint8Array(e)),this.data=e,this.parse(),t.loadDoneCB(!0)}loadFrames(t){this.loadContext=t;let e=t.data;e?(e instanceof Uint8Array||(e=new Uint8Array(e)),this.data=e):t.finalFrame&&(this.data=null),this.probeFrames(t.finalFrame),t.loadDoneCB(!0)}sx(t){return t*this.scaleX}sy(t){return t*this.scaleY}parserAssert(t,e,r){return t!=e&&(o.vF.warn("Expect "+e+"; actual type is "+t+"; in function "+r),this.error=!0,!0)}parseDataType(){const t=this.stream.getVarints();switch(t){case n.d$.dt_void:this.parseVoid();break;case n.d$.dt_int:this.parseInt();break;case n.d$.dt_object:this.parseObject();break;case n.d$.dt_varint:this.parseVarint();break;case n.d$.dt_point_varint:this.parsePoint();break;case n.d$.dt_float:this.parseFloat();break;case n.d$.dt_point_varint_array:this.parsePointsArray();break;case n.d$.dt_circular_arc:this.parseCircularArc();break;case n.d$.dt_circle:this.parseCircle();break;case n.d$.dt_arc:this.parseArc();break;case n.d$.dt_int_array:this.parseIntArray();break;case n.d$.dt_varint_array:this.parseVarintArray();break;case n.d$.dt_byte_array:this.parseByteArray();break;case n.d$.dt_string:this.parseString();break;case n.d$.dt_double_array:this.parseDoubleArray();break;default:this.error=!0,o.vF.info("Data type not supported yet: "+t)}}readHeader(){const t=this.stream=new s.z(this.data),e=t.getString(3);if("F2D"!==e)return o.vF.error("Invalid F2D header : "+e,(0,a.$f)(a.tG.BAD_DATA)),!1;const r=t.getString(2);return"01"!==r?(o.vF.error("Only support f2d major version 1; actual version is : "+r,(0,a.$f)(a.tG.BAD_DATA)),!1):"."!==t.getString(1)?(o.vF.error("Invalid version delimiter.",(0,a.$f)(a.tG.BAD_DATA)),!1):(t.getString(2),!0)}probe(){const t=this.stream;this.error=!1;try{for(;t.offset<t.byteLength&&(this.parseDataType(),!this.error););}catch(t){const e=t.toString(),r=t.stack?t.stack.toString():"...";o.vF.error("Error in F2DProbe.prototype.probe : "+e+" with stack : "+r)}}parse(){this.readHeader()&&this.probe()}parseFrames(){this.data&&(this.stream=new s.z(this.data),this.probe()),this.stream=null,this.data=null}parsePointPositions(){let t=this.stream.getVarints(),e=this.stream.getVarints();return t=(0,n.uq)(t),e=(0,n.uq)(e),t+=this.offsetX,e+=this.offsetY,this.offsetX=t,this.offsetY=e,[this.sx(t),this.sy(e)]}parseObject(){this.stream.getVarints()}parseString(){const t=this.stream;t.getVarints();const e=t.getVarints();return t.getString(e)}parsePoint(){this.stream.getVarints(),this.parsePointPositions()}parsePointsArray(){const t=this.stream,e=t.getVarints();let r=t.getVarints();if(!r)return;r/=2;const i=[];let s;for(let t=0;t<r;++t)s=this.parsePointPositions(),i.push(s[0]),i.push(s[1]);switch(e){case n.xL.st_polyline:return void this.actOnPolylinePointsArray(i);case n.xL.st_dot:return void this.actOnDot(i[0],i[1]);default:o.vF.info("Unexpected opcode semantic type for points array.")}}parseArray(t){const e=this.stream;e.getVarints();const r=e.getVarints();for(let e=0;e<r;++e)t()}parseIntArray(){const t=this.stream;this.parseArray(t.getUint32.bind(t))}parseDoubleArray(){const t=this.stream;this.parseArray(t.getFloat64.bind(t))}parseByteArray(){const t=this.stream;this.parseArray(t.getUint8.bind(t))}parseVarintArray(){const t=this.stream;this.parseArray(t.getVarints.bind(t))}parseInt(){const t=this.stream.getVarints(),e=this.stream.getUint32();return t===n.xL.st_fill&&(this.fillColor=e),e}parseFloat(){this.stream.getVarints(),this.stream.getFloat32()}parseVoid(){this.stream.getVarints()===n.xL.st_fill_off&&(this.fillColor=null)}parseVarint(){const t=this.stream,e=t.getVarints(),r=t.getVarints();switch(e){case n.xL.st_object_id:case n.xL.st_markup_id:this.dbId=r,this.maxDbId=Math.max(this.maxDbId,r)}}parseCircularArc(){const t=this.stream,e=t.getVarints();if(this.parserAssert(e,n.xL.st_arc,"parseCircularArc"))return;const r=this.parsePointPositions(),i=t.getVarints(),s=t.getFloat32(),o=t.getFloat32();this.actOnCircularArc(r[0],r[1],s,o,this.sx(i))}parseCircle(){const t=this.stream,e=t.getVarints();if(this.parserAssert(e,n.xL.st_arc,"parseCircle"))return;const r=this.parsePointPositions(),i=t.getVarints();this.actOnCompleteCircle(r[0],r[1],this.sx(i))}parseArc(){const t=this.stream,e=t.getVarints();if(this.parserAssert(e,n.xL.st_arc,"parseArc"))return;const r=this.parsePointPositions(),i=t.getVarints(),s=t.getVarints(),o=t.getFloat32(),a=t.getFloat32(),u=t.getFloat32();this.actOnArc(r[0],r[1],a,u,this.sx(i),this.sy(s),o)}actOnPolylinePointsArray(t){this.geometry.addPolyLine(t,this.fillColor,this.dbId)}actOnDot(t,e){this.actOnCompleteCircle(t,e,this.sx(1))}actOnCompleteCircle(t,e,r){this.geometry.addCircularArc(t,e,r,0,2*Math.PI,this.dbId)}actOnCircularArc(t,e,r,n,i){this.geometry.addCircularArc(t,e,i,r,n,this.dbId)}actOnArc(t,e,r,n,i,s){this.geometry.addEllipticalArc(t,e,r,n,i,s,this.dbId)}actOnPolyTriangle(){o.vF.warn("Polytriangles not currently supported.")}}function c(t,e){try{e()}catch(e){t.raiseError(a.tG.BAD_DATA,"",{exception:e.toString(),stack:e.stack}),t.postMessage(null)}}function h(t){return"geometry"===t.f2dLoadOptions.outputType?new u(t.metadata,t.f2dLoadOptions):new n.nW(t.metadata,t.manifest,t.basePath,t.f2dLoadOptions)}function l(t){var e=t.worker;if(e.postMessage({progress:.01}),t.data){e.postMessage({progress:.5});var r=h(t);t.loadDoneCB=function(t){if(t){var n={f2d:r};e.postMessage(n)}else e.raiseError(a.tG.BAD_DATA,"",{}),e.postMessage(null)},c(e,(function(){r.load(t,t.data)}))}else e.postMessage(null)}function f(t){var e=t.worker,r=e.f2d;if(!r){e.postMessage({progress:.5}),(r=e.f2d=h(t)).F2D_MESH_COUNT_OLD=0;var n={f2dframe:r};e.postMessage(n)}t.loadDoneCB=function(n,i){if(n){if(!r.meshes.length&&!i)return;var s,o={f2dframe:!0,meshes:r.meshes,baseIndex:r.F2D_MESH_COUNT_OLD,bbox:r.bbox};t.finalFrame&&(o.cumulativeProps={maxObjectNumber:r.maxObjectNumber,viewports:r.viewports,clips:r.clips,strings:r.strings,stringDbIds:r.stringDbIds,stringBoxes:r.stringBoxes,linkBoxes:r.linkBoxes,hasPageShadow:r.hasPageShadow,minLineWidth:r.currentVbb.minLineWidth},null!==(s=t.f2dLoadOptions)&&void 0!==s&&s.extendStringsFetching&&(o.cumulativeProps.stringCharWidths=r.stringCharWidths,o.cumulativeProps.stringAngles=r.stringAngles,o.cumulativeProps.stringPositions=r.stringPositions,o.cumulativeProps.stringHeights=r.stringHeights),o.finalFrame=i);for(var u=[],c=0,h=r.meshes.length;c<h;++c)u.push(r.meshes[c].vb.buffer),u.push(r.meshes[c].indices.buffer);e.postMessage(o,u),r.F2D_MESH_COUNT_OLD+=r.meshes.length,r.meshes=[]}else e.raiseError(a.tG.BAD_DATA,"",{}),e.postMessage(null)},c(e,(function(){r.loadFrames(t)}))}function d(t){t.register("PARSE_F2D",{doOperation:l}),t.register("PARSE_F2D_FRAME",{doOperation:f})}},5499:(t,e,r)=>{"use strict";r.d(e,{k:()=>v});var n=r(1136);function i(t){this.buffer=t,this.offset=0,this.byteLength=t.length,this.convBuf=new ArrayBuffer(8),this.convUint8=new Uint8Array(this.convBuf),this.convUint16=new Uint16Array(this.convBuf),this.convInt32=new Int32Array(this.convBuf),this.convUint32=new Uint32Array(this.convBuf)}function s(t){this.offset=t,this.message="try to access an offset that is out of bounds: "+this.offset,this.toString=function(){return this.message}}i.prototype.boundsCheck=function(t){if(t>=this.byteLength)throw new s(t)},i.prototype.seek=function(t){this.boundsCheck(t),this.offset=t},i.prototype.getBytes=function(t){this.boundsCheck(this.offset+t);var e=new Uint8Array(this.buffer.buffer,this.offset,t);return this.offset+=t,e},i.prototype.skipBytes=function(t){this.boundsCheck(this.offset+t),this.offset+=t},i.prototype.getVarints=function(){var t,e=0,r=0;do{this.boundsCheck(this.offset),e|=(127&(t=this.buffer[this.offset++]))<<r,r+=7}while(128&t);return e},i.prototype.getUint8=function(){return this.boundsCheck(this.offset+1),this.buffer[this.offset++]},i.prototype.getUint16=function(){return this.boundsCheck(this.offset+2),this.convUint8[0]=this.buffer[this.offset++],this.convUint8[1]=this.buffer[this.offset++],this.convUint16[0]},i.prototype.getInt16=function(){var t=this.getUint16();return t>32767&&(t|=4294901760),t},i.prototype.getInt32=function(){this.boundsCheck(this.offset+4);var t=this.buffer,e=this.convUint8,r=this.offset;return e[0]=t[r],e[1]=t[r+1],e[2]=t[r+2],e[3]=t[r+3],this.offset+=4,this.convInt32[0]},i.prototype.getUint32=function(){this.boundsCheck(this.offset+4);var t=this.buffer,e=this.convUint8,r=this.offset;return e[0]=t[r],e[1]=t[r+1],e[2]=t[r+2],e[3]=t[r+3],this.offset+=4,this.convUint32[0]},i.prototype.skipUint32=function(){this.boundsCheck(this.offset+4),this.offset+=4},i.prototype.getFloat32=function(){return this.boundsCheck(this.offset+4),this.offset+=4,0},i.prototype.getFloat64=function(){return this.boundsCheck(this.offset+8),this.offset+=8,0},i.prototype.skipFloat64=function(){this.boundsCheck(this.offset+8),this.offset+=8},i.prototype.reset=function(t){this.buffer=t,this.offset=0,this.byteLength=t.length};var o=r(8661),a=r(7480),u=r(6916);function c(){this.data=null,this.frameStart=0,this.frameEnd=0,this.stream=null,this.opCount=0,this.marker={frameStart:this.frameStart,frameEnd:this.frameEnd}}c.prototype.load=function(t){return this.data=t,this.frameStart=0,this.stream?(this.stream.reset(this.data),this.stream.seek(0),this.frameEnd=0):(this.stream=new i(this.data),this.stream.seek(8),this.frameStart=8,this.frameEnd=8),this.probe(),this.marker.frameStart=this.frameStart,this.marker.frameEnd=this.frameEnd,this.marker};var h=o.d$,l=o.xL;c.prototype.readColor=function(){var t=this.stream;t.getVarints(),t.getVarints(),t.skipUint32()},c.prototype.parsePointPositions=function(){this.stream.getVarints(),this.stream.getVarints()},c.prototype.unhandledTypeWarning=function(t,e){u.vF.warn("Unhandled semantic type when probing F2d : "+e+" in function "+t)},c.prototype.parseObject=function(){this.stream.getVarints()},c.prototype.parseString=function(){var t=this.stream;t.getVarints();var e=t.getVarints();t.skipBytes(e)},c.prototype.parsePoint=function(){this.stream.getVarints(),this.parsePointPositions()},c.prototype.parseVarintArray=function(){var t=this.stream;t.getVarints();for(var e=t.getVarints(),r=0;r<e;++r)t.getVarints()},c.prototype.parseByteArray=function(){var t=this.stream;t.getVarints();var e=t.getVarints();t.skipBytes(e)},c.prototype.parseEndOfObject=function(){var t=this.stream;t.getVarints(),t.getVarints()},c.prototype.parsePointsArray=function(t){var e=this.stream,r=(e.getVarints(),e.getVarints());if(r){r/=2;for(var n=0;n<r;++n)this.parsePointPositions()}},c.prototype.parsePoint=function(t){this.stream.getVarints(),this.parsePointPositions()},c.prototype.parseInt=function(){var t=this.stream,e=t.getVarints();switch(e){case l.st_color:case l.st_fill:t.skipUint32();break;default:t.skipUint32(),this.unhandledTypeWarning("parseInt",e)}},c.prototype.parseVoid=function(){var t=this.stream.getVarints();t===l.st_fill_off||this.unhandledTypeWarning("parseVoid",t)},c.prototype.parseVarint=function(){this.stream.getVarints(),this.stream.getVarints()},c.prototype.parseIntArray=function(){var t=this.stream;t.getVarints();for(var e=t.getVarints(),r=0;r<e;++r)t.skipUint32()},c.prototype.parseFloat=function(){var t=this.stream;t.getVarints(),t.getFloat32()},c.prototype.parseDoubleArray=function(){var t=this.stream;t.getVarints();for(var e=t.getVarints(),r=0;r<e;++r)t.skipFloat64()},c.prototype.parseCircularArc=function(){var t=this.stream;t.getVarints(),this.parsePointPositions(),t.getVarints(),t.getFloat32(),t.getFloat32()},c.prototype.parseCircle=function(){var t=this.stream;t.getVarints(),this.parsePointPositions(),t.getVarints()},c.prototype.parseArc=function(){var t=this.stream;t.getVarints(),this.parsePointPositions(),t.getVarints(),t.getVarints(),t.getFloat32(),t.getFloat32(),t.getFloat32()},c.prototype.parseDataType=function(){var t=this.stream.getVarints();switch(t){case h.dt_void:this.parseVoid();break;case h.dt_int:this.parseInt();break;case h.dt_object:this.parseObject();break;case h.dt_varint:this.parseVarint();break;case h.dt_float:this.parseFloat();break;case h.dt_point_varint:this.parsePoint();break;case h.dt_point_varint_array:this.parsePointsArray();break;case h.dt_circular_arc:this.parseCircularArc();break;case h.dt_circle:this.parseCircle();break;case h.dt_arc:this.parseArc();break;case h.dt_varint_array:this.parseVarintArray();break;case h.dt_int_array:this.parseIntArray();break;case h.dt_byte_array:this.parseByteArray();break;case h.dt_string:this.parseString();break;case h.dt_double_array:this.parseDoubleArray();break;default:this.error=!0,u.vF.error("Bad op code encountered : "+t+" , bail out.",(0,a.$f)(a.tG.BAD_DATA))}this.error||(this.frameEnd=this.stream.offset)},c.prototype.probe=function(){var t=this.stream;try{for(;t.offset<t.byteLength&&(this.parseDataType(),!this.error);)this.opCount++}catch(t){t.toString(),t.stack&&t.stack.toString()}};var f=r(2759),d=r(9861),p=!0;function m(t,e,r){var i=t.basePath+e;n.PG.getItem(t,i,r,null)}function g(t){var e,r;t.worker.postMessage({progress:.01});var i=0,s=new Uint8Array(65536),o=0,h=null;function l(t){if(s.length<t.length+o){var e=Math.max(2*s.length,t.length+o),r=new Uint8Array(e);r.set(s),s=r}s.set(t,o),o+=t.length}var g=l,v=function(t){h=t};function y(t,e,r){var n=t.worker,i=t.url,f=[],m=0,y=0;if(e&&e.assets)for(var b=e.assets,x=0;x<b.length;x++){if(-1!=i.indexOf(b[x].URI)){m=b[x].usize||0;break}"Autodesk.CloudPlatform.F2D"==b[x].type&&(y=b[x].usize||0)}0==m&&y>0&&(m=y);var w=new c,_=!0,I=0,A=!1;function O(i){if(n.postMessage({type:"F2DAssetURL",urls:f}),f=null,p){let s={type:"F2DSTREAM",finalFrame:!0,finished:!0,progress:1};return A||(s.manifest=e,s.metadata=r,s.basePath=t.basePath,s.f2dSize=m,A=!0),n.debug("Total text bytes count : "+i.length),void n.postMessage(s)}var a;if(s.length>o&&(s=new Uint8Array(s.buffer.slice(0,o))),31==s[0]&&139==s[1])try{a=new Uint8Array(s.buffer,0,o),a=(0,d.Wt)(a)}catch(t){console.error(t)}var u={type:"F2DBLOB",metadata:r,manifest:e,f2dSize:m,basePath:t.basePath,progress:1,buffer:a.buffer},c=[];c.push(a.buffer),n.postMessage(u,c)}function S(){if(p){if(_&&(_=!1,31==s[0]&&139==s[1]))return u.vF.error("F2D streaming broken by non-streaming unzip!",(0,a.$f)(a.tG.BAD_DATA)),void(p=!1);var i=new Uint8Array(s.buffer,I,o-I);try{var c=w.load(i);if(c.frameEnd>c.frameStart){var h=s.buffer.slice(I+c.frameStart,I+c.frameEnd);I+=c.frameEnd;var l=[];l.push(h);let i={type:"F2DSTREAM",frames:h,finalFrame:!1};m&&(i.progress=I/m),A||(i.manifest=e,i.metadata=r,i.f2dSize=m,i.basePath=t.basePath,A=!0),n.postMessage(i,l)}}catch(t){n.debug(t)}}}v=O,g=function(t){l(t),S()},o>0&&S(),null!=h&&O(h)}n.PG.getItem(t,t.url,(function(t){v(t)}),t.onFailureCallback,{ondata:function(t){g(t)},responseType:""}),m(t,"metadata.json.gz",(function(n){try{e=JSON.parse((0,f.xH)(n)),i++}catch(t){self.raiseError(a.tG.BAD_DATA,"")}2===i&&y(t,r,e)})),m(t,"manifest.json.gz",(function(n){try{n&&(r=JSON.parse((0,f.xH)(n))),i++}catch(t){}2===i&&y(t,r,e)}))}function v(t){t.register("STREAM_F2D",{doOperation:g})}},574:(t,e,r)=>{"use strict";r.d(e,{k:()=>N});var n=r(8983),i=r(6247),s=r(2816),o=new Float32Array(3),a=1/Math.PI,u=Math.atan2;(0,i.Gz)()||(u=function(t,e){var r=Math.abs(e),n=Math.abs(t),i=Math.min(r,n)/Math.max(r,n),s=i*i,o=((-.0464964749*s+.15931422)*s-.327622764)*s*i+i;return n>r&&(o=1.57079637-o),e<0&&(o=3.14159274-o),t<0&&(o=-o),o});var c=function(t,e,r,n,i){var s={x:e[t*n],y:e[t*n+1],z:e[t*n+2]},o={x:s.x-e[t*i],y:s.y-e[t*i+1],z:s.z-e[t*i+2]},a=r[n].next==i?r[n].prev:r[n].next;return{pos:s,next:o,prev:a<0?{x:o.x,y:o.y,z:o.z}:{x:e[t*a]-s.x,y:e[t*a+1]-s.y,z:e[t*a+2]-s.z}}},h=function(t,e,r,n,i){if("OCTM"!=t.getString(4))return null;if(5!=t.getInt32())return null;var c=t.getString(3);t.getUint8();var h={stream:null,vertices:null,indices:null,normals:null,colors:null,uvs:[],attrs:[]};h.vertexCount=t.getInt32(),h.triangleCount=t.getInt32(),h.texMapCount=t.getInt32(),h.attribMapCount=t.getInt32(),h.flags=t.getInt32(),h.comment=t.getString(t.getInt32());var l=i;h.vbstride=3,1&h.flags&&(h.vbstride+=l?1:3),h.vbstride+=2*(h.texMapCount||0),h.vbstride+=3*(h.attribMapCount||0),h.vblayout={};var f=0;if(h.vblayout.position={offset:f,itemSize:3},f+=3,1&h.flags&&(h.vblayout.normal={offset:f,itemSize:l?2:3,bytesPerItem:l?2:4,normalized:l},f+=l?1:3),h.texMapCount)for(var d=0;d<h.texMapCount;d++){var p="uv";d&&(p+=(d+1).toString()),h.vblayout[p]={offset:f,itemSize:2},f+=2}return"RAW"==c?(function(t,e,r,n,i){var s=function(){return t.getString(t.getInt32())},c=t.getString(4);if("INDX"!=c)return null;var h=e.vertexCount,l=e.triangleCount,f=e.vbstride,d=h*f,p=d+(3*l*2+3)/4|0;if(e.sharedBufferBytes=4*p,!i){var m,g,v,y,b;if(r||(r=new ArrayBuffer(4*p),n=0),m=e.vb=new Float32Array(r,n,d),e.indices=new Uint16Array(r,n+4*d,3*l),t.getIndicesArray(m.buffer,n+4*d,3*l),"VERT"!=(c=t.getString(4)))return null;if(e.vblayout.normal&&2===e.vblayout.normal.itemSize&&(g=new Uint16Array(m.buffer,m.byteOffset,m.byteLength/2)),t.getVector3Array(m,h,e.vblayout.position.offset,f),1&e.flags){if("NORM"!=(c=t.getString(4)))return null;if(g)for(o.length<3*h&&(o=new Float32Array(3*h)),t.getVector3Array(o,h,0,3),v=0,b=e.vblayout.normal.offset;v<h;v++,b+=f){var x=.5*(u(o[3*v+1],o[3*v])*a+1),w=.5*(o[3*v+2]+1);g[2*b]=65535*x|0,g[2*b+1]=65535*w|0}else t.getVector3Array(m,h,e.vblayout.normal.offset,f)}for(y=0;y<e.texMapCount;y++){if("TEXC"!=(c=t.getString(4)))return null;var _={name:s(),file:s()};e.uvs.push(_);var I="uv";y&&(I+=(y+1).toString()),t.getVector2Array(m,h,e.vblayout[I].offset,f)}var A=f-3*(e.attribMapCount||0);for(y=0;y<e.attribMapCount;y++){if("ATTR"!=(c=t.getString(4)))return null;var O,S={name:s()};if(-1!=S.name.indexOf("Color"))O="color";else{if(-1==S.name.indexOf("UVW")){e.attrs.push(S),t.getBytes(16*h);continue}O="uvw"}e.vblayout[O]={offset:A,itemSize:3};var P=[0,0,0,0];for(v=0,b=A;v<h;v++,b+=f)t.getVector4(P,0),m[b]=P[0],m[b+1]=P[1],m[b+2]=P[2];A+=3}}}(t,h,e,r,n),n||(s.s.deduceUVRepetition(h),s.s.computeBounds3D(h)),h):("MG2"==c&&console.assert(!1,"readOpenCTM_MG2(stream, mesh, dstBuffer, startOffset, estimateSizeOnly) not supported"),null)},l=function(t,e,r,n){if(r)return null;var i,o,a={vertices:null,indices:null,colors:null,normals:null,uvs:[],attrs:[],lineWidth:1};n?(e.version>1?(a.vertexCount=t.readU16(),i=t.readU16(),o=t.readU16(),e.version>2&&(a.lineWidth=t.readF32())):(a.vertexCount=t.readU32V(),i=t.readU32V(),o=t.readU32V()),a.isLines=!0):(a.vertexCount=t.readU16(),i=t.readU16(),a.pointSize=t.readF32(),a.isPoints=!0);var u=0!=t.stream.getUint8();a.vbstride=3,u&&(a.vbstride+=3),a.vblayout={};var h=0;a.vblayout.position={offset:h,itemSize:3},h+=3,u&&(a.vblayout.color={offset:h,itemSize:3}),a.vb=new Float32Array(a.vertexCount*a.vbstride);var l,f,d=a.vb,p=a.vbstride,m=t.stream;if(m.getVector3Array(d,a.vertexCount,a.vblayout.position.offset,p),u)for(l=0,h=a.vblayout.color.offset,f=a.vertexCount;l<f;l++,h+=p)d[h]=m.getFloat32(),d[h+1]=m.getFloat32(),d[h+2]=m.getFloat32(),m.getFloat32();var g=function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.length)};if(n){var v,y;e.version>1?(v=new Uint16Array(g(m.getBytes(2*i))),y=new Uint16Array(g(m.getBytes(2*o)))):(v=new Int32Array(g(m.getBytes(4*i))),y=new Int32Array(g(m.getBytes(4*o))));var b=y[o-1]-o+1;a.indices=new Uint16Array(2*b);for(var x=0,w=0;w+1<o;w++)for(var _=y[w];_+1<y[w+1];_++)a.indices[x++]=v[_],a.indices[x++]=v[_+1]}else a.indices=new Uint16Array(g(m.getBytes(2*i)));return 1!=a.lineWidth&&function(t,e,r,n,i){i=t.vbstride,t.vblayout.prev={offset:i,itemSize:3},i+=3,t.vblayout.next={offset:i,itemSize:3},i+=3,t.vblayout.side={offset:i,itemSize:1},t.vbstride+=7;var s,o,a,u,h,l=0,f=new Array(t.vertexCount);for(s=0;s<t.vertexCount;++s)f[s]={prev:-1,next:-1,prev_seg:-1};for(o=0;o<n;++o)a=2*o,u=t.indices[a],h=t.indices[a+1],f[u].next=h,f[u].prev>=0&&++l,f[h].prev=u,f[h].prev_seg=o,f[h].next>=0&&++l;var d=2*n,p=new Array(d),m=new Uint16Array(6*(n+l)),g=0;for(o=0;o<n;++o)a=2*o,u=t.indices[a],h=t.indices[a+1],p[a]=c(e,r,f,u,h),p[a+1]=c(e,r,f,h,u),u=a,h=a+1,m[g++]=2*u+1,m[g++]=2*h,m[g++]=2*u,m[g++]=2*h,m[g++]=2*h+1,m[g++]=2*u,f[u=t.indices[a]].prev>=0&&(h=2*f[u].prev_seg+1,u=a,m[g++]=2*h,m[g++]=2*u,m[g++]=2*h+1,m[g++]=2*u+1,m[g++]=2*u,m[g++]=2*h);t.indices=m;var v=2*d;t.vb=new Float32Array(v*t.vbstride),i=t.vblayout.position.offset;for(var y=0;y<d;++y)for(var b=0;b<2;++b)t.vb[i]=p[y].pos.x,t.vb[i+1]=p[y].pos.y,t.vb[i+2]=p[y].pos.z,i+=e,t.vb[i]=p[y].prev.x,t.vb[i+1]=p[y].prev.y,t.vb[i+2]=p[y].prev.z,i+=3,t.vb[i]=p[y].next.x,t.vb[i+1]=p[y].next.y,t.vb[i+2]=p[y].next.z,i+=3,t.vb[i]=b?-1:1,i+=1;t.vertexCount=v,t.isWideLines=!0}(a,p,d,b,h),s.s.computeBounds3D(a),a},f=function(t,e,r){return l(t,e,r,!0)},d=function(t,e,r){return l(t,e,r,!1)};function p(t,e,r){var n=t.seekToEntry(e);return n?"Autodesk.CloudPlatform.OpenCTM"==n.entryType?h(t.stream,r.dstBuffer,r.startOffset,r.estimateSizeOnly,r.packNormals):"Autodesk.CloudPlatform.Lines"==n.entryType?f(t,n,r.estimateSizeOnly):"Autodesk.CloudPlatform.Points"==n.entryType?d(t,n,r.estimateSizeOnly):null:null}var m,g,v,y,b,x,w,_,I,A=r(7480),O=r(1136),S=r(6118);function P(t){return t.vb?t.vb.length/t.vbstride:t.attributes.position?t.attributes.position.array.length/3:0}function k(t){const e=t.attributes;let r,n,i;if(t.vblayout){if(!t.vblayout.position)return{positions:void 0,poffset:void 0};i=t.vblayout.position.offset}else{if(!e.position)return{positions:void 0,poffset:void 0};i=e.position.offset||0}return r=t.vb||e.position.array,n=t.vb?t.vbstride:3,{positions:r,stride:n,poffset:i}}function C(t){const e=t.attributes;let r=0,n=t.vb||e.normal&&e.normal.array,i=t.vblayout?t.vblayout.normal:e.normal||null;return i?(r=i.offset||0,r*=1):n=null,!i||i.array||3===i.itemSize&&4===i.bytesPerItem||(n=null),{normals:n,noffset:r}}var T=r(1706);const M={x:0,y:0,z:0};class E{constructor(t,e,r){this.getVertex=t,this.bbox=e,this.boxSize=this.bbox.getSize().length(),r||(r=1e-6),r>0?(this.precisionTolerance=r,this.scale=1/this.precisionTolerance):(this.precisionTolerance=-r*this.boxSize,this.scale=1/this.precisionTolerance),this.snapBaseX=this.bbox.min.x,this.snapBaseY=this.bbox.min.y,this.snapBaseZ=this.bbox.min.z,this.xymap={}}findOrAddPoint(t,e,r,n){let i,s=0|(t-this.snapBaseX)*this.scale,o=0|(e-this.snapBaseY)*this.scale,a=0|(r-this.snapBaseZ)*this.scale,u=1/0;for(let n=s-1;n<=s+1;n++){let s=this.xymap[n];if(s)for(let n=o-1;n<=o+1;n++){let o=s[n];if(o)for(let n=a-1;n<=a+1;n++){let s=o[n];if(void 0===s)continue;this.getVertex(s,M);let a=M,c=(a.x-t)*(a.x-t)+(a.y-e)*(a.y-e)+(a.z-r)*(a.z-r);c<u&&(i=s,u=c)}}}if(Math.sqrt(u)>this.precisionTolerance&&(i=void 0),void 0===i){let t=this.xymap[s];t||(t=this.xymap[s]={});let e=t[o];return e||(e=t[o]={}),e[a]=n,n}return i}}let F=new S.S,R=new S.S,z=new S.S,V=new S.S,U=new S.S;class D{constructor(t,e,r){let n=t.boundingBox||r,i=new T.K;n&&i.copy(n),this.geom=t,this.myVerts=function(t,e){var r=new Float32Array(3*P(t));return function(t,e,r){t.attributes,m||(m=new S.S,g=new S.S,new S.S),r&&(v||(v=new THREE.Matrix3),v.getNormalMatrix(r));const{positions:n,stride:i,poffset:s}=k(t),{normals:o,noffset:a}=C(t);if(n)for(var u=P(t),c=s,h=a,l=0;l<u;l++,c+=i,h+=i)m.set(n[c],n[c+1],n[c+2]),r&&m.applyMatrix4(r),o&&(g.set(o[h],o[h+1],o[h+2]),r&&g.applyMatrix3(v)),e(m,o?g:null,null,l)}(t,(function(t,n,i,s){e&&e.expandByPoint(t),r[3*s]=t.x,r[3*s+1]=t.y,r[3*s+2]=t.z})),r}(t,n?null:i);let s=new E(this.getV.bind(this),i,-1/65536);this.remap=new Array(P(t));for(let t=0,e=0;t<this.myVerts.length;t+=3,e++)this.remap[e]=s.findOrAddPoint(this.myVerts[t],this.myVerts[t+1],this.myVerts[t+2],e);e&&function(t,e){let r=new S.S;for(let n=0;n<t.length;n+=3)r.x=t[n],r.y=t[n+1],r.z=t[n+2],r.applyMatrix4(e),t[n]=r.x,t[n+1]=r.y,t[n+2]=r.z}(this.myVerts,e)}getV(t,e){e.x=this.myVerts[3*t],e.y=this.myVerts[3*t+1],e.z=this.myVerts[3*t+2]}getNormal(t,e,r,n){this.getV(t,F),this.getV(e,R),this.getV(r,z),R.sub(F),z.sub(F),R.cross(z),n.copy(R).normalize()}}function L(t,e,r,n){if("isLines"in t&&t.isLines||"indexlines"in t||"iblines"in t)return;let i=new D(t,e,r);var s={},o=[];function a(t,e,r){var a=i.remap[t],u=i.remap[e],c=i.remap[r];if(a!==u&&a!==c&&u!==c){var h=!1;if(a>u){var l=a;a=u,u=l,h=!0}var f=s[a];if(f){var d=f[u];if(void 0===d)f[u]=h?-r-1:r;else{if(n)o.push(t),o.push(e);else{i.getNormal(t,e,r,V),d<0?i.getNormal(u,a,i.remap[-d-1],U):i.getNormal(a,u,i.remap[d],U);var p=V.dot(U);Math.abs(p)<.25&&(o.push(t),o.push(e))}delete f[u]}}else s[a]={},s[a][u]=r}}for(var u in function(t,e){var r,n,i;y||(y=new S.S,b=new S.S,x=new S.S,w=new S.S,_=new S.S,I=new S.S);const{positions:s,stride:o,poffset:a}=k(t),{normals:u,noffset:c}=C(t),h=function(t){return t.ib||t.indices||(t.index?t.index.array:null)}(t);if(s)if(h){var l=t.groups;l&&0!==l.length||(l=[{start:0,count:h.length,index:0}]);for(var f=0,d=l.length;f<d;++f)for(var p=l[f].start,m=l[f].count,g=l[f].index,v=p,A=p+m;v<A;v+=3){var O=(r=g+h[v])*o+a,T=(n=g+h[v+1])*o+a,M=(i=g+h[v+2])*o+a;if(y.x=s[O],y.y=s[O+1],y.z=s[O+2],b.x=s[T],b.y=s[T+1],b.z=s[T+2],x.x=s[M],x.y=s[M+1],x.z=s[M+2],u){var E=r*o+c,F=n*o+c,R=i*o+c;w.x=u[E],w.y=u[E+1],w.z=u[E+2],_.x=u[F],_.y=u[F+1],_.z=u[F+2],I.x=u[R],I.y=u[R+1],I.z=u[R+2],e(y,b,x,r,n,i,w,_,I,v/3)}else e(y,b,x,r,n,i,null,null,null,v/3)}}else{var z=P(t);for(v=0;v<z;v+=3)O=(r=v)*o+a,T=(n=v+1)*o+a,M=(i=v+2)*o+a,y.x=s[O],y.y=s[O+1],y.z=s[O+2],b.x=s[T],b.y=s[T+1],b.z=s[T+2],x.x=s[M],x.y=s[M+1],x.z=s[M+2],u?(E=r*o+c,F=n*o+c,R=i*o+c,w.x=u[E],w.y=u[E+1],w.z=u[E+2],_.x=u[F],_.y=u[F+1],_.z=u[F+2],I.x=u[R],I.y=u[R+1],I.z=u[R+2],e(y,b,x,r,n,i,w,_,I,v/3)):e(y,b,x,r,n,i,null,null,null,v/3)}}(t,(function(t,e,r,n,i,s){a(n,i,s),a(i,s,n),a(s,n,i)})),s)for(var c in s[u])o.push(parseInt(u)),o.push(parseInt(c));o.length<2||(t.iblines=new Uint16Array(o.length),t.iblines.set(o))}function j(t){var e=t.worker,r={skipAssetCallback:t.skipAssetCallback};O.PG.getItem(t,t.url,(function(r){e.postMessage({url:t.url,workerId:t.workerId,progress:.5}),function(t,e){try{e()}catch(e){t.raiseError(A.tG.BAD_DATA,"Unhandled exception while reading pack file",{url:t.url,exception:e.toString(),stack:e.stack})}}(t,(function(){var i,s,o=new n.J(r),a=!1,u={estimateSizeOnly:!0,packNormals:void 0===t.packNormals||t.packNormals},c=o.getEntryCounts(),h=t.inMemory||[],l=0,f=function(t){var e=h[t>>5];return!(e&&e&1<<(31&t))};for(i=0;i<c;i++)f(i)&&(l+=(s=p(o,i,u))&&s.sharedBufferBytes||0);var d=l?new ArrayBuffer(l):null,m=0,g={packId:t.packId,workerId:t.workerId,progress:1,meshes:[],sharedBuffer:d},v=d?[d]:[];for(u={dstBuffer:d,startOffset:0,estimateSizeOnly:!1,packNormals:void 0===t.packNormals||t.packNormals},i=0;i<c;i++)u.startOffset=m,f(i)&&((s=p(o,i,u))?(m+=s.sharedBufferBytes||0,g.meshes[i]=s,t.createWireframe&&(L(s),s.iblines&&v.push(s.iblines.buffer))):(a||(e.raiseError(A.tG.BAD_DATA,"Unable to load geometry",{url:t.url}),a=!0),e.postMessage(g)));e.postMessage(g,v)}))}),t.onFailureCallback,r)}function N(t){t.register("LOAD_GEOMETRY",{doOperation:j})}},3484:(t,e,r)=>{"use strict";r.d(e,{k:()=>h});var n=r(1136),i=r(5468),s=r(1706);function o(t,e){this.min.x=t[e],this.min.y=t[e+1],this.min.z=t[e+2],this.max.x=t[e+3],this.max.y=t[e+4],this.max.z=t[e+5]}function a(t,e){t[e]=this.min.x,t[e+1]=this.min.y,t[e+2]=this.min.z,t[e+3]=this.max.x,t[e+4]=this.max.y,t[e+5]=this.max.z}function u(t,e){var r=t[1]<<8|t[0];r||(r=28),this.boxStride=r/4,this.count=t.byteLength/r-1;let n=e.globalOffset||{x:0,y:0,z:0},i=e.fragmentTransformsOffset||{x:0,y:0,z:0};if(this.count){this.boxes=new Float32Array(t.buffer,r),this.flags=new Int32Array(t.buffer,r);var u=this.boxes;if(e.placementTransform){var c=new s.K,h=0;for(let t=0;t<this.count;t++,h+=this.boxStride)o.call(c,u,h),c.min.x+=i.x,c.min.y+=i.y,c.min.z+=i.z,c.max.x+=i.x,c.max.y+=i.y,c.max.z+=i.z,c.applyMatrix4(e.placementWithOffset),a.call(c,u,h)}else{var l=i.x-n.x,f=i.y-n.y,d=i.z-n.z;for(let t=0,e=0;t<this.count;t++,e+=this.boxStride)u[e]+=l,u[e+1]+=f,u[e+2]+=d,u[e+3]+=l,u[e+4]+=f,u[e+5]+=d}}this.hasPolygonCounts=!0,this.wantSort=!!e.wantSort}function c(t){t.fragments_extra&&function(t,e,r,i){n.PG.getItem(t,e,i,t.onFailureCallback,{responseType:"arraybuffer"})}(t,t.fragments_extra,0,(function(e){if(e&&e.length){var r=new u(e,t);if(r.count){var n=new i.iD(null,null,r);n.build(t.bvhOptions);var s={nodes:n.nodes.getRawData(),primitives:n.primitives};t.worker.postMessage({bvh:s,boxes:r.boxes,boxStride:r.boxStride},[s.nodes,s.primitives.buffer,r.boxes.buffer])}}}))}function h(t){t.register("LOAD_OTG_BVH",{doOperation:c})}u.prototype.getCount=function(){return this.count},u.prototype.isTransparent=function(t){return!!(16777216&this.flags[t*this.boxStride+6])},u.prototype.getPolygonCount=function(t){return 16777215&this.flags[t*this.boxStride+6]}},2637:(t,e,r)=>{"use strict";r.d(e,{k:()=>E});var n=r(1136),i=r(6247);const s="otg",o="otg-content",a="otg-lru",u=25e4;class c{constructor(t){this.db=null,this.readTransaction=null,this.loaded=!1,this.opening=!1,this.dbDisabled=this._isDbDisabled(t),!(0,i.Gz)()&&this.dbDisabled&&console.log("IndexedDb disabled"),this.storeName=o,this.storeNameTimestamp=a,this.bothStoreNames=[this.storeName,this.storeNameTimestamp],this.pendingTimestampUpdates={},this.pendingTimestampCount=0,this.pendingStores=[],this._pendingCallbacks=[]}_isDbDisabled(t){return t||(0,i.Gz)()||(0,i.nr)()||(0,i.Xb)()||"undefined"==typeof indexedDB}notifyPendingCallbacks(t){this._pendingCallbacks.forEach((e=>e(t,this.db))),this._pendingCallbacks=[]}open(t){if(this.dbDisabled)return void(t&&t());if(this.loaded)return void(t&&t(null,this.db));if(t&&this._pendingCallbacks.push(t),this.opening)return;this.opening=!0;let e=indexedDB.open(s,1);e.onerror=t=>{console.error("Failed to open or create cache database."),this.dbDisabled=!0,this.notifyPendingCallbacks(t)},e.onsuccess=t=>{this.opening=!1,this.db=t.target.result,this.db.onerror=function(t){console.error("Database error",t)},this.loaded=!0,this.notifyPendingCallbacks()},e.onupgradeneeded=t=>{console.log("Db upgrade",this.storeName);let e=t.target.result;e.createObjectStore(o),e.createObjectStore(a).createIndex(a+"-index","t",{unique:!1})}}deleteOld(t){if(!this.db)return void t();if(this.deleteInProgress)return;this.deleteInProgress=!0;let e=IDBKeyRange.upperBound(Date.now()-3e5,!0),r=[];this.db.transaction([this.storeNameTimestamp]).objectStore(this.storeNameTimestamp).index(this.storeNameTimestamp+"-index").openCursor(e).onsuccess=e=>{let n=e.target.result;if(n&&r.length<200)return r.push(n.primaryKey),void n.continue();if(r.length){console.log("Deleting old objects.",r.length);let e=this.db.transaction(this.bothStoreNames,"readwrite");e.oncomplete=e=>{this.deleteInProgress=!1,console.log("Delete done"),t&&t()},e.onerror=t=>{this.deleteInProgress=!1,console.error("Transaction error.",t)},e.onabort=t=>{this.deleteInProgress=!1;let e=t.target.error;console.log("Failed to delete cached objects",e)};let n=e.objectStore(this.storeName),i=e.objectStore(this.storeNameTimestamp);for(let t=0;t<r.length;t++)n.delete(r[t]),i.delete(r[t])}}}flush(t){if(this.pendingStores.length){if(!this.writeTransaction){let e=this.db.transaction(this.bothStoreNames,"readwrite");t&&(e.oncomplete=e=>{t()}),e.onerror=e=>{console.error("Transaction error.",e),t&&t(e.target.error)},e.onabort=e=>{"QuotaExceededError"===e.target.error.name&&this.deleteOld((()=>{})),t&&t(e.target.error)},this.writeTransaction=e}for(var e=0;e<this.pendingStores.length;e+=2){var r=this.pendingStores[e],n=this.pendingStores[e+1];this.writeTransaction.objectStore(this.storeName).put(n,r).onerror=t=>{console.error("Object store error.",t)},this.writeTransaction.objectStore(this.storeNameTimestamp).put({t:Date.now()},r)}this.pendingStores=[],this.writeTransaction=null}else t&&t()}store(t,e,r){this.db?(e=e.slice(),this.pendingStores.push(t),this.pendingStores.push(e),this.pendingStores.length<200||this.deleteInProgress?r&&r():this.flush(r)):r&&r()}flushTimestamps(t){let e=this.db.transaction([this.storeNameTimestamp],"readwrite");t&&(e.oncomplete=e=>{t()}),e.onerror=e=>{console.error("Transaction error.",e),t&&t(e.target.error)},e.onabort=e=>{"QuotaExceededError"===e.target.error.name&&(console.log("Quota exceeded"),this.deleteOld((()=>{}))),t&&t(e.target.error)};let r=e.objectStore(this.storeNameTimestamp);for(let t in this.pendingTimestampUpdates)r.put({t:this.pendingTimestampUpdates[t]},t);this.pendingTimestampUpdates={},this.pendingTimestampCount=0}_createReadTransaction(){let t=this.readTransaction=this.db.transaction(this.storeName);t.oncomplete=t=>{this.readTransaction=null},t.onerror=t=>{console.error("Transaction error.",t),this.readTransaction=null},t.onabort=t=>{console.warn("Transaction abort",t),this.readTransaction=null}}get(t,e){if(this.opening)return console.error("Tried to get IndexedDb resource while database was still opening"),void e(-1,null);if(!this.db)return void e(-1,null);let r;this.readTransaction||this._createReadTransaction();try{r=this.readTransaction.objectStore(this.storeName).get(t)}catch(e){this._createReadTransaction(),r=this.readTransaction.objectStore(this.storeName).get(t)}r.onsuccess=r=>{if(!r.target.result)return void e(-1,null);let n=r.target.result;e(null,n),this.pendingTimestampUpdates[t]=Date.now(),this.pendingTimestampCount++},r.onerror=t=>{e(t.target.errorCode)}}flushStoresAndTimestamps(){this.db&&this.flush((t=>{t||this.flushTimestamps()}))}size(t){if(!this.db)return void t();let e=0,r=0,n=this.db.transaction([this.storeName]).objectStore(this.storeName).openCursor();n.onsuccess=n=>{let i=n.target.result;if(i){let t=i.value;e+=t.length,r++,i.continue()}else t(null,{size:e,items:r})},n.onerror=function(e){t(e)}}estimateCachedHashCount(t){if(this.opening)return console.error("Tried to get IndexedDb resource while database was still opening"),void t(void 0);if(!this.db)return void t(void 0);let e,r=this.db.transaction(this.storeNameTimestamp);try{e=r.objectStore(this.storeNameTimestamp).openKeyCursor()}catch(e){return void t(void 0)}let n=2;e.onsuccess=e=>{const i=e.target.result;if(i)if(--n>0)i.advance(999);else{const e=i.key.charCodeAt(0);t(65536e3/e),r.abort()}else t(2==n?0:1==n?1e3:void 0)},e.onerror=e=>{t(void 0)}}readAllCachedHashes(t){if(this.opening)return console.error("Tried to get IndexedDb resource while database was still opening"),void t([]);if(!this.db)return void t([]);let e,r=this.db.transaction(this.storeNameTimestamp);try{e=r.objectStore(this.storeNameTimestamp).getAllKeys()}catch(e){return void t([])}e.onsuccess=e=>{t(e.target.result)},e.onerror=e=>{t([])}}}var h=r(8914),l=r(9861),f=r(3314),d=r(4318);r(6916);(class{MAX_SIZE=2e3;#t=0;totalBytes=0;head;tail;get count(){return this.#t}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2e3,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t,e)=>this.count>this.MAX_SIZE;this.MAX_SIZE=t,this.trimEval=e}clear(){this.#t=0,this.totalBytes=0,this.head=null,this.tail=null}onReceived(t,e){this.addNode(new p(t),e)}addNode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;for(0===this.#t?this.head=t:1===this.#t?(this.tail=t,this.head.setNext(t)):(this.tail.setNext(t),this.tail=t),this.#t+=e;this.trimEval(this.head,this.tail);){var r;const t=this.head.next;this.head.unlink(),this.totalBytes-=this.head.size,this.#t-=(null===(r=this.head.data)||void 0===r?void 0:r.count)||1,this.head=t}this.totalBytes+=t.size}}).prototype[Symbol.iterator]=function*(){let t=this.tail;for(;t;)yield t,t=t.prev};class p{data;size=0;prev;next;timestamp;constructor(t){this.data=t,t.size&&(this.size=t.size),this.timestamp=Date.now()}setNext(t){return this.next=t,t&&(this.next.prev=this),this}setPrev(t){return this.prev=t,t&&(this.prev.next=this),this}unlink(){var t,e;null===(t=this.prev)||void 0===t||t.setNext(this.next),null===(e=this.next)||void 0===e||e.setPrev(this.prev),this.prev=null,this.next=null}}const m=2,g=20,v=400;function y(t){return t.worker.ctx||(t.worker.ctx={otgws:[],localDbCache:null,opfsCache:null,numRequests:0,pendingForNetwork:[],_pendingGeomHashes:[],_pendingGeoms:[],_pendingFromCache:[],_pendingTransferList:[],_requestsSent:0,_requestsReceived:0,decoderPorts:[],nextPortIndex:0,analyticsForHttpFallbackSent:!1}),t.worker.ctx}function b(t){var e=y(t);if(!t.disableWebSocket){const r=(e,r,n,i)=>I(t,e,r,n,!1,i),n=(e,r,n)=>function(t,e,r,n){t.raiseError(null,n,{hash:e,resourceType:r}),O(t)}(t,e,r,n),i=e=>function(t,e){for(const[r,n]of e)t.queryParams=n.queryParams,S(t,[r],[n.url],[n.lineageUrn],n.type)}(t,e);for(let s=0;s<m;s++)e.otgws.push(new f.f(t.otg_ws,t.queryParams,t.headers,r,n,i))}if(t.useOpfs){const r=(e,r)=>{t.worker.postMessage({event:e,properties:r})};e.opfsCache=new h.x(r),t.clearIndexedDbIfItsLarge&&async function(){if(!indexedDB.databases)return;if(await new Promise((t=>setTimeout(t,2e4))),!(await indexedDB.databases()).find((t=>{let{name:e}=t;return e===s})))return;let t=indexedDB.open(s,1);t.onerror=t=>{console.error("Failed to open cache database for cleanup.",t)},t.onsuccess=t=>{const e=t.target.result,r=e.transaction(o).objectStore(o).count();r.onsuccess=t=>{if(t.target.result>u){console.log("OPFS cache is enabled and the old IndexedDb cache is taking up storage space. Deleting IndexedDb cache."),e.close();const t=indexedDB.deleteDatabase(s);t.onsuccess=()=>{console.log("IndexedDb cache deleted")},t.onerror=t=>{console.error("Failed to delete IndexedDb cache",t)}}},r.onerror=t=>{console.error("Failed to get count from IndexedDb",t)}}}()}else e.localDbCache=new c(t.disableIndexedDb),e.localDbCache.open(null);e.decoderPorts=t.ports}function x(t){var e=y(t);for(const r of e.otgws)r.addAuthorizeUrn(t.modelUrn);t.useOpfs&&e.opfsCache.open(t.lineageUrn),e.flushMessages||(e.flushMessages=setInterval((()=>{!function(t){var e=y(t);if(0===e.pendingForNetwork.length)return;let r=[],i=0,s=0;for(const t of e.otgws){var o;t.hasPermanentError||i++,(null===(o=t.ws)||void 0===o?void 0:o.readyState)===d.STATE.OPEN?(r.push(t),s+=t.inFlightRequests.size):t._openWebSocket()}if(0===i){e.analyticsForHttpFallbackSent||(e.analyticsForHttpFallbackSent=!0,t.worker.postMessage({event:"OTG_FALLBACK_TO_HTTP",properties:{wsStates:e.otgws.map((t=>{var e;return null===(e=t.ws)||void 0===e?void 0:e.readyState})),wsLastErrorNumInFlight:e.otgws.map((t=>t.lastErrorNumInFlight)),wsLastErrorReasons:e.otgws.map((t=>{var e;return null===(e=t.lastError)||void 0===e?void 0:e.reason})),wsLastErrorCodes:e.otgws.map((t=>{var e;return null===(e=t.lastError)||void 0===e?void 0:e.code}))}}));for(const[r,i,s,o,a]of e.pendingForNetwork)t.queryParams=a,n.PG.getItem(t,i,(e=>I(t,[r],[s],[e],!1,o)),w(t,r,o),{responseType:"arraybuffer",withCredentials:!0});return void(e.pendingForNetwork=[])}if(r.length<=0)return;const a=r.sort(((t,e)=>t.inFlightRequests.size-e.inFlightRequests.size));let u=e.pendingForNetwork.length,c=a[0].inFlightRequests.size;for(let t=1;t<a.length;t++){const e=a[t].inFlightRequests.size-c;if(u-=e*t,c+=e,u<=0){a.length=t;break}}c+=Math.ceil(u/a.length);const h=s+e.pendingForNetwork.length;c=Math.min(c,Math.ceil(h/i));for(let t=a.length-1;t>=0;t--){const r=a[t],n=c-r.inFlightRequests.size;if(!(n<g)||0==t&&h<v){for(const[t,i,s,o,a]of e.pendingForNetwork.splice(0,n))r.requestResource(i,s,t,o,a);r._flushSendQueue()}else c+=Math.ceil(n/t)}}(t),A(t)}),25))}function w(t,e,r){var i={raiseError:function(n,i,s){s.hash=e,s.resourceType=r,t.raiseError(n,i,s)}};return function(){n.PG.defaultFailureCallback.apply(i,arguments),O(t)}}function _(t){return 31===t[0]&&139===t[1]}function I(t,e,r,n,i,s){const o=y(t);if(!i)if(o.opfsCache)o.opfsCache.store(e,r,n);else for(let t=0;t<e.length;t++){var a;const r=e[t];let i=n[t];_(i)||(i=(0,l.u3)(i)),null===(a=o.localDbCache)||void 0===a||a.store(r,i)}if("m"===s){const t=o.decoderPorts[o.nextPortIndex];o.nextPortIndex=++o.nextPortIndex%o.decoderPorts.length,t.postMessage({operation:"DECODE_MATERIALS",hashes:e,arrays:n},[n[0].buffer])}else{for(let t=0;t<e.length;t++){const r=e[t],s=n[t];o._pendingGeomHashes.push(r),o._pendingGeoms.push(s),o._pendingFromCache.push(i),0!==t&&s.buffer===n[0].buffer||o._pendingTransferList.push(s.buffer)}o._pendingGeomHashes.length>50&&A(t)}O(t,e.length)}function A(t){var e=y(t);if(!e._pendingGeomHashes.length)return;const r=e.decoderPorts[e.nextPortIndex];e.nextPortIndex=++e.nextPortIndex%e.decoderPorts.length,r.postMessage({operation:"DECODE_GEOMETRIES",hashes:e._pendingGeomHashes,arrays:e._pendingGeoms,fromCache:e._pendingFromCache},e._pendingTransferList),e._pendingGeomHashes=[],e._pendingGeoms=[],e._pendingFromCache=[],e._pendingTransferList=[]}function O(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const r=y(t);r.numRequests-=e,r._requestsReceived+=e,!r.flushCacheAndDisconnectRequested||r.numRequests||r._pendingGeomHashes.length||(function(t){var e,r,n=y(t);(n.numRequests||n._pendingGeomHashes.length)&&(console.error("OtgLoadWorker disconnect requested even though there are requests in flight"),A(t));for(const t of n.otgws)t.closeWebSocket();clearInterval(n.flushMessages),n.flushMessages=null,null===(e=n.localDbCache)||void 0===e||e.open((()=>n.localDbCache.flushStoresAndTimestamps())),null===(r=n.opfsCache)||void 0===r||r.close()}(t),r.flushCacheAndDisconnectRequested=!1)}function S(t,e,r,n,i,s){var o=y(t);if(o._requestsSent+=e.length,o.opfsCache)o.opfsCache.get(e,n).then((s=>{for(let a=0;a<e.length;a++){const u=e[a],c=r[a],h=n[a],l=s[a];l?I(t,[u],[h],[l],!0,i):o.pendingForNetwork.push([u,c,h,i,t.queryParams])}}));else if(o.localDbCache)for(let n=0;n<r.length;n++){const a=e[n],u=r[n];!s||s[n]?o.localDbCache.open((()=>o.localDbCache.get(a,(function(e,r){r?I(t,[a],[""],[r],!0,i):o.pendingForNetwork.push([a,u,"",i,t.queryParams])})))):o.pendingForNetwork.push([a,u,"",i,t.queryParams])}}function P(t){var e=y(t);S(t,t.hashes,t.urls,t.lineageUrns,t.type,t.couldBeInCache),e.numRequests+=t.urls.length}function k(t){y(t).flushCacheAndDisconnectRequested=!0,O(t,0)}function C(t){const e=y(t);if(!(t.count<=e.otgws.length))for(let r=e.otgws.length;r<t.count;r++)e.otgws.push(e.otgws[0].clone(!1))}async function T(t){var e,r=y(t);await(null===(e=r.opfsCache)||void 0===e?void 0:e.clear()),console.log("OPFS cache cleared")}function M(t){var e=y(t);const r={sent:e._requestsSent,received:e._requestsReceived,wsSent:e.otgws.map((t=>t.numRequestsSent)),wsReceived:e.otgws.map((t=>t.numRequestsReceived))};console.log("WorkerState: ",r)}function E(t){t.register("INIT_WORKER_OTG",{doOperation:b}),t.register("ADD_MODEL_OTG",{doOperation:x}),t.register("LOAD_CDN_RESOURCE_OTG",{doOperation:P}),t.register("FLUSH_CACHE_AND_DISCONNECT_OTG",{doOperation:k}),t.register("CLEAR_OPFS_CACHE",{doOperation:T}),t.register("REPORT_LOADING_STATE",{doOperation:M}),t.register("SET_OTGWS_COUNT",{doOperation:C})}},6324:(t,e,r)=>{"use strict";r.d(e,{k:()=>$});var n=r(1136),i=r(2759);function s(t,e){let r,n=0,i=t.length-1;for(;n<=i;){if(r=(n+i)/2|0,e===t[r])return r;e<t[r]?i=r-1:n=r+1}return-1}var o={Unknown:0,Boolean:1,Integer:2,Double:3,Float:4,BLOB:10,DbKey:11,String:20,LocalizableString:21,DateTime:22,GeoLocation:23,Position:24},a={afHidden:1,afDontIndex:2,afDirectStorage:4,afReadOnly:8},u={Dimensions:["Perimeter","Volume","Area","Length","Width","Height"]},c={Item:["Source File"]};function h(t){var e,r,n,h,l,f,d,p,m,g,v,y,b,x,w,_,I,A=this,O=!1,S=!1;let P={};for(var k in t.attrs){"pdb version 2"===(e=(0,i.TN)(t.attrs[k]))[0]&&(O=!0);for(var C=1;C<e.length;C++){switch("Layer"===e[C][0]&&(w=C),e[C][1]){case"__parent__":m=C;break;case"__child__":p=C;break;case"__name__":g=C;break;case"__instanceof__":v=C;break;case"__viewable_in__":y=C;break;case"__externalref__":b=C;break;case"__node_flags__":x=C}O&&e[C][2]===o.DbKey&&(e[C][6]=e[C][6]|a.afDirectStorage)}break}for(let e in t.avs){let r=t.avs[e];r[0]==="[".charCodeAt(0)?n=(0,i.GB)(t.avs[e],0):(n=r,S=!0),delete t.avs;break}for(let e in t.offsets){let s=t.offsets[e];s[0]==="[".charCodeAt(0)?(r=(0,i.GB)(s,1))[r.length-1]=n.length/2:r=new Int32Array(s.buffer,s.byteOffset,s.byteLength/4),delete t.offsets;break}for(let e in t.values){h=t.values[e],l=(0,i.Pd)(h);break}this.setIdsBlob=function(t){f=t,d=(0,i.Pd)(t)};for(let e in t.ids){this.setIdsBlob(t.ids[e]);break}function T(t){for(var e={},r=0,n=t.length;r<n;r++){var i=t[r];Array.isArray(i)||(i=[i]);for(var s=0;s<i.length;s++){var o=i[s],a=e[o];void 0===a?e[o]=r:Array.isArray(a)?a.push(r):e[o]=[a,r]}}return e}this.getObjectCount=function(){return r.length-1},this.getValueAt=function(t){return(0,i.$d)(h,l[t])},this.getIntValueAt=function(t){return(0,i._f)(h,l[t])},this.getIdAt=function(t){return(0,i.$d)(f,d[t])},this.externalIdsLoaded=function(){return Boolean(f)},this.getAttrValue=function(t,r,n){var i=e[t];return i[6]&a.afDirectStorage&&i[2]===o.DbKey?r:n?this.getIntValueAt(r):this.getValueAt(r)},this._getObjectProperty=function(t,r){var n=e[t],i=n[5]?n[5]:n[0],s=this.attributeHidden(t);return{displayName:i,displayValue:A.getAttrValue(t,r),displayCategory:n[1],attributeName:n[0],type:n[2],units:n[3],hidden:s,precision:n[7]||0}},this.getObjectProperties=function(t,r,n,i,s){var o={dbId:t,properties:[]},a=!1,u=r&&-1!==r.indexOf("externalId"),c=this.externalIdsLoaded();u&&!c&&console.error("Requesting externalID requires loading of the externalID table");var h=c&&(!r||u);if(h&&(o.externalId=this.getIdAt(t),r&&1===r.length))return o;var l=null;if(this.enumObjectProperties(t,(function(t,u){if(t!=v){var c=e[t];if(!(r&&-1===r.indexOf(c[0])&&-1===r.indexOf(c[5])||s&&-1===s.indexOf(c[1])||i&&(i.indexOf(c[0])>-1||i.indexOf(c[5])>-1)))if(t==g){var h=A.getAttrValue(t,u);a=!0,o.name=h}else{var f=A.attributeHidden(t);if(n&&f)return;var d=A._getObjectProperty(t,u);o.properties.push(d)}}else{var p=A.getObjectProperties(A.getAttrValue(t,u),r,!0,i,s);p&&p.properties&&(l=p)}})),l){var f={},d=o.properties;for(let t=0;t<d.length;t++)f[d[t].displayName]=1;o.name||(o.name=l.name);var p=l.properties;for(let t=0;t<p.length;t++)Object.prototype.hasOwnProperty.call(f,p[t].displayName)||d.push(p[t])}return s&&!o.properties.length?null:!r||o.properties.length||h||a?o:null},this.getExternalIdMapping=function(t){var e={};if(d&&"length"in d)for(var r=1,n=d.length;r<n;++r){var i=this.getIdAt(r);t&&!0!==t[i]||(e[i]=r)}return e},this.findRootNodes=function(){var t=[],e=[];return this.enumObjects((function(r){var n=!1,i=!1,s=!1;A.enumObjectProperties(r,(function(t,e){t==m?A.getAttrValue(t,e,!0)&&(i=!0):t==p?n=!0:t==g&&(s=!0)})),s&&!i&&(n?t.push(r):e.push(r))})),t.length>0?t:e},this.nodeHasChild=function(t){let e=!1;return this.enumObjectProperties(t,(function(t){if(t===p)return e=!0,!0})),e},this.getNodeNameAndChildren=function(t,e){var r,n,i=t.dbId;if(this.enumObjectProperties(i,(function(i,s){var o;if(i===m);else if(i!=p||e)i===g?t.name=A.getAttrValue(i,s):i===x?t.flags=A.getAttrValue(i,s,!0):i===v&&(n=s);else if((o=A.getAttrValue(i,s,!0))!==t.dbId){var a={dbId:o,parent:t.dbId};r?r.push(a):r=[a]}})),(!t.name||!t.flags)&&n){const e=A.getAttrValue(v,n,!0);let r=P[e];r||(P[e]=r={dbId:e,name:null,flags:null},A.getNodeNameAndChildren(r,!0)),r.name&&!t.name&&(t.name=r.name),"number"!=typeof t.flags&&"number"==typeof r.flags&&(t.flags=r.flags)}return r},this.buildDbIdToFragMap=T,this.buildObjectTree=function(t,e,r,n){var i;e&&(i=T(e)),_={},I=0;var s=this.buildObjectTreeRec(t,0,i,0,r,n);return I>0&&console.warn("Property database integrity not guaranteed ("+I+")."),_=null,P={},s},this.buildObjectTreeRec=function(t,e,r,n,i,s){if(_[t])return I++,0;_[t]=e||t,n>i[0]&&(i[0]=n);var o,a={dbId:t},u=this.getNodeNameAndChildren(a),c=[];if(u)for(var h=0;h<u.length;h++)this.buildObjectTreeRec(u[h].dbId,t,r,n+1,i,s)&&c.push(u[h].dbId);if(r){var l=r[t];void 0!==l&&(o=Array.isArray(l)?l:[l])}var f=a.flags||0;void 0===f&&(f=o&&o.length?6:(c.length,0));var d=c.length+(o?o.length:0);return d&&s.setNode(t,e,a.name,f,c,o),d},this.getSearchTerms=function(t){for(var e=(t=t.toLowerCase()).match(/"[^"]+"|[^\s]+/g)||[],r=e.length;r--;)e[r]=e[r].replace(/"/g,"");var n=[];for(r=0;r<e.length;r++)e[r].length>1&&n.push(e[r]);return n},this.bruteForceSearch=function(t,r,n){const i=this.getSearchTerms(t);if(0===i.length)return[];var o=[];const a=null==n?void 0:n.searchHidden,u=null==n?void 0:n.includeInherited,c={};for(let t=0;t<i.length;t++){for(var h=[],f=[],d=0,p=l.length;d<p;d++){var m=this.getValueAt(d);null!==m&&-1!==m.toString().toLowerCase().indexOf(i[t])&&f.push(d)}0!==f.length?(f.sort((function(t,e){return t-e})),this.enumObjects((function(t){A.enumObjectProperties(t,(function(n,i){if(u&&n===v){const e=parseInt(A.getAttrValue(n,i));c[e]=c[e]||[],c[e].push(t)}if((a||!A.attributeHidden(n))&&-1!==s(f,i)){if(r&&r.length&&-1===r.indexOf(e[n][0]))return;return h.push(t),!0}}))})),o.push(h)):o.push(h)}const g=(t,e)=>{const r=new Set(t);for(let n=0;n<t.length;++n){const i=t[n];if(!(i in e))continue;const s=e[i];for(let e=0;e<s.length;++e){const n=s[e];r.has(n)||(t.push(n),r.add(n))}}};if(1===o.length)return u&&g(o[0],c),o[0];var y={},b=o[0];for(let t=0;t<b.length;t++)y[b[t]]=1;for(let t=1;t<o.length;t++){b=o[t];var x={};for(let t=0;t<b.length;t++)1===y[b[t]]&&(x[b[t]]=1);y=x}h=[];for(let t in y)h.push(parseInt(t));return u&&g(h,c),h},this.bruteForceFind=function(t){var r=[];return this.enumObjects((function(n){var i=!1;A.enumObjectProperties(n,(function(r){var n=e[r],s=n[0],o=n[5];if(s===t||o===t)return i=!0,!0})),i&&r.push(n)})),r},this.getLayerToNodeIdMapping=function(){var t={};return this.enumObjects((function(e){A.enumObjectProperties(e,(function(r,n){if(r==w){var i=A.getAttrValue(r,n);return Array.isArray(t[i])||(t[i]=[]),t[i].push(e),!0}}))})),t},this.getAttributeDef=function(t){var r=e[t];return{name:r[0],category:r[1],dataType:r[2],dataTypeContext:r[3],description:r[4],displayName:r[5],flags:r[6],precision:r.length>7?r[7]:0}},this.enumAttributes=function(t){for(var r=1;r<e.length&&!t(r,this.getAttributeDef(r),e[r]);r++);},this.enumObjectProperties=S?function(t,e){let i=r[t],s=r[t+1],o=n,a=0;for(;i<s;){let t=o[i++],r=127&t,n=7;for(;128&t;)t=o[i++],r|=(127&t)<<n,n+=7;for(a+=r,t=o[i++],r=127&t,n=7;128&t;)t=o[i++],r|=(127&t)<<n,n+=7;if(e(a,r))break}}:function(t,e){let i=2*r[t],s=2*r[t+1];for(let t=i;t<s&&!e(n[t],n[t+1]);t+=2);};let M={};function E(t,e,i){let s=r[t],o=r[t+1],a=n,u=[],c=[];i=i||{};let h=0;for(;s<o;){let t=a[s++],r=127&t,n=7;for(;128&t;)t=a[s++],r|=(127&t)<<n,n+=7;for(h+=r,t=a[s++],r=127&t,n=7;128&t;)t=a[s++],r|=(127&t)<<n,n+=7;if(h===v){let t=A.getAttrValue(h,r);c.push(t)}else e&&!e[h]||(i[h]=r,u.push(h),u.push(r))}for(let t=0;t<c.length;t++){let r=c[t],n=M[r];n||(M[r]=n=E(r));for(let t=0;t<n.length;t+=2){let r=n[t],s=n[t+1];e&&!e[r]||i[r]||A.attributeHidden(r)||(i[r]=s,u.push(r),u.push(s))}}return u}this.getPropertiesSubsetWithInheritance=S?E:function(t,e,i){let s=2*r[t],o=2*r[t+1],a=[],u=[];i=i||{};for(let t=s;t<o;t+=2){let r=n[t],s=n[t+1];if(r===v){let t=A.getAttrValue(r,s);u.push(t)}else e&&!e[r]||(i[r]=s,a.push(r),a.push(s))}for(let t=0;t<u.length;t++){let r=u[t],n=M[r];n||(M[r]=n=E(r));for(let t=0;t<n.length;t+=2){let r=n[t],s=n[t+1];e&&!e[r]||i[r]||A.attributeHidden(r)||(i[r]=s,a.push(r),a.push(s))}}return a},this.findLayers=function(){var t={name:"root",id:1,index:1,children:[],isLayer:!1,childCount:0};if(void 0===w)return t;var e=[],r=this;return this.enumObjects((function(t){r.enumObjectProperties(t,(function(t,n){if(t===w){var i=r.getValueAt(n);return i&&-1===e.indexOf(i)&&e.push(i),!0}}))})),e.sort((function(t,e){return t.localeCompare(e,void 0,{sensitivity:"base",numeric:!0})})),t.childCount=e.length,t.children=e.map((function(t,e){return{name:t,index:e+1,id:e+1,isLayer:!0}})),t},this.enumObjects=function(t,e,n){var i=r.length-1;e="number"==typeof e?Math.max(e,1):1,n="number"==typeof n?Math.min(i,n):i;for(var s=e;s<n&&!t(s);s++);},this.getAttrChild=function(){return p},this.getAttrParent=function(){return m},this.getAttrName=function(){return g},this.getAttrLayers=function(){return w},this.getAttrInstanceOf=function(){return v},this.getAttrViewableIn=function(){return y},this.getAttrXref=function(){return b},this.getAttrNodeFlags=function(){return x},this.attributeHidden=function(t){return 1&e[t][6]||t==m||t==p||t==y||t==b},this._attributeIsBlacklisted=function(t){var r=e[t],n=r[0],i=r[1];return!(!Object.prototype.hasOwnProperty.call(c,i)||-1===c[i].indexOf(n))||!(!Object.prototype.hasOwnProperty.call(u,i)||-1===u[i].indexOf(n))},this._ignoreAttribute=function(t,r){var n=e[r],i=n[0],s=n[1];return t[s]&&t[s].has(i)},this.findParent=function(t){let e=null;return A.enumObjectProperties(t,(function(t,r){t===m&&(e=A.getAttrValue(t,r,!0))})),e},this._getAttributeAndValueIds=function(t,e,r){let n=this.getPropertiesSubsetWithInheritance(t),i=r&&Object.keys(r).length>=1;for(let t=0;t<n.length;t+=2){let s=n[t];this._attributeIsBlacklisted(s)||this.attributeHidden(s)||i&&this._ignoreAttribute(r,s)||e.push({attrId:s,valId:n[t+1]})}e.sort((function(t,e){return t.attrId-e.attrId}))},this.findDifferences=function(t,e,r){var n={changedIds:[]},i=e&&e.dbIds,s=e&&e.listPropChanges;s&&(n.propChanges=[]);let o=e&&e.propertyFilter||{};var a=this,u=t,c=[],h=[],l={result:[],dbId:-1},f={result:[],dbId:-1},d=function(t){var e=0,r=0;if(c.length=0,h.length=0,a._getAttributeAndValueIds(t,c,o,!0,l),u._getAttributeAndValueIds(t,h,o,!0,f),c.length&&h.length){for(var i=!1,d=void 0;e<c.length&&r<h.length;){var p=c[e],m=h[r],g=p&&p.attrId,v=p&&p.valId,y=m&&m.attrId,b=m&&m.valId;if(g!==y||v!==b){if(i=!0,!s)break;var x=void 0===y||y>g,w=void 0;void 0===g||g>y?((w=u._getObjectProperty(y,b)).displayValueB=w.displayValue,w.displayValue=void 0,r++):x?((w=a._getObjectProperty(g,v)).displayValueB=void 0,e++):((w=a._getObjectProperty(g,v)).displayValueB=A.getAttrValue(y,b),e++,r++),d||(d=[]),d.push(w)}else e++,r++}i&&(n.changedIds.push(t),s&&n.propChanges.push(d))}},p=-1,m=function(t,e){var n=Math.floor(100*t/e);n!=p&&(r&&r(n),p=n)};if(i)for(var g=0;g<i.length;g++)d(i[g]),m(g,i.length);else{var v=Math.min(a.getObjectCount(),this.getObjectCount());for(let t=1;t<v;t++)d(t),m(t,v)}return n},this.numberOfAttributes=function(){var t;return(null===(t=e)||void 0===t?void 0:t.length)??0},this.numberOfValues=function(){var t;return(null===(t=l)||void 0===t?void 0:t.length)??0},this.dtor=function(){e=null,r=null,n=null,h=null,l=null,f=null,d=null,p=0,m=0,g=0,v=0,y=0,b=0,x=0}}class l{constructor(t){t?(this.buf=t.buf,this.idx=t.idx,this.next=t.next):(this.buf=new Uint8Array(256),this.next=0,this.idx=[0])}allocate(t){if(this.buf.length-this.next<t){var e=Math.max(3*this.buf.length/2,this.buf.length+t),r=new Uint8Array(e);r.set(this.buf),this.buf=r}}add(t){if(null==t)return 0;if(!t.length)return this.idx.push(this.next),this.idx.length-1;var e=(0,i.WC)(t,null);return this.allocate(e),this.next+=(0,i.WC)(t,this.buf,this.next),this.idx.push(this.next),this.idx.length-1}get(t){if(t){var e=this.idx[t-1],r=this.idx[t];return e===r?"":(0,i.jI)(this.buf,e,r-e)}}flatten(){this.idx=p(this.idx)}}var f=5;function d(){this.nodes=[],this.nextNode=0,this.children=[],this.nextChild=0,this.dbIdToIndex={},this.names=[],this.s2i={},this.strings=new l,this.nameSuffixes=[],this.getIndex(0)}function p(t){var e=new Int32Array(t.length);return e.set(t),e}function m(t,e,r){this.nodes=t.nodes,this.children=t.children,this.dbIdToIndex=t.dbIdToIndex,this.names=t.names,this.nameSuffixes=t.nameSuffixes,this.strings=new l(t.strings),this.rootId=e,this.numNodes=this.nodes.length/f,this.visibleIds=null,this.nodeBoxes=r}function g(t){this._impl=new h(t),this.customAttrs=void 0,this.setCustomAttrs=t=>this.customAttrs=t,this._attributeIsBlacklisted=t=>this._impl._attributeIsBlacklisted(t),this._getAttributeAndValueIds=(t,e,r,n)=>this._impl._getAttributeAndValueIds(t,e,r,n),this._ignoreAttribute=t=>this._impl._ignoreAttribute(t),this.attributeHidden=t=>this._impl.attributeHidden(t),this.setIdsBlob=t=>this._impl.setIdsBlob(t),this.getObjectCount=()=>this._impl.getObjectCount(),this.getIdAt=t=>this._impl.getIdAt(t),this.externalIdsLoaded=()=>this._impl.externalIdsLoaded(),this.getExternalIdMapping=t=>this._impl.getExternalIdMapping(t),this.findRootNodes=()=>this._impl.findRootNodes(),this.nodeHasChild=t=>this._impl.nodeHasChild(t),this.getNodeNameAndChildren=(t,e)=>this._impl.getNodeNameAndChildren(t,e),this.buildDbIdToFragMap=t=>this._impl.buildDbIdToFragMap(t),this.buildObjectTree=(t,e,r,n)=>this._impl.buildObjectTree(t,e,r,n),this.buildObjectTreeRec=(t,e,r,n,i,s)=>this._impl.buildObjectTreeRec(t,e,r,n,i,s),this.getSearchTerms=t=>this._impl.getSearchTerms(t),this.bruteForceSearch=(t,e,r)=>this._impl.bruteForceSearch(t,e,r),this.bruteForceFind=t=>this._impl.bruteForceFind(t),this.getLayerToNodeIdMapping=()=>this._impl.getLayerToNodeIdMapping(),this.findLayers=()=>this._impl.findLayers(),this.enumObjects=(t,e,r)=>this._impl.enumObjects(t,e,r),this.getAttrChild=()=>this._impl.getAttrChild(),this.getAttrParent=()=>this._impl.getAttrParent(),this.getAttrName=()=>this._impl.getAttrName(),this.getAttrLayers=()=>this._impl.getAttrLayers(),this.getAttrInstanceOf=()=>this._impl.getAttrInstanceOf(),this.getAttrViewableIn=()=>this._impl.getAttrViewableIn(),this.getAttrXref=()=>this._impl.getAttrXref(),this.getAttrNodeFlags=()=>this._impl.getAttrNodeFlags(),this.findParent=t=>this._impl.findParent(t),this.findDifferences=(t,e,r)=>this._impl.findDifferences(t,e,r),this.numberOfAttributes=()=>this._impl.numberOfAttributes(),this.numberOfValues=()=>this._impl.numberOfValues(),this.dtor=()=>this._impl.dtor(),this._customAttrIdOffset=this._impl.numberOfAttributes(),this._customValueIdOffset=this._impl.numberOfValues(),this.getObjectCustomProperties=(t,e)=>{var r;return(null===(r=this.customAttrs)||void 0===r?void 0:r.getObjectProperties(t,e,this._customAttrIdOffset,this._customValueIdOffset))??[]},this.getValueAt=t=>{const e=t-this._customValueIdOffset;return e>=0?this.customAttrs.getValueAt(e):this._impl.getValueAt(t)},this.getIntValueAt=t=>{const e=t-this._customValueIdOffset;return e>=0?this.customAttrs.getValueAt(e):this._impl.getIntValueAt(t)},this.getAttrValue=(t,e,r)=>t-this._customAttrIdOffset>=0?this.customAttrs.getValueAt(e-this._customValueIdOffset):this._impl.getAttrValue(t,e,r),this._getObjectProperty=(t,e)=>{const r=t-this._customAttrIdOffset;return r>=0?this.customAttrs._getObjectProperty(r,e-this._customValueIdOffset):this._impl._getObjectProperty(t,e)},this.getObjectProperties=(t,e,r,n,i)=>{var s;const o=this._impl.getObjectProperties(t,e,r,n,i)??{};return null===(s=this.customAttrs)||void 0===s||s.enumObjectProperties(t,((t,r)=>{const s=this.customAttrs.getAttributeAt(t);e&&-1===e.indexOf(s.name)&&-1===e.indexOf(s.displayName)||i&&-1===i.indexOf(s.category)||n&&(n.indexOf(s.name)>-1||n.indexOf(s.displayName)>-1)||o.properties.push(this.customAttrs._getObjectProperty(t,r))}),0,0),o},this.getAttributeDef=t=>{const e=t-this._customAttrIdOffset;return e>=0?this.customAttrs.getAttributeAt(e):this._impl.getAttributeDef(t)},this.enumAttributes=t=>{var e;this._impl.enumAttributes(t),null===(e=this.customAttrs)||void 0===e||e.enumAttributes(t,this._customAttrIdOffset)},this.enumObjectProperties=(t,e)=>{var r;this._impl.enumObjectProperties(t,e),null===(r=this.customAttrs)||void 0===r||r.enumObjectProperties(t,e,this._customAttrIdOffset,this._customValueIdOffset)},this.getPropertiesSubsetWithInheritance=(t,e,r)=>{var n;const i=this._impl.getPropertiesSubsetWithInheritance(t,e,r);return null===(n=this.customAttrs)||void 0===n||n.enumObjectProperties(t,((t,n)=>{e&&!e[t]||(i.push(t,n),r&&(r[t]=n))}),this._customAttrIdOffset,this._customValueIdOffset),i}}d.prototype.getIndex=function(t){var e=this.dbIdToIndex[t];if(e)return e;e=this.nextNode++,this.nodes.push(t);for(var r=1;r<f;r++)this.nodes.push(0);return this.dbIdToIndex[t]=e,e},d.prototype.setNode=function(t,e,r,n,i,s){var o,a=this.getIndex(t),u=a*f,c=i.length,h=s&&s.length;for(h&&(c+=s.length),this.nodes[u+1]=e,this.nodes[u+2]=this.nextChild,this.nodes[u+3]=h?-c:c,this.nodes[u+4]=n,o=0;o<i.length;o++)this.children[this.nextChild++]=this.getIndex(i[o]);if(h)for(o=0;o<s.length;o++)this.children[this.nextChild++]=-s[o]-1;this.nextChild>this.children.length&&console.error("Child index out of bounds -- should not happen"),this.processName(a,r)},d.prototype.processName=function(t,e){var r,n,i=-1,s=-1;if(e&&(s=e.lastIndexOf("]"),-1!==(i=e.lastIndexOf("["))&&-1!==s||(i=e.lastIndexOf(":"),s=e.length)),i>=0&&s>i){r=e.slice(0,i+1);var o=e.slice(i+1,s);(n=parseInt(o,10))&&n+""===o||(r=e,n=0)}else r=e,n=0;var a=this.s2i[r];void 0===a&&(a=this.strings.add(r),this.s2i[r]=a),this.names[t]=a,this.nameSuffixes[t]=n},d.prototype.flatten=function(){this.nodes=p(this.nodes),this.children=p(this.children),this.names=p(this.names),this.nameSuffixes=p(this.nameSuffixes),this.strings.flatten(),this.s2i=null},m.prototype.dtor=function(){this.nodes=null,this.children=null,this.dbIdToIndex=null,this.names=null,this.nameSuffixes=null,this.strings=null,this.visibleIds=null,this.nodeBoxes=null},m.prototype.getNumNodes=function(){return this.numNodes},m.prototype.getIndex=function(t){return this.dbIdToIndex[t]},m.prototype.name=function(t,e){var r,n=this.dbIdToIndex[t],i=this.strings.get(this.names[n]),s=this.nameSuffixes[n];return r=s?"["===i.charAt(i.length-1)?i+s+"]":i+s:i,e&&(this.childCounts||this.computeChildCounts(),this.childCounts[t]>0&&(r+=" ("+this.childCounts[t]+")")),r},m.prototype.getParentId=function(t){var e=this.dbIdToIndex[t];return this.nodes[e*f+1]},m.prototype.getNodeFlags=function(t){var e=this.dbIdToIndex[t];return this.nodes[e*f+4]},m.prototype.setNodeFlags=function(t,e){var r=this.dbIdToIndex[t];r&&(this.nodes[r*f+4]=e)},m.prototype.getNumChildren=function(t){var e=this.dbIdToIndex[t],r=this.nodes[e*f+3];if(r>=0)return r;var n=this.nodes[e*f+2];r=Math.abs(r);for(var i=0,s=0;s<r&&!(this.children[n+s]<0);s++)i++;return i},m.prototype.getNumFragments=function(t){var e=this.dbIdToIndex[t],r=this.nodes[e*f+3];if(r>=0)return 0;for(var n=this.nodes[e*f+2],i=0,s=(r=Math.abs(r))-1;s>=0&&!(this.children[n+s]>=0);s--)i++;return i},m.prototype.getNodeBox=function(t,e){for(var r=6*this.getIndex(t),n=0;n<6;n++)e[n]=this.nodeBoxes[r+n]},m.prototype.getVisibleIds=function(){return this.visibleIds||(this.visibleIds=Object.keys(this.dbIdToIndex).map((function(t){return parseInt(t)}))),this.visibleIds},m.prototype.enumNodeChildren=function(t,e){var r=this.dbIdToIndex[t],n=this.nodes[r*f+2],i=this.nodes[r*f+3];i=Math.abs(i);for(var s=0;s<i;s++){var o=this.children[n+s];if(o<0)break;if(e(this.nodes[o*f+0],t,r))return t}},m.prototype.enumNodeFragments=function(t,e){var r=this.dbIdToIndex[t],n=this.nodes[r*f+2],i=this.nodes[r*f+3];if(i<0){i=-i;for(var s=0;s<i;s++){var o=this.children[n+s];if(!(o>0)&&e(-o-1,t,r))return t}}},m.prototype.computeBoxes=function(t){this.nodeBoxes||(this.nodeBoxes=new Float32Array(6*this.numNodes));var e=this,r=e.getIndex(e.rootId),n=e.nodeBoxes;function i(t,r,i){var s=e.getIndex(t);o(t,s);for(var a=6*i,u=6*s,c=0;c<3;c++)n[a+c]>n[u+c]&&(n[a+c]=n[u+c]),n[a+c+3]<n[u+c+3]&&(n[a+c+3]=n[u+c+3])}function s(e,r,i){for(var s=6*e,o=6*i,a=0;a<3;a++)n[o+a]>t[s+a]&&(n[o+a]=t[s+a]),n[o+a+3]<t[s+a+3]&&(n[o+a+3]=t[s+a+3])}function o(t,r){var o=6*r;n[o]=n[o+1]=n[o+2]=1/0,n[o+3]=n[o+4]=n[o+5]=-1/0,e.getNumChildren(t)&&e.enumNodeChildren(t,i,!0),e.getNumFragments(t)&&e.enumNodeFragments(t,s)}o(e.rootId,r)},m.prototype.computeChildCounts=function(){this.childCounts||(this.childCounts={});const t=this,e=t.childCounts;!function r(n){e[n]=0;let i=0;return 4===t.getNodeFlags(n)?i=1:(t.getNumChildren(n)&&t.enumNodeChildren(n,(t=>{e[n]+=r(t)}),!0),t.getNumFragments(n)&&(i=1)),e[n]+i}(t.rootId)},m.prototype.dbIdToIndexFiltered=function(t){const e={},r=this,n=i=>{let s=t(i);return r.enumNodeChildren(i,(t=>{n(t)&&(s=!0)})),s&&(e[i]=r.dbIdToIndex[i]),s};return n(this.rootId),e};const v={Boolean:1,Integer:2,Double:3,Float:4,Blob:10,DbKey:11,String:20,LocalizableString:21,DateTime:22,GeoLocation:23,Position:24},y=[];class b{constructor(){this.lastUpdated=new Date(0),this.lastFetched=new Date(0),this.customValueIds=new Map([["",1]]),this.customValues=[null,""],this.customAttributeValues=new Map}hasObjectProperties(t){return void 0!==this.customAttributeValues.get(t)}enumObjectProperties(t,e,r,n,i){const s=this.customAttributeValues.get(e)??y;for(let e=0;e<t.length;++e){let t=!1;for(let o=0;o<s.length;){const a=s[o++],u=s[o++];if(e===a){r(a+n,u+i),t=!0;break}}t||r(e+n,1+i)}}internValue(t){let e=this.customValueIds.get(t);return void 0===e&&(e=this.customValues.length,this.customValueIds.set(t,e),this.customValues.push(t)),e}async refreshCustomPropertiesValues(t,e){let{baseUrl:r,headers:n,projectId:i,seedFileUrn:s,limit:o}=e;const a=`${r}/v2/projects/${i}/versions/${encodeURIComponent(s)}/custom-properties?limit=${o}`;try{const e=async(e,r,n)=>{r&&this.customAttributeValues.clear();for(const r of e.results){const e=t.customAttrIds.get(r.propId);if(void 0===e)continue;const n=r.svf2Id;let i=this.customAttributeValues.get(n);void 0===i&&(i=[],this.customAttributeValues.set(n,i)),null!==r.value&&i.push(e,this.internValue(r.value))}n&&(this.lastUpdated=Date.parse(e.lastModifiedAt))};await async function(t,e){const{onPage:r}=e??{},n=[];let i=!0;for(;t;){var s;const o=await fetch(t,e);if(!o.ok)throw new Error(o.statusText);const a=await o.json();t=null===(s=a.pagination)||void 0===s?void 0:s.nextUrl,r?await r(a,i,!t):n.push(a),i=!1}return n}(a,{headers:{"Content-Type":"application/json",...n},onPage:e})}catch(t){throw console.error(t),t}return this.lastFetched=Date.now(),this}async setCustomPropertiesValues(t,e){let{baseUrl:r,headers:n,projectId:i,seedFileUrn:s,selection:o,props:a}=e;const u=`${r}/v2/projects/${i}/versions/${encodeURIComponent(s)}/custom-properties`,c={},h={},l=[];for(const[t,e]of Object.entries(a))void 0===e||""===e?l.push(t):h[t]=e;Object.entries(h).length>0&&(c.assignments=[{svf2Ids:o,props:h}]),l.length>0&&(c.removals=[{svf2Ids:o,propIds:l}]);var f=await fetch(u,{method:"POST",body:JSON.stringify(c),headers:{"Content-Type":"application/json",...n}});if(!f.ok)throw new Error(f.statusText);const d=await f.json();if("FAILED"===d.status)return d;const p=Object.entries(a);for(const e of d.successfulSvf2Ids)for(const[r,n]of p){const i=t.customAttrIds.get(r);if(void 0===i)continue;let s=this.customAttributeValues.get(e);void 0===s&&(s=[],this.customAttributeValues.set(e,s));let o=-1;for(let t=0;t<s.length;t+=2)s[t]===i&&(o=t);if(void 0===n||""===n)o>=0&&s.splice(o,2);else{const t=this.internValue(n);o<0?s.push(i,t):s[o+1]=t}0===s.length&&this.customAttributeValues.delete(e)}return d}}class x{constructor(){const t=new Date(0);this.attributes={lastFetched:t,lastUpdated:t,customAttrIds:new Map,customAttrs:[]},this.values=null}getValueAt(t){return this.values.customValues[t]}getAttributeAt(t){return this.attributes.customAttrs[t]}_getObjectProperty(t,e){const r=this.getAttributeAt(t);return{displayName:r.displayName??r.name,displayValue:this.getValueAt(e),displayCategory:r.category,attributeName:r.name,type:r.dataType,units:r.dataTypeContext,hidden:!1,precision:r.precision,propType:r.propType,propertyHash:r.propertyHash}}hasObjectProperties(t){var e;return null===(e=this.values)||void 0===e?void 0:e.hasObjectProperties(t)}enumAttributes(t,e){this.attributes.customAttrs.forEach(((r,n)=>{t(n+e,r)}))}enumObjectProperties(t,e,r,n){var i;return null===(i=this.values)||void 0===i?void 0:i.enumObjectProperties(this.attributes.customAttrs,t,e,r,n)}async parseResponse(t,e){const r=t.body.getReader(),n=new TextDecoder;let{value:i,done:s}=await r.read(),o=i?n.decode(i):"";const a=/\r\n|\n|\r/g;let u=0,c=null;for(;;)if(c=a.exec(o),c)e(o.substring(u,c.index)),u=a.lastIndex;else{if(s)break;const t=o.substring(u);({value:i,done:s}=await r.read()),o=t+(i?n.decode(i):""),u=a.lastIndex=0}u<o.length&&e(o.substring(u))}async refreshCustomProperties(t){let{baseUrl:e,headers:r,projectId:n,seedFileUrn:i,propertyFilter:s,limit:o}=t;const a=`${e}/v2/projects/${n}/lineages/${encodeURIComponent(i)}/custom-properties/fields`;var u=await fetch(a,{headers:{"Content-Type":"application/json",...r}});if(!u.ok)throw new Error(u.statusText);const c=new Map([["",""]]),h=new Map,l=[],f=t=>{if(null==t)return null;let e=c.get(t);return void 0===e&&(e=t,c.set(t,t)),e};await this.parseResponse(u,(t=>{try{const r=JSON.parse(t);if(s&&!s.has(r.key))return;const n={propertyHash:r.key,category:f(r.category),name:r.name,displayName:r.displayName,dataType:v[r.type]??0,dataTypeContext:f(r.uom)??"",flags:0,precision:f(r.precision)??0,propType:f(r.propType),parameterId:r.parameterId,parameterTypeId:f(r.parameterTypeId),defaultValue:f(r.defaultValue),applicableTo:r.applicableTo};var e=h.get(n.propertyHash);e||(e=l.length,l.push(n)),h.set(n.propertyHash,e)}catch(e){throw console.error(e),console.log(t),e}}));const d=this.attributes;return d.customAttrIds=h,d.customAttrs=l,d.lastFetched=Date.now(),this}async acquireValues(t){let{baseUrl:e,headers:r,projectId:n,seedFileUrn:i,worker:s,dbPath:o,limit:a}=t,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,c=this.values;try{var h;if(c instanceof Promise)c=await c;else if(null===c||u&&Date.now()-c.lastFetched>u){c??=new b;const t=c.refreshCustomPropertiesValues(this.attributes,{baseUrl:e,headers:r,projectId:n,seedFileUrn:i,limit:a});this.values=t,await t,this.values=c}var l=null===(h=s.pdbCache)||void 0===h||null===(h=h.get(o))||void 0===h?void 0:h.pdb;l&&"setCustomAttrs"in l&&l.setCustomAttrs(this)}catch(t){throw this.values=null,t}return c}async setCustomPropertiesValues(t){let{baseUrl:e,headers:r,projectId:n,seedFileUrn:i,selection:s,props:o,worker:a,dbPath:u,limit:c}=t;const h=await this.acquireValues({baseUrl:e,headers:r,projectId:n,seedFileUrn:i,worker:a,dbPath:u,limit:c},0);return await h.setCustomPropertiesValues(this.attributes,{baseUrl:e,headers:r,projectId:n,seedFileUrn:i,selection:s,props:o})}async applyDefinitions(t){let{baseUrl:e,headers:r,projectId:n,seedFileUrn:i,bindings:s,limit:o}=t;const a=`${e}/v2/projects/${n}/lineages/${encodeURIComponent(i)}/custom-properties/bindings`,u={method:"POST",body:JSON.stringify(s),headers:{"Content-Type":"application/json",...r}};delete u.headers["x-use-contingency"];var c=await fetch(a,u);if(c.ok){const t=new Set(this.attributes.customAttrIds.keys());return s.forEach((e=>{let{propId:r,isDeleted:n}=e;return n?t.delete(r):t.add(r)})),await this.refreshCustomProperties({baseUrl:e,headers:r,projectId:n,seedFileUrn:i,propertyFilter:t,limit:o}),await this.values.refreshCustomPropertiesValues(this.attributes,{baseUrl:e,headers:r,projectId:n,seedFileUrn:i,limit:o}),this}throw new Error(c.statusText)}}class w{constructor(){this._cache={}}delete(t){delete this._cache[t]}async acquireDefinitions(t){let{baseUrl:e,headers:r,projectId:n,seedFileUrn:i,dbPath:s}=t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e4,a=this._cache[s];try{if(a instanceof Promise)a=await a;else if(void 0===a||o>0&&Date.now()-a.attributes.lastFetched>o){a??=new x;const t=a.refreshCustomProperties({baseUrl:e,headers:r,projectId:n,seedFileUrn:i});this._cache[s]=t,await t,this._cache[s]=a}}catch(t){throw delete this._cache[s],t}return a}async applyDefinitions(t){let{baseUrl:e,headers:r,projectId:n,seedFileUrn:i,dbPath:s,bindings:o,limit:a}=t,u=this._cache[s]??=new x;return u instanceof Promise&&(u=await u),await u.applyDefinitions({baseUrl:e,headers:r,projectId:n,seedFileUrn:i,dbPath:s,bindings:o,limit:a}),u}}function _(t){let e=t.customPropsCache;return e||(t.customPropsCache=e=new w),e}function I(t,e){this.pdb=null,this.waitingCallbacks=[],this.error=!1,this.dbPath=t,this.dbFiles=null,this.isShared=e,this.timestamp=Date.now()}function A(t){this.data=t,this.refCount=1}class O{constructor(){this.pdbCache={},this.fileCache={}}get(t){let e=this.pdbCache[t];return e&&(e.timestamp=Date.now()),e}set(t,e){let r=new I(t,e);return this.pdbCache[t]=r,r}getFile(t){let e=this.fileCache[t];return e&&(e.timestamp=Date.now()),e}setFile(t,e){this.fileCache[t]=new A(e)}delete(t){var e=this.get(t);if(e&&e.pdb&&(e.pdb.refCount--,0===e.pdb.refCount&&(e.isShared||delete this.pdbCache[t],!e.isShared)))for(var r in e.dbFiles){var n=e.dbFiles[r];this.unrefFileCacheEntry(n.storage)}}unrefFileCacheEntry(t){for(var e in t){var r=this.fileCache[e];r&&(r.refCount--,0===r.refCount&&delete this.fileCache[e])}}}function S(t,e,r,i,s){var o;if(-1!==t.indexOf("://")||0===t.indexOf("urn:"))o=t;else{if(!e.dbPath)return void r(null);o=`${e.dbPath}${t}`}var a=n.PG.generateUrl(e.endpoint,"items",o),u=function(t){s&&e.worker.pdbCache&&e.worker.pdbCache.setFile(a,t),i[a]=t,r(t)},c=e.worker.pdbCache&&e.worker.pdbCache.getFile(a);c?(c.refCount++,u(c.data)):n.PG.getItem(e,o,u,(function(t,n,i){404!==t&&e.onFailureCallback(t,n,i),r(null)}))}function P(t,e,r,n){var i,s=t.dbId,o=t.children,a=[];if(o)for(var u=0;u<o.length;u++)P(o[u],s,r,n)&&a.push(o[u].dbId);if(r){var c=r[s];void 0!==c&&(i=Array.isArray(c)?c:[c])}var h=a.length+(i?i.length:0);return h&&n.setNode(s,e,t.name.toString(),0,a,i),h}function k(t){var e=t.worker,r=t.gltfTree,n=t.dbToFragId,i=new d;P(r,0,n,i),i.flatten(),e.postMessage({cbId:t.cbId,result:{rootId:r.dbId,instanceTreeStorage:i}})}function C(t){var e=t.worker;!function(t,e,r){let n=t.worker,i=n.pdbCache;i||(n.pdbCache=i=new O);var s=i.get(t.dbPath),o=!1;if(s?o=!0:s=i.set(t.dbPath,!!t.sharedDbPath),s.pdb)r(s.pdb,s.dbidOldToNew);else if(s.error)r(null);else if(o)s.waitingCallbacks.push(r);else{var a=t.propertydb;if(!a)return n.propdbFailed=!0,void r(null);var u={},c=[];if(a.avs.length)for(var l in a)t.skipExternalIds&&"ids"==l||(u[l]={},c.push({filename:a[l][0].path,isShared:a[l][0].isShared,storage:u[l]}));else u={ids:{},attrs:{},offsets:{},values:{},avs:{}},c.push({filename:a.attrs.length?a.attrs[0]:"objects_attrs.json.gz",storage:u.attrs}),c.push({filename:a.values.length?a.values[0]:"objects_vals.json.gz",storage:u.values}),c.push({filename:a.avs.length?a.avs[0]:"objects_avs.json.gz",storage:u.avs}),c.push({filename:a.offsets.length?a.offsets[0]:"objects_offs.json.gz",storage:u.offsets}),t.skipExternalIds||c.push({filename:a.ids.length?a.ids[0]:"objects_ids.json.gz",storage:u.ids});var f=c.length,d=0;c.forEach((function(e){S(e.filename,t,p,e.storage,e.isShared)}))}function p(e){if(f--,n.postMessage({cbId:t.cbId,progress:{percent:95*(c.length-f)/c.length}}),e||d++,!f)if(d)for(s.error=!0,r(null);s.waitingCallbacks.length;)s.waitingCallbacks.shift()(null);else{c.forEach((function(t){t.storage=null}));try{s.pdb=t.useCustomProperties?new g(u):new h(u),s.pdb.refCount=0,s.loaded=!0,s.dbFiles=c,s.timestamp=Date.now(),s.byteSize=0;for(let t in u)for(let e in u[t]){let r=u[t][e];s.byteSize+=r&&r.byteLength}for(let t in u.dbid){var i=u.dbid[t];s.dbidOldToNew=new Int32Array(i.buffer,i.byteOffset,i.byteLength/4);break}for(r(s.pdb,s.dbidOldToNew);s.waitingCallbacks.length;)s.waitingCallbacks.shift()(s.pdb,s.dbidOldToNew)}catch(t){r(null,null,t&&t.message)}}}}(t,0,(function(r,n,i){if(!r)return void e.postMessage({cbId:t.cbId,error:{instanceTree:null,maxTreeDepth:0,err:i}});var s;r.refCount++,t.skipInstanceTreeResult||r.rootsDone||(r.idroots=r.findRootNodes(),r.rootsDone=!0);var o,a=[0],u=[];let c=null;var h=t.fragToDbId;if(t.needsDbIdRemap&&t.is2d)if(n)if(h){for(var l=n,f=[],p=0;p<h.length;p++){var g=h[p];if(Array.isArray(g)){f[p]=[];for(var v=0;v<g.length;v++)f[p][v]=l[g[v]]}else f[p]=l[g]}h=f}else console.warn("No frag->dbid mapping!.");else console.warn("ID remap required, but not loaded.");var y=r.idroots;if(y&&y.length){if(o=new d,1==y.length&&r.nodeHasChild(y[0]))s=y[0],r.buildObjectTree(s,h,a,o);else{s=-1e10;var b=[];for(let t=0;t<y.length;t++)r.buildObjectTree(y[t],h,a,o),b.push(y[t]);o.setNode(s,0,"",0,b,!1)}o.flatten(),u.push(o.nodes.buffer),u.push(o.children.buffer),u.push(o.strings.buf.buffer),u.push(o.strings.idx.buffer),t.fragBoxes&&(c=new m(o,s),c.computeBoxes(t.fragBoxes),u.push(c.nodeBoxes.buffer))}e.postMessage({cbId:t.cbId,result:{rootId:s,instanceTreeStorage:o,instanceBoxes:c?c.nodeBoxes:void 0,dbidOldToNew:t.needsDbIdRemap?n:null,maxTreeDepth:a[0],objectCount:r.getObjectCount()}},u)}))}function T(t){var e=t.worker,r=e.pdbCache&&e.pdbCache.get(t.dbPath);if(r&&r.pdb){const i=t.searchText;var n=r.pdb.bruteForceSearch(i,t.attributeNames,t.searchOptions);e.postMessage({cbId:t.cbId,result:n})}}function M(t){var e=t.worker,r=e.pdbCache&&e.pdbCache.get(t.dbPath),n=e.pdbCache&&e.pdbCache.get(t.dbPath2),i=r&&r.pdb,s=n&&n.pdb;if(i&&s){var o=i.findDifferences(s,t.diffOptions,(function(e){t.worker.postMessage({cbId:t.cbId,progress:{percent:e}})}));e.postMessage({cbId:t.cbId,result:o})}}function E(t){var e=t.worker,r=e.pdbCache&&e.pdbCache.get(t.dbPath);if(r&&r.pdb){var n=r.pdb.bruteForceFind(t.propertyName);e.postMessage({cbId:t.cbId,result:n})}}function F(t){var e=t.worker,r=e.pdbCache&&e.pdbCache.get(t.dbPath);if(r&&r.pdb){var n=r.pdb.findLayers();e.postMessage({cbId:t.cbId,result:n})}}function R(t,e,r){if(!(Object.keys(r).length>0)){if(e==t.dbId)return r.name=t.name,void(r.dbId=e);var n=t.children;if(n)for(var i=0;i<n.length;i++)R(n[i],e,r)}}function z(t){var e=t.worker,r=e.pdbCache&&e.pdbCache.get(t.dbPath);if(r&&r.pdb){var n=t.dbId,i=t.dbIds,s=t.propFilter,o=t.ignoreHidden,a=t.categoryFilter;if(void 0!==i){var u=[];if(i&&i.length)for(let t=0;t<i.length;t++){let e=r.pdb.getObjectProperties(i[t],s,o,void 0,a);e&&u.push(e)}else for(let t=1,e=r.pdb.getObjectCount();t<=e;t++){let e=r.pdb.getObjectProperties(t,s,o,void 0,a);e&&u.push(e)}return u}return r.pdb.getObjectProperties(n,s,void 0,void 0,a)}if(t.gltfTree){var c={};return R(t.gltfTree,t.dbId,c),c}}function V(t){var e=z(t);e?t.worker.postMessage({cbId:t.cbId,result:e}):t.worker.postMessage({cbId:t.cbId,error:{msg:"Properties are not available."}})}function U(t){var e=z(t);e||t.worker.postMessage({cbId:t.cbId,error:{msg:"Properties are not available."}});for(var r={},n=[],i=0;i<e.length;++i){var s=e[i];const o=s.properties;if("rvt"===t.fileType)try{let t;const e=o.find((t=>"ElementId"===t.attributeName));if(e&&(t=e.displayValue),s.externalId&&!t){const e=s.externalId.split("-");e.length&&(t=parseInt(e[e.length-1],16))}t&&!s.name.includes(t)&&(s.name+=` [${t}]`)}catch(t){console.warn(`Caught error in updating ElementIds, object with dbId ${s.dbId} skipped`,t)}o.forEach((function(t){"Name"!==t.displayName||t.displayCategory||n.push(s.name);var e=t.displayCategory?`${t.displayCategory}/${t.displayName}`:t.displayName;Object.prototype.hasOwnProperty.call(r,e)||(r[e]=[]),t.parentName=s.name,t.dbId=s.dbId,r[e].push(t)})),Object.prototype.hasOwnProperty.call(s,"name")&&-1===n.indexOf(s.name)&&(Object.prototype.hasOwnProperty.call(r,"Name")||(r.Name=[]),r.Name.push({displayName:"Name",displayValue:s.name,displayCategory:null,attributeName:"Name",type:20,units:null,hidden:!1,precision:0,dbId:s.dbId,parentName:s.name}))}n=[],r.__selected_dbIds__=t.dbIds,t.worker.postMessage({cbId:t.cbId,result:r})}function D(t){var e=t.worker,r=e.pdbCache&&e.pdbCache.get(t.dbPath);if(r&&r.pdb){var n=r.pdb.getExternalIdMapping(t.extIdFilter);e.postMessage({cbId:t.cbId,result:n})}}function L(t){var e=t.worker,r=e.pdbCache&&e.pdbCache.get(t.dbPath);if(r&&r.pdb){var n=r.pdb.getLayerToNodeIdMapping();e.postMessage({cbId:t.cbId,result:n})}}function j(t){var e=t.worker;if(t.clearCaches)return e.pdbCache=null,void(e.customPropsCache=null);e.pdbCache&&e.pdbCache.delete(t.dbPath),e.customPropsCache&&e.customPropsCache.delete(t.dbPath)}function N(t){var e=t.worker,r=t.idsFile||{path:"objects_ids.json.gz"},n={},i=e.pdbCache.get(t.dbPath);i?i.pdb&&i.pdb.externalIdsLoaded()?e.postMessage({cbId:t.cbId}):S(r.path,t,(function(s){if(!s)return;let o=e.pdbCache;(i=o.get(t.dbPath))&&i.pdb||(o.unrefFileCacheEntry(n),e.postMessage({cbId:t.cbId,error:{propDbWasUnloaded:!0}})),i.pdb.setIdsBlob(s),i.byteSize+=s.byteLength;var a={filename:r.path,storage:n};i.dbFiles.push(a),e.postMessage({cbId:t.cbId})}),n,r.isShared):console.error("Delay-loading of externalIDs requires to load the propDb first.")}function B(t){var e=t.worker;if(t.userFunction)try{importScripts(t.userFunction)}catch(r){return console.error(r),void e.postMessage({cbId:t.cbId,error:{msg:"Error while importing 'userFunction'."}})}if(self.userFunction){var r=e.pdbCache&&e.pdbCache.get(t.dbPath);if(r&&r.pdb){var n;try{n=self.userFunction(r.pdb,t.userData)}catch(r){return console.error(r),void e.postMessage({cbId:t.cbId,error:{msg:"Error while executing 'userFunction'."}})}finally{self.userFunction=void 0}e.postMessage({cbId:t.cbId,result:n})}}else e.postMessage({cbId:t.cbId,error:{msg:"function 'userFunction' was not found."}})}async function W(t){const e=t.worker,r=_(e);let n,i;try{var s;n=null===(s=(await r.acquireDefinitions(t)).attributes)||void 0===s?void 0:s.lastFetched}catch(t){i={msg:t.message,error:t}}e.postMessage({cbId:t.cbId,result:n,error:i})}async function G(t){const e=t.worker,r=_(e);let n,i;try{var s;await r.applyDefinitions(t),n=null===(s=(await r.acquireDefinitions(t)).attributes)||void 0===s?void 0:s.lastFetched}catch(t){i={msg:t.message,error:t}}e.postMessage({cbId:t.cbId,result:n,error:i})}async function q(t){const e=t.worker,r=_(e);let n,i;try{const e=await r.acquireDefinitions(t);n=(await e.acquireValues(t,1e3)).lastFetched}catch(t){i={msg:t.message,error:t}}e.postMessage({cbId:t.cbId,result:n,error:i})}async function H(t){const e=t.worker,r=_(e);let n,i;try{const e=await r.acquireDefinitions(t,0);n=(await e.setCustomPropertiesValues(t)).lastUpdated}catch(t){i={msg:t.message,error:t}}e.postMessage({cbId:t.cbId,result:n,error:i})}function $(t){t.register("BUILD_EXTERNAL_ID_MAPPING",{doOperation:D}),t.register("BUILD_LAYER_TO_NODE_ID_MAPPING",{doOperation:L}),t.register("GET_PROPERTIES",{doOperation:V}),t.register("GET_PROPERTY_SET",{doOperation:U}),t.register("SEARCH_PROPERTIES",{doOperation:T}),t.register("DIFF_PROPERTIES",{doOperation:M}),t.register("FIND_PROPERTY",{doOperation:E}),t.register("FIND_LAYERS",{doOperation:F}),t.register("LOAD_PROPERTYDB",{doOperation:C}),t.register("CREATE_TREE",{doOperation:k}),t.register("UNLOAD_PROPERTYDB",{doOperation:j}),t.register("USER_FUNCTION",{doOperation:B}),t.register("LOAD_EXTERNAL_IDS",{doOperation:N}),t.register("REFRESH_CUSTOM_PROPERTIES",{doOperation:W}),t.register("REFRESH_CUSTOM_PROPERTIES_VALUES",{doOperation:q}),t.register("APPLY_CUSTOM_PROPERTIES",{doOperation:G}),t.register("SET_CUSTOM_PROPERTIES_VALUES",{doOperation:H})}},3870:(t,e,r)=>{"use strict";r.d(e,{k:()=>z});var n=r(6247),i=r(5468),s=r(6118),o=r(1136),a=r(3293),u=r(8983),c=r(1706),h=r(7365);var l=((0,n.Xb)(),null);function f(){this.length=0,this.numLoaded=0,this.boxes=null,this.transforms=null,this.materials=null,this.packIds=null,this.entityIndexes=null,this.fragId2dbId=null,this.topoIndexes=null,this.visibilityFlags=null}var d=new s.S;function p(t,e,r,n){var i=t.seekToEntry(e);return i?i.version>2?null:(i.version>1&&t.readU8(),{definition:t.stream.getUint32(),transform:t.readTransform(void 0,void 0,void 0,r,n),instanceNodePath:t.readPathID()}):null}function m(t){switch(t){case"meter":case"meters":case"m":default:return 1;case"feet and inches":case"foot":case"feet":case"ft":return.3048;case"inch":case"inches":case"in":return.0254;case"centimeter":case"centimeters":case"cm":return.01;case"millimeter":case"millimeters":case"mm":return.001}}function g(t,e){var r=t.globalOffset;if(r.x||r.y||r.z){if(e){var n=new h.T(!0);n.copy(e),(e=n).elements[12]-=r.x,e.elements[13]-=r.y,e.elements[14]-=r.z}else(e=new h.T(!0)).makeTranslation(-r.x,-r.y,-r.z);t.placementWithOffset=e}else t.placementWithOffset=e}function v(t,e){t[0]-=e.x,t[1]-=e.y,t[2]-=e.z}function y(t,e){if(e&&(e.transformPoint(t.position),e.transformPoint(t.target),e.transformDirection(t.up),isFinite(t.orthoScale))){const r=e.getMaxScaleOnAxis();t.orthoScale*=r}}function b(t,e){var r=e.definition,n=t.seekToEntry(r);if(!n)return null;if(n.version>2)return null;var i=t.stream,s={isPerspective:!i.getUint8(),position:t.readVector3f(),target:t.readVector3f(),up:t.readVector3f(),aspect:i.getFloat32(),fov:i.getFloat32()*(180/Math.PI)};return n.version<2&&(i.getFloat32(),i.getFloat32()),s.orthoScale=i.getFloat32(),s}function x(t,e){var r=t.seekToEntry(e);if(!r)return null;if(r.version>1)return null;var n=t.stream;return{position:t.readVector3f(),dir:t.readVector3f(),r:n.getFloat32(),g:n.getFloat32(),b:n.getFloat32(),intensity:n.getFloat32(),spotAngle:n.getFloat32(),size:n.getFloat32(),type:n.getUint8()}}const w={NI_Inner:0,NI_Leaf:1};function _(t){const e=t.readString();let r=function(t){let e="";for(let r=0;r<16;r++)e+=t.readU8();return e}(t);const n=t.readU8();if(n===w.NI_Leaf)return{name:e,entry:t.readVarint(),uuid:r};if(n===w.NI_Inner){const r=t.readVarint(),n=[];for(let e=0;e<r;e++){const e=_(t);n.push(e)}return{name:e,children:n}}return{}}function I(t){return t.seekToEntry&&t.seekToEntry(0),_(t)}function A(t,e,r){if(!t.seekToEntry(r))return null;const n={},i=t.readVarint();if(1&i){n.cameraEntry=t.readVarint();const r={definition:n.cameraEntry};n.camera=b(e,r)}if(2&i&&(n.cameraTransform=t.readTransform(),n.camera&&n.cameraTransform&&y(n.camera,n.cameraTransform)),4&i&&(n.renderMode=t.readU8()),8&i&&(n.primitiveDisplayFlags=t.readU8()),32&i&&(n.overrideSet=t.readVarint()),16&i)if(n.clipPlaneMode=t.readU8(),0===n.clipPlaneMode){n.sectionCount=t.readU8(),n.clipData={},n.sectionPlane=[];for(let e=0;e<n.sectionCount;e++){const e=Object.assign({},t.readVector3f()),r=t.readF64();n.sectionPlane.push(-e.x,-e.y,-e.z,r)}}else{n.clipData={};const e=Object.assign({},t.readVector3d()),r=Object.assign({},t.readVector3d()),i=Object.assign({},t.readQuaternionf());n.sectionBox={min:e,max:r},n.sectionBoxTransform=i,n.isFromViewpoint=!0}return n}function O(t,e){const r=t.readVarint();let n=0;for(let i=0;i<r;++i)n+=t.readVarint(),e(n)}function S(t,e){if(!t.seekToEntry(e))return null;const r={},n=t.stream.getUint32();if(1&n&&(r.defaultMaterialIndex=t.readVarint(),r.defaultMaterialFlags=t.readU8()),2&n&&(r.defaultFlags=t.readVarint()),4&n){r.materialOverrides=[];const e=t.readVarint();for(let n=0;n<e;++n){let e=t.readVarint();O(t,(function(t){r.materialOverrides.push({dbId:t,materialIndex:e})}))}}if(8&n){r.flagOverrides=[];const e=t.readVarint();for(let n=0;n<e;++n){let e=t.readVarint();O(t,(function(t){r.flagOverrides.push({dbId:t,flags:e})}))}}return r}var P=r(9861);function k(t,e){const r=(0,P.AO)(t,{filter:t=>t.name===e})[e];if(!r)throw new Error("Error while extracting "+e);return r}function C(t){this.zipPack=t,this.manifest=null,this.materials=null,this.metadata=null,this.fragments=null,this.geompacks=[],this.instances=[],this.cameras=[],this.lights=[],this.viewpoints=[],this.overrideSets=[],this.propertydb={attrs:[],avs:[],ids:[],values:[],offsets:[]},this.bbox=null,this.animations=null,this.pendingRequests=0,this.globalOffset={x:0,y:0,z:0},this.topologyPath=null}C.prototype.loadAsyncResource=function(t,e,r,n){if(r)n(r);else{var i=this;this.pendingRequests++,o.PG.getItem(t,t.basePath+e,(function(e){i.pendingRequests--,n(e),0==i.pendingRequests&&i.postLoad(t)}),t.onFailureCallback)}},C.prototype.loadManifest=function(t){const e=k(this.zipPack,"manifest.json"),r=new a.z(e);this.manifest=JSON.parse(r.getString(e.byteLength))},C.prototype.applyLargeBoxOffset=function(t){!t||t.x===this.globalOffset.x&&t.y===this.globalOffset.y&&t.z===this.globalOffset.z||(this.bbox.isEmpty()||this.bbox.translate({x:this.globalOffset.x-t.x,y:this.globalOffset.y-t.y,z:this.globalOffset.z-t.z}),this.verylargebbox=!0,this.globalOffset.copy(t),g(this,this.placementTransform))},C.prototype.parseFragmentList=function(t,e,r,n){var i=this;this.loadAsyncResource(e,r,n,(function(t){var r=new u.J(t),n=function(t,e,r,n,i,o,a,u){var f=function(t,e){var r=[];if(!e)return r;for(var n=t.getEntryCounts(),i=t.stream,s=0;s<n;s++){var o=t.seekToEntry(s);if(!o)return;if(o.version>5)return;o.version>4&&t.readU8(),t.readU32V(),o.version>2||t.readString(),t.readU32V(),t.readTransform(s,null,12*s);for(var a=0;a<6;a++)i.getFloat32();if(o.version>1){var u=t.readU32V();e.indexOf(u)>=0&&r.push(s)}}return r}(t,void 0),p=f.length?f.length:t.getEntryCounts(),m=t.stream;l&&p>l&&(p=l),e.totalLength=t.getEntryCounts(),e.length=p,e.numLoaded=0;var g,v,y=e.boxes=i?new Float64Array(6*p):new Float32Array(6*p),b=e.transforms=i?new Float64Array(12*p):new Float32Array(12*p),x=e.materials=new Int32Array(p),w=e.packIds=new Int32Array(p),_=e.entityIndexes=new Int32Array(p),I=e.geomDataIndexes=new Int32Array(p),A=e.fragId2dbId=new Int32Array(p),O=e.visibilityFlags=new Uint16Array(p),S=[0,0,0];n&&(g=new c.K,v=new h.T(!0).fromArray(n.elements));var P=!r&&a,k=b,C=12,T=9;function M(t){if(n){var e=6*t;g.setFromArray(y,e),g.applyMatrix4(v),g.copyToArray(y,e)}}function E(t){for(var e=6*t,r=0;r<6;r++)y[e++]=m.getFloat32()}function F(t,e){for(var r=6*t,n=0;n<6;n++)y[r++]=m.getFloat32()+e[n%3]}P&&(i||(y=new Float64Array(6*p),k=new Float64Array(3*p),C=3,T=0));for(var R=0,z=e.length;R<z;R++){var V=f.length?t.seekToEntry(f[R]):t.seekToEntry(R);if(!V)return;if(V.version>5)return;var U=!0;if(V.version>4&&(U=!!(1&t.readU8())),O[R]=U?1:0,x[R]=t.readU32V(),V.version>2?I[R]=t.readU32V():(w[R]=parseInt(t.readString()),_[R]=t.readU32V()),t.readTransform(R,b,12*R,n,r,S),P&&k!==b&&k.set(S,R*C+T),V.version>3?F(R,S):E(R),M(R),r){var D=6*R;y[D++]-=r.x,y[D++]-=r.y,y[D++]-=r.z,y[D++]-=r.x,y[D++]-=r.y,y[D++]-=r.z}V.version>1&&(A[R]=t.readU32V())}if(P){var L=-1,j=-1,N=-1,B=y.length;for(let t=0;t<B;t+=6)L=Math.max(L,y[t+3]-y[t]),j=Math.max(j,y[t+4]-y[t+1]),N=Math.max(N,y[t+5]-y[t+2]);var W=a.getSize(d);if(W.x>100*L||W.y>100*j||W.z>100*N){var G=0,q=0,H=0;for(let t=0;t<B;t+=3)G+=y[t],q+=y[t+1],H+=y[t+2];r=new s.S(3*G/B,3*q/B,3*H/B)}else r=u;var $=e.boxes;for(let t=0;t<B;t+=3)$[t]=y[t]-r.x,$[t+1]=y[t+1]-r.y,$[t+2]=y[t+2]-r.z;if(n&&k!==b){var Q=new s.S;for(R=0;R<z;++R){const t=R*C+T;Q.fromArray(k,t).applyMatrix4(v).toArray(k,t)}}for(R=0;R<z;++R){var K=12*R+9,X=R*C+T;b[K]=k[X]-r.x,b[K+1]=k[X+1]-r.y,b[K+2]=k[X+2]-r.z}}return e.finishLoading=!0,r}(r,i.fragments=new f,e.globalOffset,e.placementTransform,e.fragmentTransformsDouble,0,i.bbox,i.globalOffset);r=null,i.applyLargeBoxOffset(n)}))},C.prototype.parseGeometryMetadata=function(t,e,r,n){var i=this;this.loadAsyncResource(e,r,n,(function(t){var e=new u.J(t);i.geomMetadata={},function(t,e){var r=t.getEntryCounts(),n=t.stream;e.length=r;for(var i,s=e.fragTypes=new Uint8Array(r),o=e.primCounts=new Uint16Array(r),a=e.packIds=new Int32Array(r),u=e.entityIndexes=new Int32Array(r),c=0,h=r;c<h;c++){var l=t.seekToEntry(c);if(!l)return;if(s[c]=n.getUint8(),n.seek(n.offset+24),o[c]=n.getUint16(),a[c]=parseInt(t.readString()),u[c]=t.readU32V(),l.version>2){var f=n.getInt32();if(-1!=f&&void 0===i){i=e.topoIndexes=new Int32Array(r);for(var d=0;d<c;d++)i[d]=-1}null!=i&&(i[c]=f)}}}(e,i.geomMetadata),i.numGeoms=i.geomMetadata.primCounts.length}))},C.prototype.parseInstanceTree=function(t,e,r,n){var i=this;this.loadAsyncResource(t,e,r,(function(t){var e=new u.J(t);i.instanceTransforms=function(t,e){for(var r=[],n=[],i=[],s=[],o=0,a=t.stream;a.offset<a.byteLength-8-1;){t.readTransform(o,r,12*o,void 0,void 0,void 0),e<5&&a.getUint8()&&a.getUint32();var u=a.getUint8();if(e>=5&&a.getUint8(),e>=3&&(n[o]=a.getVarints()),o)switch(u){case 0:break;case 1:if(e<2){let t=a.getUint16();if(1===t)i[o]=a.getUint32();else if(t>0){let e=[];for(let r=0;r<t;r++)e.push(a.getUint32());i[o]=e}}else{let t=a.getVarints();if(1===t)i[o]=a.getVarints();else if(t>0){let e=[];for(let r=0;r<t;r++)e.push(a.getVarints());i[o]=e}}break;case 2:case 3:a.getUint8()&&a.getUint32();break;default:console.warn("Unrecognized instance tree node type.")}var c=0;0===u&&(c=e<2?a.getUint16():a.getVarints()),s[o]=c,o++}var h=new Uint32Array(n.length);h.set(n);var l=new Float32Array(r.length);l.set(r);var f=new Uint32Array(s.length);return f.set(s),{dbIds:h,fragIds:i,transforms:l,childCounts:f}}(e,n)}))},C.prototype.loadRemainingSvf=function(t){var e=this;this.manifest=t.manifest;var r=this.manifest,i=r.assets;const o=k(this.zipPack,"metadata.json");var l=new a.z(o);o.byteLength>3&&0!==o[3]&&(this.metadata=JSON.parse(l.getString(o.byteLength)).metadata,function(t,e){if(t.metadata){var r=t.metadata["world bounding box"],n=new s.S(r.minXYZ[0],r.minXYZ[1],r.minXYZ[2]),i=new s.S(r.maxXYZ[0],r.maxXYZ[1],r.maxXYZ[2]);t.bbox=new c.K(n,i),t.modelSpaceBBox=t.bbox.clone();var o=function(t,e){var r=t.metadata["custom values"];if(t.placementTransform=e.placementTransform,e.applyScaling){var n="m";t.metadata["distance unit"]&&(n=t.metadata["distance unit"].value),t.scalingUnit=n,"object"==typeof e.applyScaling?(e.applyScaling.from&&(n=e.applyScaling.from),e.applyScaling.to&&(t.scalingUnit=e.applyScaling.to)):t.scalingUnit=e.applyScaling;var i=m(n)/m(t.scalingUnit);if(1!=i){var s=new h.T(!0),o=new h.T(!0);o.elements[0]=i,o.elements[5]=i,o.elements[10]=i,e.placementTransform&&s.copy(e.placementTransform),e.applyPlacementInModelUnits?e.placementTransform=o.multiply(s):e.placementTransform=s.multiply(o),t.placementTransform=e.placementTransform,t.scalingFactor=i}}if(r&&r.refPointTransform){t.refPointTransform=new h.T(!0);var a=t.refPointTransform.elements,u=r.refPointTransform;a[0]=u[0],a[1]=u[1],a[2]=u[2],a[4]=u[3],a[5]=u[4],a[6]=u[5],a[8]=u[6],a[9]=u[7],a[10]=u[8],a[12]=u[9],a[13]=u[10],a[14]=u[11]}else{var c=t.metadata.georeference,l=c&&c.refPointLMV,f=0;if(r&&Object.prototype.hasOwnProperty.call(r,"angleToTrueNorth")&&(f=Math.PI/180*r.angleToTrueNorth),l||f){var d=new h.T(!0),p=d.elements;p[0]=p[5]=Math.cos(f),p[1]=-Math.sin(f),p[4]=Math.sin(f);var g=new h.T(!0);p=g.elements,l&&(p[12]=-l[0],p[13]=-l[1],p[14]=-l[2]),t.refPointTransform=d.multiply(g)}}if(e.applyRefPoint&&t.refPointTransform){var v=new h.T(!0);e.placementTransform&&v.copy(e.placementTransform),v.multiply(t.refPointTransform),t.placementTransform=e.placementTransform=v}else!e.applyRefPoint&&e.placementTransform&&(t.placementTransform=new h.T(!0).copy(e.placementTransform));return t.placementTransform&&function(t){for(var e=t.elements,r=0;r<4;r++)for(var n=0;n<4;n++)if(r===n){if(1!==e[4*r+n])return!1}else if(0!==e[4*r+n])return!1;return!0}(t.placementTransform)&&(t.placementTransform=null),t.placementTransform}(t,e);o&&!t.bbox.isEmpty()&&t.bbox.applyMatrix4(o),e.globalOffset?t.globalOffset=e.globalOffset:t.globalOffset=t.bbox.getCenter(new s.S),g(t,o),t.bbox.isEmpty()||(t.bbox.min.sub(t.globalOffset),t.bbox.max.sub(t.globalOffset)),Object.prototype.hasOwnProperty.call(t.metadata,"double sided geometry")&&t.metadata["double sided geometry"].value&&(t.doubleSided=!0)}}(this,t)),this.packFileTotalSize=0,this.primitiveCount=0;var f=r.typesets,d={};for(let t=0;t<f.length;t++){var p=f[t];d[p.id]=p.types}for(let r=0;r<i.length;r++){var v=i[r];if(!(0,n.Xb)()||"Set.bin"!==v.id){var y=v.type;0==y.indexOf("Autodesk.CloudPlatform.")&&(y=y.substr(23));var b=v.URI,x=v.typeset?d[v.typeset]:null,w=v.usize||0,_=Math.round(w/1048576*1e5)/1e5|0;0!=b.indexOf("embed:/")&&("PackFile"==y?"Autodesk.CloudPlatform.Geometry"==(x?x[0].class:null)&&(this.packFileTotalSize+=w,this.geompacks.push({id:v.id,uri:b,usize:w})):"PropertyAttributes"==y?this.propertydb.attrs.push({path:b}):"PropertyAVs"==y?this.propertydb.avs.push({path:b}):"PropertyIDs"==y?this.propertydb.ids.push({path:b}):"PropertyOffsets"==y?this.propertydb.offsets.push({path:b}):"PropertyValues"==y&&this.propertydb.values.push({path:b}));var I=v.URI,A=null;if(0==I.indexOf("embed:/")&&(I=I.substr(7),A=k(this.zipPack,I)),"ProteinMaterials"==y)-1==I.indexOf("Protein")?this.loadAsyncResource(t,I,A,(function(t){var r=new a.z(t),n=t.byteLength;e.materials=0<n?JSON.parse(r.getString(n)):null})):this.loadAsyncResource(t,I,A,(function(t){var r=new a.z(t),n=t.byteLength;if(0<n)try{e.proteinMaterials=JSON.parse(r.getString(n))}catch(r){for(var i="",s=0;s<t.length;s++)i+=String.fromCharCode(t[s]);try{e.proteinMaterials=JSON.parse(i)}catch(t){console.error("Failed to parse Protein materials file either as UTF8 or ANSI")}}else e.proteinMaterials=null}));else if("StandardMaterials"==y)this.loadAsyncResource(t,I,A,(function(t){var r=new a.z(t),n=t.byteLength;if(0<n){var i=r.getString(n);e.stdSurfMats=JSON.parse(i)}else e.stdSurfMats=null}));else if("MaterialX"==y)this.loadAsyncResource(t,I,A,(function(t){var r=new a.z(t),n=t.byteLength;e.mtlx=0<n?r.getString(n):null}));else if("FragmentList"==y)this.parseFragmentList(v,t,I,A);else if("GeometryMetadataList"==y)this.parseGeometryMetadata(v,t,I,A);else if("PackFile"==y)-1!=I.indexOf("CameraDefinitions.bin")?this.loadAsyncResource(t,I,A,(function(t){e.camDefPack=new u.J(t)})):-1!=I.indexOf("CameraList.bin")?this.loadAsyncResource(t,I,A,(function(t){e.camInstPack=new u.J(t)})):-1!=I.indexOf("LightDefinitions.bin")?this.loadAsyncResource(t,I,A,(function(t){e.lightDefPack=new u.J(t)})):-1!=I.indexOf("LightList.bin")?this.loadAsyncResource(t,I,A,(function(t){e.lightInstPack=new u.J(t)})):-1!=I.indexOf("OverrideSets.bin")?this.loadAsyncResource(t,I,A,(function(t){e.overrideSetsPack=new u.J(t)})):-1!=I.indexOf("Viewpoints.bin")?this.loadAsyncResource(t,I,A,(function(t){e.viewpointDefPack=new u.J(t)})):-1!=I.indexOf("ViewpointTree.bin")&&this.loadAsyncResource(t,I,A,(function(t){e.viewpointTreePack=new u.J(t)}));else if("Animations"==y)this.loadAsyncResource(t,I,A,(function(t){var r=new a.z(t),n=t.byteLength;e.animations=0<n?JSON.parse(r.getString(n)):null}));else if("Topology"==y)e.topologyPath=t.basePath+I,e.topologySizeMB=_;else if(t.loadInstanceTree&&("InstanceTree"==y||"InstanceTreeTree"==y)){var O=x?x[0].version:1;this.parseInstanceTree(t,I,A,O)}}}0==this.pendingRequests&&this.postLoad(t),delete this.zipPack},C.prototype.addTransparencyFlagsToMaterials=function(t){for(var e in t){var r=t[e],n=r.userassets,i=r.materials[n[0]];r.transparent=i.transparent}},C.prototype.postLoadOfCam=function(t){if(this.camDefPack&&this.camInstPack){const t=new s.S;for(var e=0,r=this.camInstPack.getEntryCounts();e<r;e++){var n=p(this.camInstPack,e,this.placementTransform,this.globalOffset),i=b(this.camDefPack,n);y(i,n.transform);var o=this.bbox;if(o&&!o.containsPoint(i.target)){var a=o.getCenter(t).distanceTo(i.position),u=(new s.S).copy(i.target).sub(i.position).normalize().multiplyScalar(a);i.target=(new s.S).copy(i.position).add(u)}this.cameras.push(i)}delete this.camDefPack,delete this.camInstPack}},C.prototype.postLoadOfOverrideSets=function(t){if(this.overrideSetsPack){for(let t=0,e=this.overrideSetsPack.getEntryCounts();t<e;t++){const e=S(this.overrideSetsPack,t);e&&this.overrideSets.push(e)}delete this.overrideSetsPack}},C.prototype.postLoadOfViewpointTree=function(t){if(this.viewpointTreePack){const t=I(this.viewpointTreePack);this.viewpointTreeRoot=t,delete this.viewpointTreePack}},C.prototype.postLoadOfViewpoints=function(t){if(this.viewpointDefPack&&this.camDefPack){for(let t=0,e=this.viewpointDefPack.getEntryCounts();t<e;t++){const e=A(this.viewpointDefPack,this.camDefPack,t);e&&this.viewpoints.push(e)}delete this.viewpointDefPack}},C.prototype.postLoadOfLight=function(t){if(this.lightDefPack&&this.lightInstPack){for(var e=0,r=this.lightInstPack.getEntryCounts();e<r;e++){var n=p(this.lightInstPack,e,this.placementTransform,this.globalOffset);this.lights.push(x(this.lightDefPack,n.definition))}delete this.lightInstPack,delete this.lightDefPack}},C.prototype.postLoadOfFragments=function(t){var e=this.fragments;if(this.geomMetadata){e.polygonCounts=e.geomDataIndexes;var r=this.geomMetadata;null!=r.topoIndexes&&(e.topoIndexes=new Int32Array(e.length));for(var n=0,i=e.length;n<i;n++){var s=e.geomDataIndexes[n];e.entityIndexes[n]=r.entityIndexes[s],e.packIds[n]=r.packIds[s],e.polygonCounts[n]=r.primCounts[s],this.primitiveCount+=r.primCounts[s],null!=r.topoIndexes&&(e.topoIndexes[n]=r.topoIndexes[s])}e.geomDataIndexes=null,this.geomMetadata=null}this.calculateMesh2Frag(e)},C.prototype.calculateMesh2Frag=function(t){for(var e=t.mesh2frag={},r=t.packIds,n=t.entityIndexes,i=0,s=t.length;i<s;i++){var o=r[i]+":"+n[i],a=e[o];void 0===a?e[o]=i:Array.isArray(a)?a.push(i):e[o]=[a,i]}},C.prototype.postLoadOfBBox=function(t){if(!this.bbox||t.placementTransform){for(var e=[1/0,1/0,1/0,-1/0,-1/0,-1/0],r=this.fragments,n=r.boxes,i=0,s=r.length;i<s;i++){var o,a=6*i;for(o=0;o<3;o++)n[a+o]<e[o]&&(e[o]=n[a+o]);for(o=3;o<6;o++)n[a+o]>e[o]&&(e[o]=n[a+o])}this.bbox={min:{x:e[0],y:e[1],z:e[2]},max:{x:e[3],y:e[4],z:e[5]}}}},C.prototype.postLoadOfObjectIds=function(t){let e=new Set(t.objectIds);if(e.size>0){let t=new Set,r=new Set;for(let n=0;n<this.fragments.length;++n)e.has(this.fragments.fragId2dbId[n])&&(t.add(this.fragments.packIds[n]),r.add(n));let n=new Set;for(let e=0;e<this.geompacks.length;++e)t.has(parseInt(this.geompacks[e].id))&&n.add(this.geompacks[e]);this.geompacks=[...n];let i=function(t,e){t.length=e.length,t.numLoaded=0;let r=t.length,n=[1/0,1/0,1/0,-1/0,-1/0,-1/0],i=new Float32Array(6*r),s=new Float32Array(12*r),o=new Int32Array(r),a=new Int32Array(r),u=new Int32Array(r),c=new Uint16Array(r),h=new Int32Array(r),l=new Int32Array(r),f=t.geomDataIndexes?new Int32Array(r):null,d=t.topoIndexes?new Int32Array(r):null;var p={};for(let r=0;r<e.length;++r){let m=e[r],g=6*m,v=6*r;for(let e=0;e<6;++e)i[v++]=t.boxes[g++];g=12*m,v=12*r;for(let e=0;e<12;++e)s[v++]=t.transforms[g++];o[r]=t.materials[m],a[r]=t.packIds[m],u[r]=t.entityIndexes[m],c[r]=t.visibilityFlags[m],h[r]=t.fragId2dbId[m],l[r]=t.polygonCounts[m],f&&(f[r]=t.geomDataIndexes[m]),d&&(d[r]=t.topoIndexes[m]);let y=t.packIds[m]+":"+t.entityIndexes[m],b=p[y];null==b?p[y]=r:Array.isArray(b)?b.push(r):p[y]=[b,r];let x=6*r;for(let t=0;t<3;++t)i[x+t]<n[t]&&(n[t]=i[x+t]);for(let t=3;t<6;++t)i[x+t]>n[t]&&(n[t]=i[x+t])}return t.boxes=i,t.transforms=s,t.materials=o,t.packIds=a,t.entityIndexes=u,t.mesh2frag=p,t.visibilityFlags=c,t.fragId2dbId=h,t.polygonCounts=l,t.geomDataIndexes=f,t.topoIndexes=d,t.totalLength=r,n}(this.fragments,[...r]);this.bbox={min:{x:i[0],y:i[1],z:i[2]},max:{x:i[3],y:i[4],z:i[5]}}}},C.prototype.postLoadBubbleConsolidation=function(){const t=this.viewpointTreeRoot;if(t&&(t.name=t.name||"Saved Viewpoints"),null==t||!t.children)return;let e=0;function r(t){if(t.children){for(let e=0;e<t.children.length;e++)r(t.children[e]);t.type="folder",t.role="viewable",t.guid=e+++""}else isNaN(t.entry)||(t.order=e,t.type="view",t.role="3d",t.guid=e+++"",t.isViewpoint=!0)}for(let e=0;e<t.children.length;e++)r(t.children[e])},C.prototype.postLoadComplete=function(t){if(t.loadDoneCB("svf"),this.fragments.polygonCounts){var e=performance.now(),r=this.materials?this.materials.materials:null;r&&this.addTransparencyFlagsToMaterials(r),this.bvh=new i.iD(this.fragments,r),this.bvh.build(t.bvhOptions);var n=performance.now();t.worker.debug("BVH build time (worker thread):"+(n-e)),t.loadDoneCB("bvh")}t.loadDoneCB("done")},C.prototype.postLoad=function(t){!function(t){if(t.animations){var e=t.animations.animations;if(e)for(var r=t.globalOffset,n=(new h.T).makeTranslation(r.x,r.y,r.z),i=(new h.T).makeTranslation(-r.x,-r.y,-r.z),s=new h.T,o=new h.T,a=0;a<e.length;a++){var u=e[a];if(u.hierarchy)for(var c=0;c<u.hierarchy.length;c++){var l=u.hierarchy[c].keys;if(l)for(var f=0;f<l.length;f++){var d=l[f].pos;if(d){var p=r,m=l[f].rot;m&&(s.makeRotationFromQuaternion({x:m[0],y:m[1],z:m[2],w:m[3]}),o.multiplyMatrices(n,s).multiply(i),p={x:o.elements[12],y:o.elements[13],z:o.elements[14]}),v(d,p)}var g=l[f].target;g&&v(g,r);var y=l[f].points;if(y)for(var b=0;b<y.length;b++)v(y[b],r)}}}}}(this),this.postLoadOfOverrideSets(t),this.postLoadOfViewpoints(t),this.postLoadOfViewpointTree(t),this.postLoadOfCam(t),this.postLoadOfLight(t),this.postLoadOfFragments(t),this.postLoadOfBBox(t),this.postLoadOfObjectIds(t),this.postLoadBubbleConsolidation(),this.postLoadComplete(t)};var T=r(7480);function M(t,e){try{e()}catch(e){t.worker.raiseError(T.tG.BAD_DATA,"Unhandled exception while loading SVF",{url:t.url,exception:e.toString(),stack:e.stack}),t.worker.postMessage(null)}}function E(t){var e=t.worker;M(t,(function(){var r=t.svf;t.loadDoneCB=function(n,i){if("svf"==n){var s,o,a=r.fragments,u=[a.transforms.buffer,a.packIds.buffer,a.entityIndexes.buffer,a.fragId2dbId.buffer,a.visibilityFlags.buffer];r.bvh?(o={nodes:r.bvh.nodes.getRawData(),primitives:r.bvh.primitives,useLeanNodes:32==r.bvh.nodes.bytes_per_node},u.push(o.nodes),u.push(o.primitives.buffer),u.push(a.boxes.buffer),u.push(a.polygonCounts.buffer),u.push(a.materials.buffer),s={svf:r,bvh:o,progress:1}):s={svf:r,progress:.8},e.postMessage(s,u)}else if("bvh"==n)o={nodes:r.bvh.nodes.getRawData(),primitives:r.bvh.primitives,useLeanNodes:32==r.bvh.nodes.bytes_per_node},e.postMessage({bvh:o,basePath:r.basePath,progress:1},[o.nodes,o.primitives.buffer]);else if("mesh"==n){var c=[];i.mesh&&c.push(i.mesh.vb.buffer),e.postMessage(i,c)}else"done"==n?e.postMessage({progress:1}):(e.raiseError(T.tG.BAD_DATA,"Failure while loading SVF",{url:t.url}),e.postMessage(null))},r.loadRemainingSvf(t)}))}function F(t){var e=t.worker;e.postMessage({progress:.01});var r={responseType:"arraybuffer"};o.PG.getItem(t,t.url,(function(r){e.postMessage({progress:.5}),M(t,(function(){var n=new C(new Uint8Array(r));t.svf=n,n.loadManifest(t),t.interceptManifest?e.postMessage({manifest:n.manifest}):(t.manifest=n.manifest,E(t))}))}),t.onFailureCallback,r),o.PG.getItem(t,t.basePath+"0.pf",(function(){}),(function(){}),r)}function R(t){var e=t.worker;function r(t){e.postMessage({"fetch-topology":{error:t,topology:null}})}o.PG.getItem(t,t.path,(function(t){e.postMessage({"status-topology":{}});var n=null;try{var i=new a.z(t),s=t.byteLength;0<s&&(n=JSON.parse(i.getString(s))),n?e.postMessage({"fetch-topology":{error:null,topology:n}}):r("topology-no-content")}catch(t){r(t)}}),r)}function z(t){t.register("LOAD_SVF",{doOperation:F}),t.register("LOAD_SVF_CONTD",{doOperation:E}),t.register("FETCH_TOPOLOGY",{doOperation:R})}},6916:(t,e,r)=>{"use strict";r.d(e,{vF:()=>f});var n=r(6247),i=r(577);class s{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t}init(){}register(){}static get name(){return null}static get defaultOptions(){return{}}optIn(t){}optOut(t){}hasOptedOut(){}getDistinctId(){}track(t,e){}identify(t){}}const o=new class{constructor(){this.providerMap={},this.instances=[],this.superProps={},this.shouldTrack=!0,this.trackCache=[],this.oneTimers={}}registerProvider(t){if(!t)return void f.error("Undefined provider");if(!t.name)return void f.error("missing provider name");const e=t.name.toLowerCase();this.isProviderRegistered(e)?f.warn(`Provider with name ${t.name} already registered`):this.providerMap[e]=t;const r=this.createInstance(t.name,t.defaultOptions);this.instances.push(r),this.shouldTrack&&this.init(r),this.trackCache.length>0&&(this.trackCache.forEach((t=>{let{event:e,properties:r}=t;this.track(e,r)})),this.trackCache=[])}isProviderRegistered(t){var e;return("string"==typeof t?t:null===(e=t.name)||void 0===e?void 0:e.toLowerCase())in this.providerMap}init(t){t.initialized||(t.init(),t.register(this.superProps))}createInstance(t,e){const r=t&&t.toLowerCase();if(!(r in this.providerMap))return void f.error(`Unknown ${t}`);const n=this.providerMap[r],i=new n(e);if(!(i instanceof s))throw new Error("not an analytics provider");return n.instanceCount=n.instanceCount||0,i.name=`${r}-${n.instanceCount}`,n.instanceCount++,i}optIn(t){this.instances.forEach((t=>this.init(t))),this._callMethod("optIn",t),this.shouldTrack=!0}optOut(t){this._callMethod("optOut",t),this.shouldTrack=!1}hasOptedOut(){return this._callMethod("hasOptedOut")}getDistinctId(){return this._callMethod("getDistinctId")}track(t,e,r){if(this.shouldTrack){if(r){const r={event:t,properties:e};try{const t=JSON.stringify(r);if(this.oneTimers[t])return;this.oneTimers[t]=!0}catch(t){}}0===this.instances.length?this.trackCache.push({event:t,properties:e}):this._callMethod("track",t,e)}}identify(t){this._callMethod("identify",t)}_callMethod(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];const n=e[0],i=e.slice(1,e.length);return this.instances.map((t=>({name:t.name,value:t[n](...i)})))}},a=(0,n.mS)(),u=a;function c(){this.runtimeStats={},this.level=-1,this.setLevel(1),this._reportError=this._reportError.bind(this)}function h(t,e){let r;"string"==typeof e?r={message:e}:"object"==typeof e&&(r=e),o.track(t,r)}function l(){}c.prototype.initialize=function(t){if(t.eventCallback&&(this.callback=t.eventCallback),this.sessionId=t.sessionId,!this.sessionId){var e=Date.now()+"";this.sessionId=parseFloat((1e4*Math.random()|0)+""+e.substring(4))}"number"==typeof t.logLevel&&this.setLevel(t.logLevel),this.environmentInfo={touch:(0,n.CN)(),env:(0,i._$)(),referer:"undefined"!=typeof window?encodeURI(u.location.href):"",version:a.LMV_VIEWER_VERSION,build_type:a.LMV_BUILD_TYPE};var r={category:"viewer_start",touch:this.environmentInfo.touch,env:this.environmentInfo.env,referer:this.environmentInfo.referer,version:this.environmentInfo.version,build_type:this.environmentInfo.build_type};this.track(r);var s=this;this.interval=setInterval((function(){s.reportRuntimeStats()}),6e4)},c.prototype.shutdown=function(){clearInterval(this.interval),this.interval=void 0},c.prototype.track=function(t){this.updateRuntimeStats(t),!(0,i.aK)()&&this.sessionId&&(this.callback&&(t.timestamp=Date.now(),t.sessionId=this.sessionId,this.callback(t)),"error"===(null==t?void 0:t.category)&&h("viewer.error.tracked",t))},c.prototype.updateRuntimeStats=function(t){if(Object.prototype.hasOwnProperty.call(t,"aggregate"))switch(t.aggregate){case"count":this.runtimeStats[t.name]>0?this.runtimeStats[t.name]++:this.runtimeStats[t.name]=1,this.runtimeStats._nonempty=!0;break;case"last":this.runtimeStats[t.name]=t.value,this.runtimeStats._nonempty=!0;break;default:this.warn("unknown log aggregate type")}},c.prototype.reportRuntimeStats=function(){this.runtimeStats._nonempty&&(delete this.runtimeStats._nonempty,this.runtimeStats.category="misc_stats",this.track(this.runtimeStats),this.runtimeStats={})},c.prototype.setLevel=function(t){this.level!==t&&(this.level=t,this.debug=t>=5?console.log:l,this.log=t>=4?console.log:l,this.info=t>=3?console.info:l,this.warn=t>=2?console.warn:l,this.error=t>=1?this._reportError:l)},c.prototype._reportError=function(){console.error.apply(console,arguments);const t=Array.prototype.slice.call(arguments).join(" ");this.callback&&this.callback({category:"error",message:t}),h("viewer.error.logged",t)};let f=new c},5468:(t,e,r)=>{"use strict";function n(t,e){var r,n;this.bytes_per_node=e?32:36,t instanceof ArrayBuffer?(r=t.byteLength/this.bytes_per_node,n=t,this.nodeCount=r):(r=0|t,n=new ArrayBuffer(this.bytes_per_node*r),this.nodeCount=0),this.nodeCapacity=r,this.nodesRaw=n,this.is_lean_node=e,this.node_stride=this.bytes_per_node/4,this.node_stride_short=this.bytes_per_node/2,this.nodesF=new Float32Array(this.nodesRaw),this.nodesI=new Int32Array(this.nodesRaw),this.nodesS=new Uint16Array(this.nodesRaw)}r.d(e,{iD:()=>h}),n.prototype.setLeftChild=function(t,e){this.nodesI[t*this.node_stride+6]=e},n.prototype.getLeftChild=function(t){return this.nodesI[t*this.node_stride+6]},n.prototype.setPrimStart=function(t,e){this.is_lean_node?this.nodesI[t*this.node_stride+6]=e:this.nodesI[t*this.node_stride+8]=e},n.prototype.getPrimStart=function(t){return this.is_lean_node?this.nodesI[t*this.node_stride+6]:this.nodesI[t*this.node_stride+8]},n.prototype.setPrimCount=function(t,e){this.nodesS[t*this.node_stride_short+14]=e},n.prototype.getPrimCount=function(t){return this.nodesS[t*this.node_stride_short+14]},n.prototype.setFlags=function(t,e,r,n){this.nodesS[t*this.node_stride_short+15]=n<<3|r<<2|3&e},n.prototype.getFlags=function(t){return this.nodesS[t*this.node_stride_short+15]},n.prototype.setBox0=function(t,e){var r=t*this.node_stride,n=this.nodesF;n[r]=e[0],n[r+1]=e[1],n[r+2]=e[2],n[r+3]=e[3],n[r+4]=e[4],n[r+5]=e[5]},n.prototype.getBoxThree=function(t,e){var r=t*this.node_stride,n=this.nodesF;e.min.x=n[r],e.min.y=n[r+1],e.min.z=n[r+2],e.max.x=n[r+3],e.max.y=n[r+4],e.max.z=n[r+5]},n.prototype.getBoxArray=function(t,e,r){var n=t*this.node_stride,i=this.nodesF;e[0+(r=r||0)]=i[n],e[1+r]=i[n+1],e[2+r]=i[n+2],e[3+r]=i[n+3],e[4+r]=i[n+4],e[5+r]=i[n+5]},n.prototype.setBoxThree=function(t,e){var r=t*this.node_stride,n=this.nodesF;n[r]=e.min.x,n[r+1]=e.min.y,n[r+2]=e.min.z,n[r+3]=e.max.x,n[r+4]=e.max.y,n[r+5]=e.max.z},n.prototype.makeEmpty=function(t){var e=t*this.node_stride,r=this.nodesI;r[e+6]=-1,r[e+7]=0,this.is_lean_node||(r[e+8]=-1)},n.prototype.realloc=function(t){if(this.nodeCount+t>this.nodeCapacity){var e=0|3*this.nodeCapacity/2;e<this.nodeCount+t&&(e=this.nodeCount+t);var r=new ArrayBuffer(e*this.bytes_per_node),n=new Int32Array(r);n.set(this.nodesI),this.nodeCapacity=e,this.nodesRaw=r,this.nodesF=new Float32Array(r),this.nodesI=n,this.nodesS=new Uint16Array(r)}},n.prototype.nextNodes=function(t){this.realloc(t);var e=this.nodeCount;this.nodeCount+=t;for(var r=0;r<t;r++)this.makeEmpty(e+r);return e},n.prototype.getRawData=function(){return this.nodesRaw.slice(0,this.nodeCount*this.bytes_per_node)};var i=3,s=1e-5,o=function(){function t(t,e,r){t[0]>e[r]&&(t[0]=e[r]),t[3]<e[r]&&(t[3]=e[r]),t[1]>e[r+1]&&(t[1]=e[r+1]),t[4]<e[r+1]&&(t[4]=e[r+1]),t[2]>e[r+2]&&(t[2]=e[r+2]),t[5]<e[r+2]&&(t[5]=e[r+2])}function e(t,e,r){t[0]>e[r]&&(t[0]=e[r]),t[1]>e[r+1]&&(t[1]=e[r+1]),t[2]>e[r+2]&&(t[2]=e[r+2]),t[3]<e[r+3]&&(t[3]=e[r+3]),t[4]<e[r+4]&&(t[4]=e[r+4]),t[5]<e[r+5]&&(t[5]=e[r+5])}function r(t,e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]>e[2]&&(t[2]=e[2]),t[3]<e[3]&&(t[3]=e[3]),t[4]<e[4]&&(t[4]=e[4]),t[5]<e[5]&&(t[5]=e[5])}function n(t,e,r,n){for(var i=0;i<3;i++)t[e+i]=r[n+3+i]-r[n+i]}function i(t,e){t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]}var o=1/0;function a(t){t[0]=o,t[1]=o,t[2]=o,t[3]=-1/0,t[4]=-1/0,t[5]=-1/0}function u(t,e,r){return t<0||e<0||r<0?0:2*(t*e+e*r+r*t)}function c(t){var e=t[3]-t[0],r=t[4]-t[1],n=t[5]-t[2];return e<0||r<0||n<0?0:2*(e*r+r*n+n*e)}function h(){this.vb_left=new Float32Array(6),this.vb_right=new Float32Array(6),this.cb_left=new Float32Array(6),this.cb_right=new Float32Array(6),this.num_left=0,this.best_split=-1,this.best_cost=-1,this.num_bins=-1}function l(){this.box_bbox=new Float32Array(6),this.box_centroid=new Float32Array(6),this.num_prims=0}function f(){this.BL=new Float32Array(6),this.CL=new Float32Array(6),this.NL=0,this.AL=0}h.prototype.reset=function(){this.num_left=0,this.best_split=-1,this.best_cost=-1,this.num_bins=-1},l.prototype.reset=function(){this.num_prims=0,a(this.box_bbox),a(this.box_centroid)},f.prototype.reset=function(){this.NL=0,this.AL=0,a(this.BL),a(this.CL)};var d,p=[];for(d=0;d<16;d++)p.push(new l);var m=[];for(d=0;d<15;d++)m.push(new f);var g=new Float32Array(6),v=new Float32Array(6);var y=new Float32Array(3);return{bvh_subdivide:function(o,u,l,f,d,b,x,w){n(y,0,b,0);var _=o.nodes,I=x?o.frags_per_leaf_node_transparent:o.frags_per_leaf_node,A=x?o.frags_per_inner_node_transparent:o.frags_per_inner_node,O=o.max_polys_per_node,S=0;y[1]>y[0]&&(S=1),y[2]>y[S]&&(S=2),_.setBox0(u,d);var P=0,k=0,C=f-l+1;let T=!1;if(o.finfo.hasPolygonCounts&&o.frags_per_inner_node){let t=new Set;var M=C<=o.frags_per_inner_node?f:l+o.frags_per_inner_node-1;const e=o.prim_sizes[o.primitives[l]];let r,n=l;for(;n<=M;n++){const i=o.primitives[n];if(T=(P+=o.finfo.getPolygonCount(i))>O,r=e/o.prim_sizes[i],T||=e>s&&r>o.max_size_ratio,o.per_tile_consolidation&&(t.add(o.finfo.getDrawCallId(i)),T||=t.size>=o.max_drawcalls_per_node),k++,T){++n;break}}if(o.per_tile_consolidation&&t.size>=o.max_drawcalls_per_node){const i=n;let a=[],u=[],c=!1;for(;n<=M;n++){const i=o.primitives[n],h=o.finfo.getPolygonCount(i);if(t.has(o.finfo.getDrawCallId(i))){if(c||=P+h>O,r=e/o.prim_sizes[i],c||=e>s&&r>o.max_size_ratio,c)break;a.push(i),k++,P+=h}else u.push(i)}if(a.length>0){n=i;for(let t=0;t<a.length;t++,n++)o.primitives[n]=a[t];for(let t=0;t<u.length;t++,n++)o.primitives[n]=u[t]}T||=c}}if(C<=I&&P<O&&!T||1===C||w>15||y[S]<o.scene_epsilon)return _.setLeftChild(u,-1),_.setPrimStart(u,l),_.setPrimCount(u,f-l+1),void _.setFlags(u,0,0,x?1:0);A&&(S=function(e,r,i,s,o,u,c,h){var l=e.primitives,f=e.centroids,d=o-s+1;d>e.frags_per_inner_node&&(d=e.frags_per_inner_node),d>h&&(d=h),r.setPrimStart(i,s),r.setPrimCount(i,d),s+=d,a(u);for(var p=s;p<=o;p++)t(u,f,3*l[p]);n(c,0,u,0);var m=0;return c[1]>c[0]&&(m=1),c[2]>c[m]&&(m=2),m}(o,_,u,l,f,b,y,k),l+=_.getPrimCount(u));var E=new h;if(function(n,s,o,a,u,h,l){if(h[a]<n.scene_epsilon)l.best_cost=1/0;else{var f,d,y=16;for(y>o-s+1&&(y=o-s+1),f=0;f<y;f++)p[f].reset();for(f=0;f<y-1;f++)m[f].reset();for(l.num_bins=y,function(r,n,i,s,o,a,u){for(var c=r.centroids,h=r.primitives,l=r.finfo.boxes,f=r.finfo.boxStride,d=.99999*u/a[s],m=o[s],g=r.sort_prims,v=n;v<=i;v++){var y=0|h[v],b=0|d*(c[3*y+s]-m);b<0?b=0:b>=u&&(b=u-1),g[v]=b,p[b].num_prims++,e(p[b].box_bbox,l,y*f),t(p[b].box_centroid,c,3*y)}}(n,s,o,a,u,h,y),i(m[0].BL,p[0].box_bbox),i(m[0].CL,p[0].box_centroid),m[0].AL=c(m[0].BL),m[0].NL=p[0].num_prims,f=1;f<y-1;f++){d=p[f];var b=m[f];i(b.BL,m[f-1].BL),r(b.BL,d.box_bbox),b.AL=c(b.BL),i(b.CL,m[f-1].CL),r(b.CL,d.box_centroid),b.NL=m[f-1].NL+d.num_prims}i(g,p[f=y-1].box_bbox),i(v,p[f].box_centroid);var x=c(g),w=p[f].num_prims,_=f,I=x*w+m[f-1].AL*m[f-1].NL;for(i(l.vb_right,g),i(l.cb_right,p[f].box_centroid),i(l.vb_left,m[f-1].BL),i(l.cb_left,m[f-1].CL),l.num_left=m[f-1].NL,f-=1;f>=1;f--){d=p[f],r(g,d.box_bbox),r(v,d.box_centroid);var A=(x=c(g))*(w+=d.num_prims)+m[f-1].AL*m[f-1].NL;A<=I&&(I=A,_=f,i(l.vb_right,g),i(l.cb_right,v),i(l.vb_left,m[f-1].BL),i(l.cb_left,m[f-1].CL),l.num_left=m[f-1].NL)}l.best_split=_,l.best_cost=I}}(o,l,f,S,b,y,E),E.num_bins<0)_.setPrimCount(u,_.getPrimCount(u)+f-l+1);else{!function(t,e,r,n,i,s,o){var a,u,c=t.primitives,h=t.sort_prims,l=0,f=0|e,d=0|o.best_split;for(a=e;a<=r;a++){var p=0|c[a];h[a]<d?c[f++]=p:h[l++]=p}for(u=0;u<l;u++)c[f+u]=h[u]}(o,l,f,0,0,0,E);var F=_.nextNodes(2),R=.5*(E.vb_left[3+S]+E.vb_left[S]),z=.5*(E.vb_right[3+S]+E.vb_right[S]);_.setFlags(u,S,R<z?0:1,x?1:0),_.setLeftChild(u,F),o.recursion_stack.push([o,F+1,l+E.num_left,f,E.vb_right,E.cb_right,x,w+1]),o.recursion_stack.push([o,F,l,l+E.num_left-1,E.vb_left,E.cb_left,x,w+1])}},compute_boxes:function(r){var i=r.boxv_o,o=r.boxc_o,u=r.boxv_t,c=r.boxc_t;a(i),a(o),a(u),a(c);for(var h,l,f,d,p=r.centroids,m=r.finfo.boxes,g=r.finfo.boxStride,v=0,b=r.prim_count;v<b;v++){var x=r.primitives[v];f=m,d=g*x,(h=p)[l=3*x]=.5*(f[d]+f[d+3]),h[l+1]=.5*(f[d+1]+f[d+4]),h[l+2]=.5*(f[d+2]+f[d+5]),v>=r.first_transparent?(t(c,p,3*x),e(u,m,g*x)):(t(o,p,3*x),e(i,m,g*x))}n(y,0,r.boxv_o,0);var w=Math.max(y[0],y[1],y[2]);r.scene_epsilon=s*w},box_area:function(t,e){return u(t[e+3]-t[e],t[e+4]-t[e+1],t[e+5]-t[e+2])},sqr_diag_len:function(t,e){var r=t[e+3]-t[e],n=t[e+4]-t[e+1],i=t[e+5]-t[e+2];return r*r+n*n+i*i},box_area_three:function(t){return u(t.max.x-t.min.x,t.max.y-t.min.y,t.max.z-t.min.z)}}}();function a(t,e){this.boxes=t.boxes,this.polygonCounts=t.polygonCounts,this.hasPolygonCounts=!!this.polygonCounts,this.geomIds=t.geomids,this.flags=t.flags,this.materials=t.materials,this.materialDefs=e,this.count=t.length,this.boxStride=6,this.wantSort=t.wantSort??!0}a.prototype.getCount=function(){return this.count},a.prototype.isTransparent=function(t){return this.flags?!!(this.flags[t]&u.IS_TRANSPARENT):!(!this.materialDefs||!this.materialDefs[this.materials[t]])&&this.materialDefs[this.materials[t]].transparent},a.prototype.getPolygonCount=function(t){return this.polygonCounts[t]},a.prototype.getGeometryId=function(t){return this.geomIds[t]},a.prototype.getCanBeConsolidated=function(t){return!!this.flags[t]&u.IS_CONSOLIDATED},a.prototype.getDrawCallId=function(t){return`${this.materials[t]}${this.getCanBeConsolidated(t)?"":"_"+this.getGeometryId(t)}`},a.prototype.supportsPerTileConsolidation=function(){return!!this.materials&&!!this.flags&&!!this.geomIds};const u=Object.freeze({IS_CONSOLIDATED:1,IS_TRANSPARENT:2}),c=Object.freeze({BOX_AREA:"box_area",DIAMETER:"sqr_diag_len"});function h(t,e,r){this.finfo=r||new a(t,e),this.prim_count=this.finfo.getCount(),this.frags_per_leaf_node=-1,this.frags_per_inner_node=-1,this.nodes=null,this.work_buf=new ArrayBuffer(4*this.prim_count),this.sort_prims=new Int32Array(this.work_buf),this.primitives=new Int32Array(this.prim_count),this.centroids=new Float32Array(i*this.prim_count),this.boxv_o=new Float32Array(6),this.boxc_o=new Float32Array(6),this.boxv_t=new Float32Array(6),this.boxc_t=new Float32Array(6),this.recursion_stack=[]}h.prototype.sortPrimitives=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.BOX_AREA;var r=new Float32Array(this.max_size_ratio===1/0?this.work_buf:this.prim_count),n=this.primitives,i=0,s=t;const a=o[e];var u,h;for(u=0,h=this.prim_count;u<h;u++){n[u]=u;var l=this.finfo.isTransparent(u);l&&i++,s?(r[u]=a(this.finfo.boxes,this.finfo.boxStride*u),l&&(r[u]=-r[u])):r[u]=l?-1:1}if(s)Array.prototype.sort.call(this.primitives,(function(t,e){return r[e]-r[t]}));else if(i&&i<this.prim_count){var f=new Int32Array(i),d=0,p=0;for(u=0,h=this.prim_count;u<h;u++)r[u]>=0?n[d++]=n[u]:f[p++]=n[u];n.set(f,this.prim_count-i)}this.prim_sizes=r,this.first_transparent=this.prim_count-i},h.prototype.build=function(t){var e=t&&!!t.useSlimNodes,r=this;function i(e,n){Object.prototype.hasOwnProperty.call(t,e)?r[e]=t[e]:r[e]=n}if(i("max_size_ratio",1/0),i("per_tile_consolidation",!1),t.sortFuncType===c.DIAMETER&&(this.max_size_ratio*=this.max_size_ratio),e)i("frags_per_leaf_node",1),i("frags_per_inner_node",0),i("frags_per_leaf_node_transparent",1),i("frags_per_inner_node_transparent",0),i("max_polys_per_node",1/0);else{var s=t.isWeakDevice?.5:1;i("frags_per_leaf_node",0|256*s),i("frags_per_inner_node",0|this.frags_per_leaf_node),i("frags_per_leaf_node_transparent",this.frags_per_leaf_node),i("frags_per_inner_node_transparent",0),i("max_polys_per_node",0|2e4*s),i("max_drawcalls_per_node",1/0),i("want_sort",this.finfo.wantSort)}if(this.per_tile_consolidation=this.per_tile_consolidation&&this.finfo.supportsPerTileConsolidation()&&this.want_sort,this.nodes&&this.nodes.is_lean_node==e)this.nodes.nodeCount=0;else{for(var a=this.prim_count/this.frags_per_leaf_node,u=1;u<a;)u*=2;this.nodes=new n(u,!!t&&t.useSlimNodes)}this.sortPrimitives(this.want_sort,t.sortFuncType),o.compute_boxes(this);var h,l=this.nodes.nextNodes(2);for(o.bvh_subdivide(this,l,0,this.first_transparent-1,this.boxv_o,this.boxc_o,!1,0);this.recursion_stack.length;)h=this.recursion_stack.pop(),o.bvh_subdivide(h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7]);for(o.bvh_subdivide(this,l+1,this.first_transparent,this.prim_count-1,this.boxv_t,this.boxc_t,!0,0);this.recursion_stack.length;)h=this.recursion_stack.pop(),o.bvh_subdivide(h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7]);this.prim_sizes.buffer!==this.work_buf&&delete this.prim_sizes}},1706:(t,e,r)=>{"use strict";r.d(e,{K:()=>i});var n=r(6118);let i=function(t,e){this.min=void 0!==t?t:new n.S(1/0,1/0,1/0),this.max=void 0!==e?e:new n.S(-1/0,-1/0,-1/0)};var s,o,a;i.prototype={constructor:i,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,r=t.length;e<r;e++)this.expandByPoint(t[e]);return this},setFromArray:function(t,e){return this.min.x=t[e],this.min.y=t[e+1],this.min.z=t[e+2],this.max.x=t[e+3],this.max.y=t[e+4],this.max.z=t[e+5],this},copyToArray:function(t,e){t[e]=this.min.x,t[e+1]=this.min.y,t[e+2]=this.min.z,t[e+3]=this.max.x,t[e+4]=this.max.y,t[e+5]=this.max.z},setFromCenterAndSize:(a=new n.S,function(t,e){var r=a.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(r),this.max.copy(t).add(r),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},empty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},isEmpty:function(){return this.empty()},center:function(t){return console.warn("LmvBox3.center() is deprecated. Use LmvBox3.getCenter() instead."),this.getCenter(t)},getCenter:function(t){return(t||new n.S).addVectors(this.min,this.max).multiplyScalar(.5)},size:function(t){return(t||new n.S).subVectors(this.max,this.min)},getSize:function(t){return(t||new n.S).subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)},containsBox:function(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:function(t,e){return(e||new n.S).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))},isIntersectionBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)},intersectsBox:function(t){return this.isIntersectionBox(t)},clampPoint:function(t,e){return(e||new n.S).copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new n.S;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:(s=new n.S,o=new n.S,function(t){for(var e=t.elements,r=0;r<3;r++){let t=e[12+r],u=t;for(var n=0;n<3;n++){var i=e[r+4*n]*this.min.getComponent(n),a=e[r+4*n]*this.max.getComponent(n);t+=Math.min(i,a),u+=Math.max(i,a)}s.setComponent(r,t),o.setComponent(r,u)}return this.min.copy(s),this.max.copy(o),this}),translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}},7365:(t,e,r)=>{"use strict";r.d(e,{T:()=>i});var n=r(6118);let i=function(t){this.elements=t?new Float64Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]):new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.isDoublePrecision=!!t};var s,o,a,u,c;i.prototype={constructor:i,set:function(t,e,r,n,i,s,o,a,u,c,h,l,f,d,p,m){var g=this.elements;return g[0]=t,g[4]=e,g[8]=r,g[12]=n,g[1]=i,g[5]=s,g[9]=o,g[13]=a,g[2]=u,g[6]=c,g[10]=h,g[14]=l,g[3]=f,g[7]=d,g[11]=p,g[15]=m,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},copy:function(t){return this.elements.set(t.elements),this},makeRotationFromQuaternion:function(t){var e=this.elements,r=t.x,n=t.y,i=t.z,s=t.w,o=r+r,a=n+n,u=i+i,c=r*o,h=r*a,l=r*u,f=n*a,d=n*u,p=i*u,m=s*o,g=s*a,v=s*u;return e[0]=1-(f+p),e[4]=h-v,e[8]=l+g,e[1]=h+v,e[5]=1-(c+p),e[9]=d-m,e[2]=l-g,e[6]=d+m,e[10]=1-(c+f),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},multiply:function(t){return this.multiplyMatrices(this,t)},multiplyMatrices:function(t,e){var r=t.elements,n=e.elements,i=this.elements,s=r[0],o=r[4],a=r[8],u=r[12],c=r[1],h=r[5],l=r[9],f=r[13],d=r[2],p=r[6],m=r[10],g=r[14],v=r[3],y=r[7],b=r[11],x=r[15],w=n[0],_=n[4],I=n[8],A=n[12],O=n[1],S=n[5],P=n[9],k=n[13],C=n[2],T=n[6],M=n[10],E=n[14],F=n[3],R=n[7],z=n[11],V=n[15];return i[0]=s*w+o*O+a*C+u*F,i[4]=s*_+o*S+a*T+u*R,i[8]=s*I+o*P+a*M+u*z,i[12]=s*A+o*k+a*E+u*V,i[1]=c*w+h*O+l*C+f*F,i[5]=c*_+h*S+l*T+f*R,i[9]=c*I+h*P+l*M+f*z,i[13]=c*A+h*k+l*E+f*V,i[2]=d*w+p*O+m*C+g*F,i[6]=d*_+p*S+m*T+g*R,i[10]=d*I+p*P+m*M+g*z,i[14]=d*A+p*k+m*E+g*V,i[3]=v*w+y*O+b*C+x*F,i[7]=v*_+y*S+b*T+x*R,i[11]=v*I+y*P+b*M+x*z,i[15]=v*A+y*k+b*E+x*V,this},multiplyToArray:function(t,e,r){var n=this.elements;return this.multiplyMatrices(t,e),r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[8]=n[8],r[9]=n[9],r[10]=n[10],r[11]=n[11],r[12]=n[12],r[13]=n[13],r[14]=n[14],r[15]=n[15],this},multiplyScalar:function(t){var 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:function(){var t=this.elements,e=t[0],r=t[4],n=t[8],i=t[12],s=t[1],o=t[5],a=t[9],u=t[13],c=t[2],h=t[6],l=t[10],f=t[14];return t[3]*(+i*a*h-n*u*h-i*o*l+r*u*l+n*o*f-r*a*f)+t[7]*(+e*a*f-e*u*l+i*s*l-n*s*f+n*u*c-i*a*c)+t[11]*(+e*u*h-e*o*f-i*s*h+r*s*f+i*o*c-r*u*c)+t[15]*(-n*o*c-e*a*h+e*o*l+n*s*h-r*s*l+r*a*c)},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this},flattenToArrayOffset:function(t,e){var r=this.elements;return t[e]=r[0],t[e+1]=r[1],t[e+2]=r[2],t[e+3]=r[3],t[e+4]=r[4],t[e+5]=r[5],t[e+6]=r[6],t[e+7]=r[7],t[e+8]=r[8],t[e+9]=r[9],t[e+10]=r[10],t[e+11]=r[11],t[e+12]=r[12],t[e+13]=r[13],t[e+14]=r[14],t[e+15]=r[15],t},setPosition:function(t){var e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this},invert:function(t){const e=this.elements,r=e[0],n=e[1],i=e[2],s=e[3],o=e[4],a=e[5],u=e[6],c=e[7],h=e[8],l=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=l*g*c-m*f*c+m*u*d-a*g*d-l*u*v+a*f*v,b=p*f*c-h*g*c-p*u*d+o*g*d+h*u*v-o*f*v,x=h*m*c-p*l*c+p*a*d-o*m*d-h*a*v+o*l*v,w=p*l*u-h*m*u-p*a*f+o*m*f+h*a*g-o*l*g,_=r*y+n*b+i*x+s*w;if(0===_)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const I=1/_;return e[0]=y*I,e[1]=(m*f*s-l*g*s-m*i*d+n*g*d+l*i*v-n*f*v)*I,e[2]=(a*g*s-m*u*s+m*i*c-n*g*c-a*i*v+n*u*v)*I,e[3]=(l*u*s-a*f*s-l*i*c+n*f*c+a*i*d-n*u*d)*I,e[4]=b*I,e[5]=(h*g*s-p*f*s+p*i*d-r*g*d-h*i*v+r*f*v)*I,e[6]=(p*u*s-o*g*s-p*i*c+r*g*c+o*i*v-r*u*v)*I,e[7]=(o*f*s-h*u*s+h*i*c-r*f*c-o*i*d+r*u*d)*I,e[8]=x*I,e[9]=(p*l*s-h*m*s-p*n*d+r*m*d+h*n*v-r*l*v)*I,e[10]=(o*m*s-p*a*s+p*n*c-r*m*c-o*n*v+r*a*v)*I,e[11]=(h*a*s-o*l*s-h*n*c+r*l*c+o*n*d-r*a*d)*I,e[12]=w*I,e[13]=(h*m*i-p*l*i+p*n*f-r*m*f-h*n*g+r*l*g)*I,e[14]=(p*a*i-o*m*i-p*n*u+r*m*u+o*n*g-r*a*g)*I,e[15]=(o*l*i-h*a*i+h*n*u-r*l*u-o*n*f+r*a*f)*I,this},getInverse:function(t,e){if(console.warn("LmvMatrix4.getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(t).invert(),0===this.determinant()){const t="Matrix4.getInverse(): can't invert matrix, determinant is 0";if(e)throw new Error(t);console.warn(t),this.identity()}return this},scale:function(t){var e=this.elements,r=t.x,n=t.y,i=t.z;return e[0]*=r,e[4]*=n,e[8]*=i,e[1]*=r,e[5]*=n,e[9]*=i,e[2]*=r,e[6]*=n,e[10]*=i,e[3]*=r,e[7]*=n,e[11]*=i,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,Math.max(r,n)))},makeTranslation:function(t,e,r){return this.set(1,0,0,t,0,1,0,e,0,0,1,r,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),r=Math.sin(t);return this.set(1,0,0,0,0,e,-r,0,0,r,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),r=Math.sin(t);return this.set(e,0,r,0,0,1,0,0,-r,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),r=Math.sin(t);return this.set(e,-r,0,0,r,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var r=Math.cos(e),n=Math.sin(e),i=1-r,s=t.x,o=t.y,a=t.z,u=i*s,c=i*o;return this.set(u*s+r,u*o-n*a,u*a+n*o,0,u*o+n*a,c*o+r,c*a-n*s,0,u*a-n*o,c*a+n*s,i*a*a+r,0,0,0,0,1),this},makeScale:function(t,e,r){return this.set(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1),this},lookAt:(a=new n.S,u=new n.S,c=new n.S,function(t,e,r){var n=this.elements;return c.subVectors(t,e).normalize(),0===c.length()&&(c.z=1),a.crossVectors(r,c).normalize(),0===a.length()&&(c.x+=1e-4,a.crossVectors(r,c).normalize()),u.crossVectors(c,a),n[0]=a.x,n[4]=u.x,n[8]=c.x,n[1]=a.y,n[5]=u.y,n[9]=c.y,n[2]=a.z,n[6]=u.z,n[10]=c.z,this}),compose:function(t,e,r){return this.makeRotationFromQuaternion(e),this.scale(r),this.setPosition(t),this},decompose:(s=new n.S,o=new i(!0),function(t,e,r){var n=this.elements,i=s.set(n[0],n[1],n[2]).length(),a=s.set(n[4],n[5],n[6]).length(),u=s.set(n[8],n[9],n[10]).length();this.determinant()<0&&(i=-i),t.x=n[12],t.y=n[13],t.z=n[14],o.elements.set(this.elements);var c=1/i,h=1/a,l=1/u;return o.elements[0]*=c,o.elements[1]*=c,o.elements[2]*=c,o.elements[4]*=h,o.elements[5]*=h,o.elements[6]*=h,o.elements[8]*=l,o.elements[9]*=l,o.elements[10]*=l,e.setFromRotationMatrix(o),r.x=i,r.y=a,r.z=u,this}),transformPoint:function(t){var e=t.x,r=t.y,n=t.z,i=this.elements;return t.x=i[0]*e+i[4]*r+i[8]*n+i[12],t.y=i[1]*e+i[5]*r+i[9]*n+i[13],t.z=i[2]*e+i[6]*r+i[10]*n+i[14],t},transformDirection:function(t){var e=t.x,r=t.y,n=t.z,i=this.elements;t.x=i[0]*e+i[4]*r+i[8]*n,t.y=i[1]*e+i[5]*r+i[9]*n,t.z=i[2]*e+i[6]*r+i[10]*n;var s=Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z);if(s>0){var o=1/s;t.x*=o,t.y*=o,t.z*=o}return t},equals(t){const e=this.elements,r=t.elements;for(var n=0;n<16;n++)if(e[n]!==r[n])return!1;return!0},fromArray:function(t){return this.elements.set(t),this},toArray:function(){var t=this.elements;return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]},clone:function(){return new i(this.isDoublePrecision).fromArray(this.elements)}}},6118:(t,e,r)=>{"use strict";r.d(e,{S:()=>n});let n=function(t,e,r){this.x=t||0,this.y=e||0,this.z=r||0};var i,s,o,a;n.prototype={constructor:n,set:function(t,e,r){return this.x=t,this.y=e,this.z=r,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(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)}},getComponent:function(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:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyMatrix3:function(t){var e=this.x,r=this.y,n=this.z,i=t.elements;return this.x=i[0]*e+i[3]*r+i[6]*n,this.y=i[1]*e+i[4]*r+i[7]*n,this.z=i[2]*e+i[5]*r+i[8]*n,this},applyMatrix4:function(t){var e=this.x,r=this.y,n=this.z,i=t.elements;return this.x=i[0]*e+i[4]*r+i[8]*n+i[12],this.y=i[1]*e+i[5]*r+i[9]*n+i[13],this.z=i[2]*e+i[6]*r+i[10]*n+i[14],this},applyProjection:function(t){var e=this.x,r=this.y,n=this.z,i=t.elements,s=1/(i[3]*e+i[7]*r+i[11]*n+i[15]);return this.x=(i[0]*e+i[4]*r+i[8]*n+i[12])*s,this.y=(i[1]*e+i[5]*r+i[9]*n+i[13])*s,this.z=(i[2]*e+i[6]*r+i[10]*n+i[14])*s,this},applyQuaternion:function(t){var e=this.x,r=this.y,n=this.z,i=t.x,s=t.y,o=t.z,a=t.w,u=a*e+s*n-o*r,c=a*r+o*e-i*n,h=a*n+i*r-s*e,l=-i*e-s*r-o*n;return this.x=u*a+l*-i+c*-o-h*-s,this.y=c*a+l*-s+h*-i-u*-o,this.z=h*a+l*-o+u*-s-c*-i,this},transformDirection:function(t){var e=this.x,r=this.y,n=this.z,i=t.elements;return this.x=i[0]*e+i[4]*r+i[8]*n,this.y=i[1]*e+i[5]*r+i[9]*n,this.z=i[2]*e+i[6]*r+i[10]*n,this.normalize(),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){if(0!==t){var e=1/t;this.x*=e,this.y*=e,this.z*=e}else this.x=0,this.y=0,this.z=0;return this},min:function(t){return this.x>t.x&&(this.x=t.x),this.y>t.y&&(this.y=t.y),this.z>t.z&&(this.z=t.z),this},max:function(t){return this.x<t.x&&(this.x=t.x),this.y<t.y&&(this.y=t.y),this.z<t.z&&(this.z=t.z),this},clamp:function(t,e){return this.x<t.x?this.x=t.x:this.x>e.x&&(this.x=e.x),this.y<t.y?this.y=t.y:this.y>e.y&&(this.y=e.y),this.z<t.z?this.z=t.z:this.z>e.z&&(this.z=e.z),this},clampScalar:function(t,e){return void 0===o&&(o=new n,a=new n),o.set(t,t,t),a.set(e,e,e),this.clamp(o,a)},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length())},setLength:function(t){var e=this.length();return 0!==e&&t!==e&&this.multiplyScalar(t/e),this},lerp:function(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:function(t,e,r){return this.subVectors(e,t).multiplyScalar(r).add(t),this},cross:function(t,e){if(void 0!==e)return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e);var r=this.x,n=this.y,i=this.z;return this.x=n*t.z-i*t.y,this.y=i*t.x-r*t.z,this.z=r*t.y-n*t.x,this},crossVectors:function(t,e){var r=t.x,n=t.y,i=t.z,s=e.x,o=e.y,a=e.z;return this.x=n*a-i*o,this.y=i*s-r*a,this.z=r*o-n*s,this},projectOnVector:function(t){return void 0===i&&(i=new n),i.copy(t).normalize(),s=this.dot(i),this.copy(i).multiplyScalar(s)},projectOnPlane:function(){var t;return function(e){return void 0===t&&(t=new n),t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t;return function(e){return void 0===t&&(t=new n),this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,r=this.y-t.y,n=this.z-t.z;return e*e+r*r+n*n},setEulerFromRotationMatrix:function(t,e){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(t,e){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},getScaleFromMatrix:function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},getColumnFromMatrix:function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},setFromMatrixPosition:function(t){return this.x=t.elements[12],this.y=t.elements[13],this.z=t.elements[14],this},setFromMatrixScale:function(t){var e=this.set(t.elements[0],t.elements[1],t.elements[2]).length(),r=this.set(t.elements[4],t.elements[5],t.elements[6]).length(),n=this.set(t.elements[8],t.elements[9],t.elements[10]).length();return this.x=e,this.y=r,this.z=n,this},setFromMatrixColumn:function(t,e){var r=4*t,n=e.elements;return this.x=n[r],this.y=n[r+1],this.z=n[r+2],this},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromAttribute:function(t,e,r){return void 0===r&&(r=0),e=e*t.itemSize+r,this.x=t.array[e],this.y=t.array[e+1],this.z=t.array[e+2],this}}},4406:function(t,e,r){"use strict";var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,a)}u((n=n.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var r,n,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=r(784),o=r(5757);e.backOff=function(t,e){return void 0===e&&(e={}),n(this,void 0,void 0,(function(){var r;return i(this,(function(n){switch(n.label){case 0:return r=s.getSanitizedOptions(e),[4,new a(t,r).execute()];case 1:return[2,n.sent()]}}))}))};var a=function(){function t(t,e){this.request=t,this.options=e,this.attemptNumber=0}return t.prototype.execute=function(){return n(this,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:if(this.attemptLimitReached)return[3,7];e.label=1;case 1:return e.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return e.sent(),[4,this.request()];case 3:return[2,e.sent()];case 4:return t=e.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(!e.sent()||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}}))}))},Object.defineProperty(t.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),t.prototype.applyDelay=function(){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,o.DelayFactory(this.options,this.attemptNumber).apply()];case 1:return t.sent(),[2]}}))}))},t}()},8348:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(r(6698).Delay);e.AlwaysDelay=s},6698:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(6071),i=function(){function t(t){this.options=t,this.attempt=0}return t.prototype.apply=function(){var t=this;return new Promise((function(e){return setTimeout(e,t.jitteredDelay)}))},t.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(t.prototype,"jitteredDelay",{get:function(){return n.JitterFactory(this.options)(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"delay",{get:function(){var t=this.options.startingDelay,e=this.options.timeMultiple,r=this.numOfDelayedAttempts,n=t*Math.pow(e,r);return Math.min(n,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),t}();e.Delay=i},5757:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(7510),i=r(8348);e.DelayFactory=function(t,e){var r=function(t){return t.delayFirstAttempt?new i.AlwaysDelay(t):new n.SkipFirstDelay(t)}(t);return r.setAttemptNumber(e),r}},7510:function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,a)}u((n=n.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var r,n,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.apply=function(){return s(this,void 0,void 0,(function(){return o(this,(function(e){return[2,!!this.isFirstAttempt||t.prototype.apply.call(this)]}))}))},Object.defineProperty(e.prototype,"isFirstAttempt",{get:function(){return 0===this.attempt},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),e}(r(6698).Delay);e.SkipFirstDelay=a},8500:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fullJitter=function(t){var e=Math.random()*t;return Math.round(e)}},6071:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(8500),i=r(4764);e.JitterFactory=function(t){return"full"===t.jitter?n.fullJitter:i.noJitter}},4764:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.noJitter=function(t){return t}},784:function(t,e){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var n={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};e.getSanitizedOptions=function(t){var e=r(r({},n),t);return e.numOfAttempts<1&&(e.numOfAttempts=1),e}},9861:(t,e,r)=>{"use strict";r.d(e,{AO:()=>ct,Wt:()=>nt,u3:()=>rt});var n=Uint8Array,i=Uint16Array,s=Int32Array,o=new n([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]),a=new n([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]),u=new n([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c=function(t,e){for(var r=new i(31),n=0;n<31;++n)r[n]=e+=1<<t[n-1];var o=new s(r[30]);for(n=1;n<30;++n)for(var a=r[n];a<r[n+1];++a)o[a]=a-r[n]<<5|n;return{b:r,r:o}},h=c(o,2),l=h.b,f=h.r;l[28]=258,f[258]=28;for(var d=c(a,0),p=d.b,m=d.r,g=new i(32768),v=0;v<32768;++v){var y=(43690&v)>>1|(21845&v)<<1;y=(61680&(y=(52428&y)>>2|(13107&y)<<2))>>4|(3855&y)<<4,g[v]=((65280&y)>>8|(255&y)<<8)>>1}var b=function(t,e,r){for(var n=t.length,s=0,o=new i(e);s<n;++s)t[s]&&++o[t[s]-1];var a,u=new i(e);for(s=1;s<e;++s)u[s]=u[s-1]+o[s-1]<<1;if(r){a=new i(1<<e);var c=15-e;for(s=0;s<n;++s)if(t[s])for(var h=s<<4|t[s],l=e-t[s],f=u[t[s]-1]++<<l,d=f|(1<<l)-1;f<=d;++f)a[g[f]>>c]=h}else for(a=new i(n),s=0;s<n;++s)t[s]&&(a[s]=g[u[t[s]-1]++]>>15-t[s]);return a},x=new n(288);for(v=0;v<144;++v)x[v]=8;for(v=144;v<256;++v)x[v]=9;for(v=256;v<280;++v)x[v]=7;for(v=280;v<288;++v)x[v]=8;var w=new n(32);for(v=0;v<32;++v)w[v]=5;var _=b(x,9,0),I=b(x,9,1),A=b(w,5,0),O=b(w,5,1),S=function(t){for(var e=t[0],r=1;r<t.length;++r)t[r]>e&&(e=t[r]);return e},P=function(t,e,r){var n=e/8|0;return(t[n]|t[n+1]<<8)>>(7&e)&r},k=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(7&e)},C=function(t){return(t+7)/8|0},T=function(t,e,r){return(null==e||e<0)&&(e=0),(null==r||r>t.length)&&(r=t.length),new n(t.subarray(e,r))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,e,r){var n=new Error(e||M[t]);if(n.code=t,Error.captureStackTrace&&Error.captureStackTrace(n,E),!r)throw n;return n},F=function(t,e,r,i){var s=t.length,c=i?i.length:0;if(!s||e.f&&!e.l)return r||new n(0);var h=!r,f=h||2!=e.i,d=e.i;h&&(r=new n(3*s));var m=function(t){var e=r.length;if(t>e){var i=new n(Math.max(2*e,t));i.set(r),r=i}},g=e.f||0,v=e.p||0,y=e.b||0,x=e.l,w=e.d,_=e.m,A=e.n,M=8*s;do{if(!x){g=P(t,v,1);var F=P(t,v+1,3);if(v+=3,!F){var R=t[(q=C(v)+4)-4]|t[q-3]<<8,z=q+R;if(z>s){d&&E(0);break}f&&m(y+R),r.set(t.subarray(q,z),y),e.b=y+=R,e.p=v=8*z,e.f=g;continue}if(1==F)x=I,w=O,_=9,A=5;else if(2==F){var V=P(t,v,31)+257,U=P(t,v+10,15)+4,D=V+P(t,v+5,31)+1;v+=14;for(var L=new n(D),j=new n(19),N=0;N<U;++N)j[u[N]]=P(t,v+3*N,7);v+=3*U;var B=S(j),W=(1<<B)-1,G=b(j,B,1);for(N=0;N<D;){var q,H=G[P(t,v,W)];if(v+=15&H,(q=H>>4)<16)L[N++]=q;else{var $=0,Q=0;for(16==q?(Q=3+P(t,v,3),v+=2,$=L[N-1]):17==q?(Q=3+P(t,v,7),v+=3):18==q&&(Q=11+P(t,v,127),v+=7);Q--;)L[N++]=$}}var K=L.subarray(0,V),X=L.subarray(V);_=S(K),A=S(X),x=b(K,_,1),w=b(X,A,1)}else E(1);if(v>M){d&&E(0);break}}f&&m(y+131072);for(var Y=(1<<_)-1,J=(1<<A)-1,Z=v;;Z=v){var tt=($=x[k(t,v)&Y])>>4;if((v+=15&$)>M){d&&E(0);break}if($||E(2),tt<256)r[y++]=tt;else{if(256==tt){Z=v,x=null;break}var et=tt-254;if(tt>264){var rt=o[N=tt-257];et=P(t,v,(1<<rt)-1)+l[N],v+=rt}var nt=w[k(t,v)&J],it=nt>>4;if(nt||E(3),v+=15&nt,X=p[it],it>3&&(rt=a[it],X+=k(t,v)&(1<<rt)-1,v+=rt),v>M){d&&E(0);break}f&&m(y+131072);var st=y+et;if(y<X){var ot=c-X,at=Math.min(X,st);for(ot+y<0&&E(3);y<at;++y)r[y]=i[ot+y]}for(;y<st;++y)r[y]=r[y-X]}}e.l=x,e.p=Z,e.b=y,e.f=g,x&&(g=1,e.m=_,e.d=w,e.n=A)}while(!g);return y!=r.length&&h?T(r,0,y):r.subarray(0,y)},R=function(t,e,r){r<<=7&e;var n=e/8|0;t[n]|=r,t[n+1]|=r>>8},z=function(t,e,r){r<<=7&e;var n=e/8|0;t[n]|=r,t[n+1]|=r>>8,t[n+2]|=r>>16},V=function(t,e){for(var r=[],s=0;s<t.length;++s)t[s]&&r.push({s,f:t[s]});var o=r.length,a=r.slice();if(!o)return{t:W,l:0};if(1==o){var u=new n(r[0].s+1);return u[r[0].s]=1,{t:u,l:1}}r.sort((function(t,e){return t.f-e.f})),r.push({s:-1,f:25001});var c=r[0],h=r[1],l=0,f=1,d=2;for(r[0]={s:-1,f:c.f+h.f,l:c,r:h};f!=o-1;)c=r[r[l].f<r[d].f?l++:d++],h=r[l!=f&&r[l].f<r[d].f?l++:d++],r[f++]={s:-1,f:c.f+h.f,l:c,r:h};var p=a[0].s;for(s=1;s<o;++s)a[s].s>p&&(p=a[s].s);var m=new i(p+1),g=U(r[f-1],m,0);if(g>e){s=0;var v=0,y=g-e,b=1<<y;for(a.sort((function(t,e){return m[e.s]-m[t.s]||t.f-e.f}));s<o;++s){var x=a[s].s;if(!(m[x]>e))break;v+=b-(1<<g-m[x]),m[x]=e}for(v>>=y;v>0;){var w=a[s].s;m[w]<e?v-=1<<e-m[w]++-1:++s}for(;s>=0&&v;--s){var _=a[s].s;m[_]==e&&(--m[_],++v)}g=e}return{t:new n(m),l:g}},U=function(t,e,r){return-1==t.s?Math.max(U(t.l,e,r+1),U(t.r,e,r+1)):e[t.s]=r},D=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new i(++e),n=0,s=t[0],o=1,a=function(t){r[n++]=t},u=1;u<=e;++u)if(t[u]==s&&u!=e)++o;else{if(!s&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(s),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(s);o=1,s=t[u]}return{c:r.subarray(0,n),n:e}},L=function(t,e){for(var r=0,n=0;n<e.length;++n)r+=t[n]*e[n];return r},j=function(t,e,r){var n=r.length,i=C(e+2);t[i]=255&n,t[i+1]=n>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<n;++s)t[i+s+4]=r[s];return 8*(i+4+n)},N=function(t,e,r,n,s,c,h,l,f,d,p){R(e,p++,r),++s[256];for(var m=V(s,15),g=m.t,v=m.l,y=V(c,15),I=y.t,O=y.l,S=D(g),P=S.c,k=S.n,C=D(I),T=C.c,M=C.n,E=new i(19),F=0;F<P.length;++F)++E[31&P[F]];for(F=0;F<T.length;++F)++E[31&T[F]];for(var U=V(E,7),N=U.t,B=U.l,W=19;W>4&&!N[u[W-1]];--W);var G,q,H,$,Q=d+5<<3,K=L(s,x)+L(c,w)+h,X=L(s,g)+L(c,I)+h+14+3*W+L(E,N)+2*E[16]+3*E[17]+7*E[18];if(f>=0&&Q<=K&&Q<=X)return j(e,p,t.subarray(f,f+d));if(R(e,p,1+(X<K)),p+=2,X<K){G=b(g,v,0),q=g,H=b(I,O,0),$=I;var Y=b(N,B,0);for(R(e,p,k-257),R(e,p+5,M-1),R(e,p+10,W-4),p+=14,F=0;F<W;++F)R(e,p+3*F,N[u[F]]);p+=3*W;for(var J=[P,T],Z=0;Z<2;++Z){var tt=J[Z];for(F=0;F<tt.length;++F){var et=31&tt[F];R(e,p,Y[et]),p+=N[et],et>15&&(R(e,p,tt[F]>>5&127),p+=tt[F]>>12)}}}else G=_,q=x,H=A,$=w;for(F=0;F<l;++F){var rt=n[F];if(rt>255){z(e,p,G[257+(et=rt>>18&31)]),p+=q[et+257],et>7&&(R(e,p,rt>>23&31),p+=o[et]);var nt=31&rt;z(e,p,H[nt]),p+=$[nt],nt>3&&(z(e,p,rt>>5&8191),p+=a[nt])}else z(e,p,G[rt]),p+=q[rt]}return z(e,p,G[256]),p+q[256]},B=new s([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),W=new n(0),G=function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var r=e,n=9;--n;)r=(1&r&&-306674912)^r>>>1;t[e]=r}return t}(),q=function(){var t=-1;return{p:function(e){for(var r=t,n=0;n<e.length;++n)r=G[255&r^e[n]]^r>>>8;t=r},d:function(){return~t}}},H=function(t,e,r,u,c){if(!c&&(c={l:1},e.dictionary)){var h=e.dictionary.subarray(-32768),l=new n(h.length+t.length);l.set(h),l.set(t,h.length),t=l,c.w=h.length}return function(t,e,r,u,c,h){var l=h.z||t.length,d=new n(u+l+5*(1+Math.ceil(l/7e3))+c),p=d.subarray(u,d.length-c),g=h.l,v=7&(h.r||0);if(e){v&&(p[0]=h.r>>3);for(var y=B[e-1],b=y>>13,x=8191&y,w=(1<<r)-1,_=h.p||new i(32768),I=h.h||new i(w+1),A=Math.ceil(r/3),O=2*A,S=function(e){return(t[e]^t[e+1]<<A^t[e+2]<<O)&w},P=new s(25e3),k=new i(288),M=new i(32),E=0,F=0,R=h.i||0,z=0,V=h.w||0,U=0;R+2<l;++R){var D=S(R),L=32767&R,W=I[D];if(_[L]=W,I[D]=L,V<=R){var G=l-R;if((E>7e3||z>24576)&&(G>423||!g)){v=N(t,p,0,P,k,M,F,z,U,R-U,v),z=E=F=0,U=R;for(var q=0;q<286;++q)k[q]=0;for(q=0;q<30;++q)M[q]=0}var H=2,$=0,Q=x,K=L-W&32767;if(G>2&&D==S(R-K))for(var X=Math.min(b,G)-1,Y=Math.min(32767,R),J=Math.min(258,G);K<=Y&&--Q&&L!=W;){if(t[R+H]==t[R+H-K]){for(var Z=0;Z<J&&t[R+Z]==t[R+Z-K];++Z);if(Z>H){if(H=Z,$=K,Z>X)break;var tt=Math.min(K,Z-2),et=0;for(q=0;q<tt;++q){var rt=R-K+q&32767,nt=rt-_[rt]&32767;nt>et&&(et=nt,W=rt)}}}K+=(L=W)-(W=_[L])&32767}if($){P[z++]=268435456|f[H]<<18|m[$];var it=31&f[H],st=31&m[$];F+=o[it]+a[st],++k[257+it],++M[st],V=R+H,++E}else P[z++]=t[R],++k[t[R]]}}for(R=Math.max(R,V);R<l;++R)P[z++]=t[R],++k[t[R]];v=N(t,p,g,P,k,M,F,z,U,R-U,v),g||(h.r=7&v|p[v/8|0]<<3,v-=7,h.h=I,h.p=_,h.i=R,h.w=V)}else{for(R=h.w||0;R<l+g;R+=65535){var ot=R+65535;ot>=l&&(p[v/8|0]=g,ot=l),v=j(p,v+1,t.subarray(R,ot))}h.i=l}return T(d,0,u+C(v)+c)}(t,null==e.level?6:e.level,null==e.mem?c.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):20:12+e.mem,r,u,c)},$=function(t,e){return t[e]|t[e+1]<<8},Q=function(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0},K=function(t,e){return Q(t,e)+4294967296*Q(t,e+4)},X=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},Y=function(t,e){var r=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:9==e.level?2:0,t[9]=3,0!=e.mtime&&X(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),r){t[3]=8;for(var n=0;n<=r.length;++n)t[n+10]=r.charCodeAt(n)}},J=function(t){31==t[0]&&139==t[1]&&8==t[2]||E(6,"invalid gzip data");var e=t[3],r=10;4&e&&(r+=2+(t[10]|t[11]<<8));for(var n=(e>>3&1)+(e>>4&1);n>0;n-=!t[r++]);return r+(2&e)},Z=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},tt=function(t){return 10+(t.filename?t.filename.length+1:0)};function et(t,e){return F(t,{i:2},e&&e.out,e&&e.dictionary)}function rt(t,e){e||(e={});var r=q(),n=t.length;r.p(t);var i=H(t,e,tt(e),8),s=i.length;return Y(i,e),X(i,s-8,r.d()),X(i,s-4,n),i}function nt(t,e){var r=J(t);return r+8>t.length&&E(6,"invalid gzip data"),F(t.subarray(r,-8),{i:2},e&&e.out||new n(Z(t)),e&&e.dictionary)}var it="undefined"!=typeof TextDecoder&&new TextDecoder;try{it.decode(W,{stream:!0})}catch(t){}function st(t,e){if(e){for(var r="",n=0;n<t.length;n+=16384)r+=String.fromCharCode.apply(null,t.subarray(n,n+16384));return r}if(it)return it.decode(t);var i=function(t){for(var e="",r=0;;){var n=t[r++],i=(n>127)+(n>223)+(n>239);if(r+i>t.length)return{s:e,r:T(t,r-1)};i?3==i?(n=((15&n)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++])-65536,e+=String.fromCharCode(55296|n>>10,56320|1023&n)):e+=1&i?String.fromCharCode((31&n)<<6|63&t[r++]):String.fromCharCode((15&n)<<12|(63&t[r++])<<6|63&t[r++]):e+=String.fromCharCode(n)}}(t),s=i.s;return(r=i.r).length&&E(8),s}var ot=function(t,e){return e+30+$(t,e+26)+$(t,e+28)},at=function(t,e,r){var n=$(t,e+28),i=st(t.subarray(e+46,e+46+n),!(2048&$(t,e+8))),s=e+46+n,o=Q(t,e+20),a=r&&4294967295==o?ut(t,s):[o,Q(t,e+24),Q(t,e+42)],u=a[0],c=a[1],h=a[2];return[$(t,e+10),u,c,i,s+$(t,e+30)+$(t,e+32),h]},ut=function(t,e){for(;1!=$(t,e);e+=4+$(t,e+2));return[K(t,e+12),K(t,e+4),K(t,e+20)]};function ct(t,e){for(var r={},i=t.length-22;101010256!=Q(t,i);--i)(!i||t.length-i>65558)&&E(13);var s=$(t,i+8);if(!s)return{};var o=Q(t,i+16),a=4294967295==o||65535==s;if(a){var u=Q(t,i-12);(a=101075792==Q(t,u))&&(s=Q(t,u+32),o=Q(t,u+48))}for(var c=e&&e.filter,h=0;h<s;++h){var l=at(t,o,a),f=l[0],d=l[1],p=l[2],m=l[3],g=l[4],v=l[5],y=ot(t,v);o=g,c&&!c({name:m,size:d,originalSize:p,compression:f})||(f?8==f?r[m]=et(t.subarray(y,y+d),{out:new n(p)}):E(14,"unknown compression type "+f):r[m]=T(t,y,y+d))}return r}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout},169:(t,e,r)=>{var n=null;"undefined"!=typeof WebSocket?n=WebSocket:"undefined"!=typeof MozWebSocket?n=MozWebSocket:void 0!==r.g?n=r.g.WebSocket||r.g.MozWebSocket:"undefined"!=typeof window?n=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(n=self.WebSocket||self.MozWebSocket),t.exports=n},1436:t=>{function e(){this.pending=0,this.max=1/0,this.listeners=[],this.waiting=[],this.error=null}function r(t){t.pending+=1;var e=!1;return function(i){if(e)throw new Error("callback called twice");if(e=!0,t.error=t.error||i,t.pending-=1,t.waiting.length>0&&t.pending<t.max)n(t,t.waiting.shift());else if(0===t.pending){var s=t.listeners;t.listeners=[],s.forEach(r)}};function r(e){e(t.error)}}function n(t,e){e(r(t))}t.exports=e,e.prototype.go=function(t){this.pending<this.max?n(this,t):this.waiting.push(t)},e.prototype.wait=function(t){0===this.pending?t(this.error):this.listeners.push(t)},e.prototype.hold=function(){return r(this)}},8914:(t,e,r)=>{"use strict";r.d(e,{x:()=>u});var n=r(5982);const i="_metadata",s="Placeholder value for buckets that failed to open",o="QuotaExceededError";async function a(t){const e=[];for await(const[r,n]of t)"file"===n.kind&&e.push(n.getFile().then((t=>[r,t])));return Promise.all(e)}class u{#e;#r=!1;#n;#i;#s=null;#o=new Map;#a=new Map;#u="";constructor(t,e="otg_cache"){this.#u=e,this.#n=this.#c(),this.#e=t}async#c(){try{const t=await navigator.storage.getDirectory();this.#s=await t.getDirectoryHandle(this.#u,{create:!0})}catch(t){console.warn("Failed to open OPFS cache directory",t),this.#e?.("viewer.opfsCache.cacheOpenFailed",{errorName:t.name,errorMessage:t.message})}this.#n=void 0}async open(t){const e=this.#o.get(t);if(e)return e;let r=this.#a.get(t);return r||(r=(async()=>{let e,r,n;await this.#n;const o=t.replaceAll(/<|>|:|"|\/|\\|\||\?\*/g,"_"),a="opfs-cache-write-lock-"+o;try{if(!this.#s)throw new Error("OPFS cache directory not initialized");const s=await this.#s.getFileHandle(o,{create:!0});e=await s.createSyncAccessHandle({mode:"readwrite-unsafe"});const u=await this.#s.getFileHandle(o+i,{create:!0});r=await u.createSyncAccessHandle({mode:"readwrite-unsafe"});const c=new Uint32Array(1);return c[0]=(new Date).valueOf(),r.write(c,{at:0}),n={dataHandle:e,offsets:new Map,metadataHandle:r},this.#o.set(t,n),await new Promise((t=>{navigator.locks.request(a,{ifAvailable:!0,mode:"exclusive"},(e=>{if(t(),e)return new Promise((t=>{n.writeLock=t}))}))})),this.#h(n)!==n.dataHandle.getSize()&&(console.warn("Data file has unexpected size, clearing OPFS cache for",t),n.offsets.clear(),n.dataHandle.truncate(0),n.metadataHandle.truncate(4)),console.log("Opened OPFS cache bucket",t,"with",n.offsets.size,"entries"),n}catch(i){return"NoModificationAllowedError"===i.name?(console.warn(i.message),console.warn(`Failed to open OPFS cache bucket for ${t}. It is probably open in another tab. Disabling cache.`)):console.warn("Failed to initialize OFPS cache bucket",t,i),this.#s&&this.#e?.("viewer.opfsCache.bucketOpenFailed",{bucketName:t,errorName:i.name,errorMessage:i.message}),e?.close(),r?.close(),n?.writeLock?.(),this.#o.set(t,s),s}finally{this.#a.delete(t)}})(),this.#a.set(t,r),r)}#h(t){t.offsets.clear();const e=t.metadataHandle.getSize()-4,r=new Uint8Array(e),i=new Uint16Array(r.buffer),s=new Uint32Array(r.buffer);t.metadataHandle.read(r,{at:4});let o=0;for(let e=0;e<r.byteLength;e+=24){const r=(0,n.bin16ToPackedString)(i,e/2),a=s[(e+20)/4];t.offsets.set(r,[o,a]),o+=a}return o}async store(t,e,r){const n=new Map;for(let i=0;i<t.length;i++){const s=e[i];let o=n.get(s);o||(o=[[],[]],n.set(s,o)),o[0].push(t[i]),o[1].push(r[i])}const i=[];for(const[t,[e,r]]of n)i.push(this.#l(e,t,r));return Promise.all(i)}async#l(t,e,r){const i=this.#o.get(e);if(!i||i===s||!i.writeLock)return;const o=r.map((t=>t.length)),a=new Uint8Array(24*t.length),u=new Uint32Array(a.buffer),c=new Uint8Array(o.reduce(((t,e)=>t+e),0));let h=0;for(let e=0;e<t.length;e++){const i=r[e];(0,n.packedToBin)(t[e],a,24*e),u[(24*e+20)/4]=i.length,c.set(i,h),h+=i.length}if(await new Promise((t=>setTimeout(t,0))),i!==this.#o.get(e))return;if(!this.#f(i,c,a)&&(await this.#d(),!this.#f(i,c,a)))return;let l=i.dataHandle.getSize()-c.length;for(let e=0;e<t.length;e++)i.offsets.set(t[e],[l,o[e]]),l+=o[e]}#f(t,e,r){const n=t.dataHandle.getSize(),i=t.metadataHandle.getSize();try{this.#p(t.dataHandle,e,{at:n}),this.#p(t.metadataHandle,r,{at:i})}catch(e){if(t.dataHandle.truncate(n),t.metadataHandle.truncate(i),e.name!==o)throw e;return this.#m(),!1}return!0}#p(t,e,r){const n=t.write(e,r);if(n>e.length)throw new DOMException("Quota Exceeded in Chrome Incognito mode",o);if(n!==e.length)throw new DOMException("Partial write detected")}async get(t,e){const r=new Array(t.length).fill(null);for(let n=0;n<t.length;n++){const i=t[n],o=e[n],a=this.#o.get(o)||await this.open(o);if(!a||a===s)continue;const u=a.offsets.get(i);if(!u)continue;const c=new Uint8Array(u[1]);a.dataHandle.read(c,{at:u[0]}),r[n]=c}return r}async#d(t=.1){if(this.#i)return this.#i;this.#i=this.#g(t);const e=await this.#i;return this.#i=void 0,e}async#g(t){if(await this.#n,!this.#s)return!1;const e=new Array;let r=0;for(const[,t]of await a(this.#s))r+=t.size,t.name.endsWith(i)&&e.push(t);const n=r*t,s=e.sort(((t,e)=>t.lastModified-e.lastModified));let o=0;const u=Date.now()-7776e6;for(const t of s){if(t.lastModified>u&&o>=n)break;try{await this.#s.removeEntry(t.name),o+=t.size;const e=t.name.slice(0,-9),r=await(await this.#s.getFileHandle(e)).getFile();await this.#s.removeEntry(e),o+=r.size}catch(t){"NoModificationAllowedError"!==t.name&&console.warn("Error during cache eviction",t)}}return o>=n}async close(){this.#n&&await this.#n,this.#a.size&&await Promise.all(this.#a.values());for(const t of this.#o.values())t&&t!==s&&(t.dataHandle&&(t.dataHandle.flush(),t.dataHandle.close()),t.metadataHandle&&(t.metadataHandle.flush(),t.metadataHandle.close()),t.writeLock?.());this.#o.clear(),await this.#d(0)}async clear(){await this.close(),await this.#d(1)}async getStats(){await this.#n;let t=0,e=0,r=0;if(this.#s)for(const[n,s]of await a(this.#s))n.endsWith(i)?(r+=s.size,t+=(s.size-4)/24):e+=s.size;return{entries:t,dataSize:e,metadataSize:r}}#m(){this.#r||(this.#r=!0,navigator.storage.estimate().then((t=>{this.#e?.("viewer.opfsCache.quotaExceeded",t)})).catch((t=>{console.error("Failed to get storage estimate",t)})))}}},8401:(t,e,r)=>{"use strict";r.d(e,{k:()=>x});var n=r(6247),i=r(3293),s=r(1706);const o={Index:0,IndexEdges:1,Position:2,Normal:3,TextureUV:4,Color:5},a={TRIANGLES:0,LINES:1,POINTS:2,WIDE_LINES:3},u=(o.Position,o.Normal,o.Index,o.IndexEdges,o.Color,{});u[o.Position]="position",u[o.Normal]="normal",u[o.Index]="index",u[o.IndexEdges]="indexlines",u[o.Color]="color",u[o.TextureUV]="uv";const c={};function h(t){if(t.length){t[1]+=t[0],t[2]+=t[0];for(var e=3;e<t.length;e+=3)t[e]+=t[e-3],t[e+1]+=t[e],t[e+2]+=t[e]}}function l(t){if(t.length){t[1]+=t[0];for(var e=2;e<t.length;e+=2)t[e]+=t[e-2],t[e+1]+=t[e]}}function f(){}function d(t){this.buffer=t,this.readOffset=0,this.meshFlag=0,this.numBuffers=0,this.numAttributes=0,this.bufferOffsets=[],this.attributes=[],this.buffers=[]}c[0]=1,c[1]=2,c[2]=1,c[3]=2,c[4]=1,c[5]=2,c[6]=1,c[7]=2,c[8]=4,c[9]=4,c[10]=4,f.prototype.beginHeader=function(t,e,r){var n=8,i=r.length;for(n+=4*(i-1),n+=5*e;n%4!=0;)n++;var s=0;for(let t=0;t<r.length;t++)s+=r[t];this.buffer=Buffer.alloc(n+s),this.writeOffset=0;for(let t=0;t<4;t++)this.writeOffset=this.buffer.writeUInt8("OTG0".charCodeAt(t),this.writeOffset);this.writeOffset=this.buffer.writeUInt16LE(t,this.writeOffset),this.writeOffset=this.buffer.writeUInt8(i,this.writeOffset),this.writeOffset=this.buffer.writeUInt8(e,this.writeOffset);var o=r[0];for(let t=1;t<r.length;t++)this.writeOffset=this.buffer.writeUInt32LE(o,this.writeOffset),o+=r[t]},f.prototype.addAttribute=function(t,e,r,n){this.writeOffset=this.buffer.writeUInt8(t,this.writeOffset),t===o.Index||t===o.IndexEdges?(this.writeOffset=this.buffer.writeUInt8(function(t){var e=3,r=t.bytesPerItem||2;return 1===r?e=2:2===r?e=3:4===r&&(e=10),e<<4|15&t.itemSize}(e),this.writeOffset),this.writeOffset=this.buffer.writeUInt8(4*(e.itemOffset||0),this.writeOffset),this.writeOffset=this.buffer.writeUInt8(4*(r||0),this.writeOffset),this.writeOffset=this.buffer.writeUInt8(n,this.writeOffset)):(this.writeOffset=this.buffer.writeUInt8(function(t){var e=8,r=t.bytesPerItem||4;return 1===r?e=t.normalized?6:2:2===r&&(e=t.normalized?7:3),e<<4|15&t.itemSize}(e),this.writeOffset),this.writeOffset=this.buffer.writeUInt8(4*(e.itemOffset||0),this.writeOffset),this.writeOffset=this.buffer.writeUInt8(4*(r||0),this.writeOffset),this.writeOffset=this.buffer.writeUInt8(n,this.writeOffset))},f.prototype.endHeader=function(){for(;this.writeOffset%4!=0;)this.writeOffset=this.buffer.writeUInt8(0,this.writeOffset)},f.prototype.addBuffer=function(t){t.copy(this.buffer,this.writeOffset),this.writeOffset+=t.length},f.prototype.end=function(){return this.writeOffset!==this.buffer.length&&console.error("Incorrect encoding buffer size"),this.buffer},d.prototype.readNodeJS=function(){if("OTG0"!==this.buffer.toString("ascii",0,4))return console.error("Invalid OTG header"),!1;if(this.readOffset=4,this.meshFlag=this.buffer.readUInt16LE(this.readOffset),this.readOffset+=2,this.numBuffers=this.buffer.readUInt8(this.readOffset),this.readOffset++,this.numAttributes=this.buffer.readUInt8(this.readOffset),this.readOffset++,this.numBuffers){this.bufferOffsets.push(0);for(var t=1;t<this.numBuffers;t++){var e=this.buffer.readUInt32LE(this.readOffset);this.readOffset+=4,this.bufferOffsets.push(e)}}for(let t=0;t<this.numAttributes;t++){var r={};r.name=this.buffer.readUInt8(this.readOffset),this.readOffset++;var n=this.buffer.readUInt8(this.readOffset);this.readOffset++,r.itemSize=15&n,r.type=n>>4,r.bytesPerItem=c[r.type],r.normalized=4===r.type||5===r.type||6===r.type||7===r.type,r.itemOffset=this.buffer.readUInt8(this.readOffset)/4,this.readOffset++,r.itemStride=this.buffer.readUInt8(this.readOffset)/4,this.readOffset++,r.bufferIndex=this.buffer.readUInt8(this.readOffset),this.readOffset++,this.attributes.push(r)}for(;this.readOffset%4!=0;)this.readOffset++;for(let t=0;t<this.bufferOffsets.length;t++){var i,s=this.readOffset+this.bufferOffsets[t];i=t<this.bufferOffsets.length-1?this.readOffset+this.bufferOffsets[t+1]:this.buffer.length,this.buffers.push(this.buffer.slice(s,i))}return!0},d.prototype.readWeb=function(){var t=new i.z(this.buffer);if("OTG0"!==t.getString(4))return console.error("Invalid OTG header"),!1;if(this.meshFlag=t.getUint16(),this.numBuffers=t.getUint8(),this.numAttributes=t.getUint8(),this.numBuffers){this.bufferOffsets.push(0);for(let r=1;r<this.numBuffers;r++){var e=t.getUint32();this.bufferOffsets.push(e)}}for(let e=0;e<this.numAttributes;e++){var r={};r.name=t.getUint8();var n=t.getUint8();r.itemSize=15&n,r.type=n>>4,r.bytesPerItem=c[r.type],r.normalized=4===r.type||5===r.type||6===r.type||7===r.type,r.itemOffset=t.getUint8()/4,r.itemStride=t.getUint8()/4,r.bufferIndex=t.getUint8(),this.attributes.push(r)}for(;t.offset%4!=0;)t.offset++;for(let e=0;e<this.bufferOffsets.length;e++){var s,o=t.offset+this.bufferOffsets[e];s=e<this.bufferOffsets.length-1?t.offset+this.bufferOffsets[e+1]:t.byteLength,this.buffers.push(this.buffer.subarray(o,s))}return!0},d.prototype.read=function(){return(0,n.Gz)()&&this.buffer instanceof Buffer?this.readNodeJS():this.readWeb()};var p=new s.K;p.min.x=-.5,p.min.y=-.5,p.min.z=-.5,p.max.x=.5,p.max.y=.5,p.max.z=.5;var m={center:{x:0,y:0,z:0},radius:Math.sqrt(.75)};function g(t,e){var r=new d(t);if(!r.read())return console.error("Failed to parse OTG geometry"),null;var n={vblayout:{},vb:new Float32Array(r.buffers[0].buffer,r.buffers[0].byteOffset,r.buffers[0].byteLength/4),isLines:(3&r.meshFlag)===a.LINES,isWideLines:(3&r.meshFlag)===a.WIDE_LINES,isPoints:(3&r.meshFlag)===a.POINTS,boundingBox:p,boundingSphere:m};let i=0;for(var s=0;s<r.attributes.length;s++){var c=r.attributes[s];if(c.name===o.Index){var f=r.buffers[1];1===c.bytesPerItem?n.indices=f:2===c.bytesPerItem?n.indices=new Uint16Array(f.buffer,f.byteOffset,f.byteLength/c.bytesPerItem):4===c.bytesPerItem&&(n.indices=new Uint32Array(f.buffer,f.byteOffset,f.byteLength/c.bytesPerItem)),n.isLines?l(n.indices):h(n.indices)}else if(c.name===o.IndexEdges){if(!e){var g=r.buffers[2];1===c.bytesPerItem?n.iblines=g:2===c.bytesPerItem?n.iblines=new Uint16Array(g.buffer,g.byteOffset,g.byteLength/c.bytesPerItem):4===c.bytesPerItem&&(n.iblines=new Uint32Array(g.buffer,g.byteOffset,g.byteLength/c.bytesPerItem)),l(n.iblines)}}else{var v=(y=c.name,u[y]||(console.error("Unknown vertex attribute"),o.TextureUV));"uv"===v&&(i++,i>1&&(v+=i.toString())),n.vbstride?n.vbstride!==c.itemStride&&console.error("Unexpected vertex buffer stride mismatch."):n.vbstride=c.itemStride,c.itemOffset>=c.itemStride||(n.vblayout[v]={bytesPerItem:c.bytesPerItem,offset:c.itemOffset,normalized:c.normalized,itemSize:c.itemSize})}}var y;return{mesh:n,packId:0,meshIndex:0}}var v=r(9861);function y(t){return 31===t[0]&&139===t[1]}function b(t){t.port.onmessage=e=>{switch(e.data.operation){case"DECODE_GEOMETRIES":!function(t,e,r,n){const i=new Array;for(let s=0;s<e.length;s++){const o=e[s];let a=r[s];const u=n[s];y(a)?a=(0,v.Wt)(a):a.byteLength!==a.buffer.byteLength&&(a=a.slice());const c=g(a);c?(c.fromCache=u,c.hash=o,i.push(c)):t.raiseError(null,"Failed to parse geometry",{hash:o,resourceType:"g"})}const s=new Array;for(const t of i){const e=t.mesh;if(e){const t=e.vb.buffer;s.push(t),e.indices&&e.indices.buffer!==t&&s.push(e.indices.buffer),e.iblines&&e.iblines.buffer!==t&&s.push(e.iblines.buffer)}}t.worker.postMessage({mdatas:i},s)}(t,e.data.hashes,e.data.arrays,e.data.fromCache);break;case"DECODE_MATERIALS":!function(t,e,r){const n=new Array;for(let t=0;t<e.length;t++){let e=r[t];y(e)?e=(0,v.Wt)(e):e.byteLength!==e.buffer.byteLength&&(e=e.slice()),n.push(e)}t.postMessage({materials:n,hashes:e},n.map((t=>t.buffer)))}(t.worker,e.data.hashes,e.data.arrays)}}}function x(t){t.register("INSTALL_INPUT_PORT",{doOperation:b})}},9709:()=>{},684:()=>{},9631:()=>{},8215:()=>{},315:()=>{},9306:(t,e,r)=>{"use strict";var n=r(4901),i=r(6823),s=TypeError;t.exports=function(t){if(n(t))return t;throw new s(i(t)+" is not a function")}},6194:(t,e,r)=>{"use strict";var n=r(2248).has;t.exports=function(t){return n(t),t}},3506:(t,e,r)=>{"use strict";var n=r(3925),i=String,s=TypeError;t.exports=function(t){if(n(t))return t;throw new s("Can't set "+i(t)+" as a prototype")}},7080:(t,e,r)=>{"use strict";var n=r(4402).has;t.exports=function(t){return n(t),t}},6557:(t,e,r)=>{"use strict";var n=r(4995).has;t.exports=function(t){return n(t),t}},3755:(t,e,r)=>{"use strict";var n=r(8205).has;t.exports=function(t){return n(t),t}},6469:(t,e,r)=>{"use strict";var n=r(8227),i=r(2360),s=r(4913).f,o=n("unscopables"),a=Array.prototype;void 0===a[o]&&s(a,o,{configurable:!0,value:i(null)}),t.exports=function(t){a[o][t]=!0}},679:(t,e,r)=>{"use strict";var n=r(1625),i=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw new i("Incorrect invocation")}},8551:(t,e,r)=>{"use strict";var n=r(34),i=String,s=TypeError;t.exports=function(t){if(n(t))return t;throw new s(i(t)+" is not an object")}},7811:t=>{"use strict";t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},5652:(t,e,r)=>{"use strict";var n=r(9039);t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},4644:(t,e,r)=>{"use strict";var n,i,s,o=r(7811),a=r(3724),u=r(4475),c=r(4901),h=r(34),l=r(9297),f=r(6955),d=r(6823),p=r(6699),m=r(6840),g=r(2106),v=r(1625),y=r(2787),b=r(2967),x=r(8227),w=r(3392),_=r(1181),I=_.enforce,A=_.get,O=u.Int8Array,S=O&&O.prototype,P=u.Uint8ClampedArray,k=P&&P.prototype,C=O&&y(O),T=S&&y(S),M=Object.prototype,E=u.TypeError,F=x("toStringTag"),R=w("TYPED_ARRAY_TAG"),z="TypedArrayConstructor",V=o&&!!b&&"Opera"!==f(u.opera),U=!1,D={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},L={BigInt64Array:8,BigUint64Array:8},j=function(t){var e=y(t);if(h(e)){var r=A(e);return r&&l(r,z)?r[z]:j(e)}},N=function(t){if(!h(t))return!1;var e=f(t);return l(D,e)||l(L,e)};for(n in D)(s=(i=u[n])&&i.prototype)?I(s)[z]=i:V=!1;for(n in L)(s=(i=u[n])&&i.prototype)&&(I(s)[z]=i);if((!V||!c(C)||C===Function.prototype)&&(C=function(){throw new E("Incorrect invocation")},V))for(n in D)u[n]&&b(u[n],C);if((!V||!T||T===M)&&(T=C.prototype,V))for(n in D)u[n]&&b(u[n].prototype,T);if(V&&y(k)!==T&&b(k,T),a&&!l(T,F))for(n in U=!0,g(T,F,{configurable:!0,get:function(){return h(this)?this[R]:void 0}}),D)u[n]&&p(u[n],R,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:V,TYPED_ARRAY_TAG:U&&R,aTypedArray:function(t){if(N(t))return t;throw new E("Target is not a typed array")},aTypedArrayConstructor:function(t){if(c(t)&&(!b||v(C,t)))return t;throw new E(d(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,r,n){if(a){if(r)for(var i in D){var s=u[i];if(s&&l(s.prototype,t))try{delete s.prototype[t]}catch(r){try{s.prototype[t]=e}catch(t){}}}T[t]&&!r||m(T,t,r?e:V&&S[t]||e,n)}},exportTypedArrayStaticMethod:function(t,e,r){var n,i;if(a){if(b){if(r)for(n in D)if((i=u[n])&&l(i,t))try{delete i[t]}catch(t){}if(C[t]&&!r)return;try{return m(C,t,r?e:V&&C[t]||e)}catch(t){}}for(n in D)!(i=u[n])||i[t]&&!r||m(i,t,e)}},getTypedArrayConstructor:j,isView:function(t){if(!h(t))return!1;var e=f(t);return"DataView"===e||l(D,e)||l(L,e)},isTypedArray:N,TypedArray:C,TypedArrayPrototype:T}},9617:(t,e,r)=>{"use strict";var n=r(5397),i=r(5610),s=r(6198),o=function(t){return function(e,r,o){var a=n(e),u=s(a);if(0===u)return!t&&-1;var c,h=i(o,u);if(t&&r!=r){for(;u>h;)if((c=a[h++])!=c)return!0}else for(;u>h;h++)if((t||h in a)&&a[h]===r)return t||h||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},9213:(t,e,r)=>{"use strict";var n=r(6080),i=r(9504),s=r(7055),o=r(8981),a=r(6198),u=r(1469),c=i([].push),h=function(t){var e=1===t,r=2===t,i=3===t,h=4===t,l=6===t,f=7===t,d=5===t||l;return function(p,m,g,v){for(var y,b,x=o(p),w=s(x),_=a(w),I=n(m,g),A=0,O=v||u,S=e?O(p,_):r||f?O(p,0):void 0;_>A;A++)if((d||A in w)&&(b=I(y=w[A],A,x),t))if(e)S[A]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return A;case 2:c(S,y)}else switch(t){case 4:return!1;case 7:c(S,y)}return l?-1:i||h?h:S}};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)}},7680:(t,e,r)=>{"use strict";var n=r(9504);t.exports=n([].slice)},7433:(t,e,r)=>{"use strict";var n=r(4376),i=r(3517),s=r(34),o=r(8227)("species"),a=Array;t.exports=function(t){var e;return n(t)&&(e=t.constructor,(i(e)&&(e===a||n(e.prototype))||s(e)&&null===(e=e[o]))&&(e=void 0)),void 0===e?a:e}},1469:(t,e,r)=>{"use strict";var n=r(7433);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},1946:(t,e,r)=>{"use strict";var n=r(9504),i=r(9306),s=r(4117),o=r(6198),a=r(8981),u=r(2248),c=r(6223),h=u.Map,l=u.has,f=u.set,d=n([].push);t.exports=function(t){var e,r,n,u=a(this),p=o(u),m=[],g=new h,v=s(t)?function(t){return t}:i(t);for(e=0;e<p;e++)n=v(r=u[e]),l(g,n)||f(g,n,r);return c(g,(function(t){d(m,t)})),m}},4428:(t,e,r)=>{"use strict";var n=r(8227)("iterator"),i=!1;try{var s=0,o={next:function(){return{done:!!s++}},return:function(){i=!0}};o[n]=function(){return this},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){try{if(!e&&!i)return!1}catch(t){return!1}var r=!1;try{var s={};s[n]=function(){return{next:function(){return{done:r=!0}}}},t(s)}catch(t){}return r}},4576:(t,e,r)=>{"use strict";var n=r(9504),i=n({}.toString),s=n("".slice);t.exports=function(t){return s(i(t),8,-1)}},6955:(t,e,r)=>{"use strict";var n=r(2140),i=r(4901),s=r(4576),o=r(8227)("toStringTag"),a=Object,u="Arguments"===s(function(){return arguments}());t.exports=n?s:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=a(t),o))?r:u?s(e):"Object"===(n=s(e))&&i(e.callee)?"Arguments":n}},933:(t,e,r)=>{"use strict";var n=r(6080),i=r(8551),s=r(8981),o=r(2652);t.exports=function(t,e,r){return function(a){var u=s(a),c=arguments.length,h=c>1?arguments[1]:void 0,l=void 0!==h,f=l?n(h,c>2?arguments[2]:void 0):void 0,d=new t,p=0;return o(u,(function(t){var n=l?f(t,p++):t;r?e(d,i(n)[0],n[1]):e(d,n)})),d}}},7500:(t,e,r)=>{"use strict";var n=r(8551);t.exports=function(t,e,r){return function(){for(var i=new t,s=arguments.length,o=0;o<s;o++){var a=arguments[o];r?e(i,n(a)[0],a[1]):e(i,a)}return i}}},6938:(t,e,r)=>{"use strict";var n=r(2360),i=r(2106),s=r(6279),o=r(6080),a=r(679),u=r(4117),c=r(2652),h=r(1088),l=r(2529),f=r(7633),d=r(3724),p=r(3451).fastKey,m=r(1181),g=m.set,v=m.getterFor;t.exports={getConstructor:function(t,e,r,h){var l=t((function(t,i){a(t,f),g(t,{type:e,index:n(null),first:void 0,last:void 0,size:0}),d||(t.size=0),u(i)||c(i,t[h],{that:t,AS_ENTRIES:r})})),f=l.prototype,m=v(e),y=function(t,e,r){var n,i,s=m(t),o=b(t,e);return o?o.value=r:(s.last=o={index:i=p(e,!0),key:e,value:r,previous:n=s.last,next:void 0,removed:!1},s.first||(s.first=o),n&&(n.next=o),d?s.size++:t.size++,"F"!==i&&(s.index[i]=o)),t},b=function(t,e){var r,n=m(t),i=p(e);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key===e)return r};return s(f,{clear:function(){for(var t=m(this),e=t.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=void 0),e=e.next;t.first=t.last=void 0,t.index=n(null),d?t.size=0:this.size=0},delete:function(t){var e=this,r=m(e),n=b(e,t);if(n){var i=n.next,s=n.previous;delete r.index[n.index],n.removed=!0,s&&(s.next=i),i&&(i.previous=s),r.first===n&&(r.first=i),r.last===n&&(r.last=s),d?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=m(this),n=o(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),s(f,r?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),d&&i(f,"size",{configurable:!0,get:function(){return m(this).size}}),l},setStrong:function(t,e,r){var n=e+" Iterator",i=v(e),s=v(n);h(t,e,(function(t,e){g(this,{type:n,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=s(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?l("keys"===e?r.key:"values"===e?r.value:[r.key,r.value],!1):(t.target=void 0,l(void 0,!0))}),r?"entries":"values",!r,!0),f(e)}}},4006:(t,e,r)=>{"use strict";var n=r(9504),i=r(6279),s=r(3451).getWeakData,o=r(679),a=r(8551),u=r(4117),c=r(34),h=r(2652),l=r(9213),f=r(9297),d=r(1181),p=d.set,m=d.getterFor,g=l.find,v=l.findIndex,y=n([].splice),b=0,x=function(t){return t.frozen||(t.frozen=new w)},w=function(){this.entries=[]},_=function(t,e){return g(t.entries,(function(t){return t[0]===e}))};w.prototype={get:function(t){var e=_(this,t);if(e)return e[1]},has:function(t){return!!_(this,t)},set:function(t,e){var r=_(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=v(this.entries,(function(e){return e[0]===t}));return~e&&y(this.entries,e,1),!!~e}},t.exports={getConstructor:function(t,e,r,n){var l=t((function(t,i){o(t,d),p(t,{type:e,id:b++,frozen:void 0}),u(i)||h(i,t[n],{that:t,AS_ENTRIES:r})})),d=l.prototype,g=m(e),v=function(t,e,r){var n=g(t),i=s(a(e),!0);return!0===i?x(n).set(e,r):i[n.id]=r,t};return i(d,{delete:function(t){var e=g(this);if(!c(t))return!1;var r=s(t);return!0===r?x(e).delete(t):r&&f(r,e.id)&&delete r[e.id]},has:function(t){var e=g(this);if(!c(t))return!1;var r=s(t);return!0===r?x(e).has(t):r&&f(r,e.id)}}),i(d,r?{get:function(t){var e=g(this);if(c(t)){var r=s(t);return!0===r?x(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return v(this,t,e)}}:{add:function(t){return v(this,t,!0)}}),l}}},6468:(t,e,r)=>{"use strict";var n=r(6518),i=r(4475),s=r(9504),o=r(2796),a=r(6840),u=r(3451),c=r(2652),h=r(679),l=r(4901),f=r(4117),d=r(34),p=r(9039),m=r(4428),g=r(687),v=r(3167);t.exports=function(t,e,r){var y=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),x=y?"set":"add",w=i[t],_=w&&w.prototype,I=w,A={},O=function(t){var e=s(_[t]);a(_,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return b&&!d(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(o(t,!l(w)||!(b||_.forEach&&!p((function(){(new w).entries().next()})))))I=r.getConstructor(e,t,y,x),u.enable();else if(o(t,!0)){var S=new I,P=S[x](b?{}:-0,1)!==S,k=p((function(){S.has(1)})),C=m((function(t){new w(t)})),T=!b&&p((function(){for(var t=new w,e=5;e--;)t[x](e,e);return!t.has(-0)}));C||((I=e((function(t,e){h(t,_);var r=v(new w,t,I);return f(e)||c(e,r[x],{that:r,AS_ENTRIES:y}),r}))).prototype=_,_.constructor=I),(k||T)&&(O("delete"),O("has"),y&&O("get")),(T||P)&&O(x),b&&_.clear&&delete _.clear}return A[t]=I,n({global:!0,constructor:!0,forced:I!==w},A),g(I,t),b||r.setStrong(I,t,y),I}},9323:(t,e,r)=>{"use strict";r(6033),r(3772);var n=r(7751),i=r(2360),s=r(34),o=Object,a=TypeError,u=n("Map"),c=n("WeakMap"),h=function(){this.object=null,this.symbol=null,this.primitives=null,this.objectsByIndex=i(null)};h.prototype.get=function(t,e){return this[t]||(this[t]=e())},h.prototype.next=function(t,e,r){var n=r?this.objectsByIndex[t]||(this.objectsByIndex[t]=new c):this.primitives||(this.primitives=new u),i=n.get(e);return i||n.set(e,i=new h),i};var l=new h;t.exports=function(){var t,e,r=l,n=arguments.length;for(t=0;t<n;t++)s(e=arguments[t])&&(r=r.next(t,e,!0));if(this===o&&r===l)throw new a("Composite keys must contain a non-primitive component");for(t=0;t<n;t++)s(e=arguments[t])||(r=r.next(t,e,!1));return r}},7740:(t,e,r)=>{"use strict";var n=r(9297),i=r(5031),s=r(7347),o=r(4913);t.exports=function(t,e,r){for(var a=i(e),u=o.f,c=s.f,h=0;h<a.length;h++){var l=a[h];n(t,l)||r&&n(r,l)||u(t,l,c(e,l))}}},2211:(t,e,r)=>{"use strict";var n=r(9039);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},2529:t=>{"use strict";t.exports=function(t,e){return{value:t,done:e}}},6699:(t,e,r)=>{"use strict";var n=r(3724),i=r(4913),s=r(6980);t.exports=n?function(t,e,r){return i.f(t,e,s(1,r))}:function(t,e,r){return t[e]=r,t}},6980:t=>{"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},2106:(t,e,r)=>{"use strict";var n=r(283),i=r(4913);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),i.f(t,e,r)}},6840:(t,e,r)=>{"use strict";var n=r(4901),i=r(4913),s=r(283),o=r(9433);t.exports=function(t,e,r,a){a||(a={});var u=a.enumerable,c=void 0!==a.name?a.name:e;if(n(r)&&s(r,c,a),a.global)u?t[e]=r:o(e,r);else{try{a.unsafe?t[e]&&(u=!0):delete t[e]}catch(t){}u?t[e]=r:i.f(t,e,{value:r,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},6279:(t,e,r)=>{"use strict";var n=r(6840);t.exports=function(t,e,r){for(var i in e)n(t,i,e[i],r);return t}},9433:(t,e,r)=>{"use strict";var n=r(4475),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},3724:(t,e,r)=>{"use strict";var n=r(9039);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4055:(t,e,r)=>{"use strict";var n=r(4475),i=r(34),s=n.document,o=i(s)&&i(s.createElement);t.exports=function(t){return o?s.createElement(t):{}}},6763:t=>{"use strict";t.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},8119:(t,e,r)=>{"use strict";var n=r(9392);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},9088:(t,e,r)=>{"use strict";var n=r(4475),i=r(4576);t.exports="process"===i(n.process)},9392:t=>{"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7388:(t,e,r)=>{"use strict";var n,i,s=r(4475),o=r(9392),a=s.process,u=s.Deno,c=a&&a.versions||u&&u.version,h=c&&c.v8;h&&(i=(n=h.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&o&&(!(n=o.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\/(\d+)/))&&(i=+n[1]),t.exports=i},8727:t=>{"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6518:(t,e,r)=>{"use strict";var n=r(4475),i=r(7347).f,s=r(6699),o=r(6840),a=r(9433),u=r(7740),c=r(2796);t.exports=function(t,e){var r,h,l,f,d,p=t.target,m=t.global,g=t.stat;if(r=m?n:g?n[p]||a(p,{}):n[p]&&n[p].prototype)for(h in e){if(f=e[h],l=t.dontCallGetSet?(d=i(r,h))&&d.value:r[h],!c(m?h:p+(g?".":"#")+h,t.forced)&&void 0!==l){if(typeof f==typeof l)continue;u(f,l)}(t.sham||l&&l.sham)&&s(f,"sham",!0),o(r,h,f,t)}}},9039:t=>{"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},2744:(t,e,r)=>{"use strict";var n=r(9039);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},8745:(t,e,r)=>{"use strict";var n=r(616),i=Function.prototype,s=i.apply,o=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?o.bind(s):function(){return o.apply(s,arguments)})},6080:(t,e,r)=>{"use strict";var n=r(7476),i=r(9306),s=r(616),o=n(n.bind);t.exports=function(t,e){return i(t),void 0===e?t:s?o(t,e):function(){return t.apply(e,arguments)}}},616:(t,e,r)=>{"use strict";var n=r(9039);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},9565:(t,e,r)=>{"use strict";var n=r(616),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},350:(t,e,r)=>{"use strict";var n=r(3724),i=r(9297),s=Function.prototype,o=n&&Object.getOwnPropertyDescriptor,a=i(s,"name"),u=a&&"something"===function(){}.name,c=a&&(!n||n&&o(s,"name").configurable);t.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},6706:(t,e,r)=>{"use strict";var n=r(9504),i=r(9306);t.exports=function(t,e,r){try{return n(i(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}},7476:(t,e,r)=>{"use strict";var n=r(4576),i=r(9504);t.exports=function(t){if("Function"===n(t))return i(t)}},9504:(t,e,r)=>{"use strict";var n=r(616),i=Function.prototype,s=i.call,o=n&&i.bind.bind(s,s);t.exports=n?o:function(t){return function(){return s.apply(t,arguments)}}},7751:(t,e,r)=>{"use strict";var n=r(4475),i=r(4901);t.exports=function(t,e){return arguments.length<2?(r=n[t],i(r)?r:void 0):n[t]&&n[t][e];var r}},1767:t=>{"use strict";t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},851:(t,e,r)=>{"use strict";var n=r(6955),i=r(5966),s=r(4117),o=r(6269),a=r(8227)("iterator");t.exports=function(t){if(!s(t))return i(t,a)||i(t,"@@iterator")||o[n(t)]}},81:(t,e,r)=>{"use strict";var n=r(9565),i=r(9306),s=r(8551),o=r(6823),a=r(851),u=TypeError;t.exports=function(t,e){var r=arguments.length<2?a(t):e;if(i(r))return s(n(r,t));throw new u(o(t)+" is not iterable")}},5966:(t,e,r)=>{"use strict";var n=r(9306),i=r(4117);t.exports=function(t,e){var r=t[e];return i(r)?void 0:n(r)}},3789:(t,e,r)=>{"use strict";var n=r(9306),i=r(8551),s=r(9565),o=r(1291),a=r(1767),u="Invalid size",c=RangeError,h=TypeError,l=Math.max,f=function(t,e){this.set=t,this.size=l(e,0),this.has=n(t.has),this.keys=n(t.keys)};f.prototype={getIterator:function(){return a(i(s(this.keys,this.set)))},includes:function(t){return s(this.has,this.set,t)}},t.exports=function(t){i(t);var e=+t.size;if(e!=e)throw new h(u);var r=o(e);if(r<0)throw new c(u);return new f(t,r)}},4475:function(t,e,r){"use strict";var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:(t,e,r)=>{"use strict";var n=r(9504),i=r(8981),s=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return s(i(t),e)}},421:t=>{"use strict";t.exports={}},3138:t=>{"use strict";t.exports=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}},397:(t,e,r)=>{"use strict";var n=r(7751);t.exports=n("document","documentElement")},5917:(t,e,r)=>{"use strict";var n=r(3724),i=r(9039),s=r(4055);t.exports=!n&&!i((function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},7055:(t,e,r)=>{"use strict";var n=r(9504),i=r(9039),s=r(4576),o=Object,a=n("".split);t.exports=i((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"===s(t)?a(t,""):o(t)}:o},3167:(t,e,r)=>{"use strict";var n=r(4901),i=r(34),s=r(2967);t.exports=function(t,e,r){var o,a;return s&&n(o=e.constructor)&&o!==r&&i(a=o.prototype)&&a!==r.prototype&&s(t,a),t}},3706:(t,e,r)=>{"use strict";var n=r(9504),i=r(4901),s=r(7629),o=n(Function.toString);i(s.inspectSource)||(s.inspectSource=function(t){return o(t)}),t.exports=s.inspectSource},3451:(t,e,r)=>{"use strict";var n=r(6518),i=r(9504),s=r(421),o=r(34),a=r(9297),u=r(4913).f,c=r(8480),h=r(298),l=r(4124),f=r(3392),d=r(2744),p=!1,m=f("meta"),g=0,v=function(t){u(t,m,{value:{objectID:"O"+g++,weakData:{}}})},y=t.exports={enable:function(){y.enable=function(){},p=!0;var t=c.f,e=i([].splice),r={};r[m]=1,t(r).length&&(c.f=function(r){for(var n=t(r),i=0,s=n.length;i<s;i++)if(n[i]===m){e(n,i,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:h.f}))},fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,m)){if(!l(t))return"F";if(!e)return"E";v(t)}return t[m].objectID},getWeakData:function(t,e){if(!a(t,m)){if(!l(t))return!0;if(!e)return!1;v(t)}return t[m].weakData},onFreeze:function(t){return d&&p&&l(t)&&!a(t,m)&&v(t),t}};s[m]=!0},1181:(t,e,r)=>{"use strict";var n,i,s,o=r(8622),a=r(4475),u=r(34),c=r(6699),h=r(9297),l=r(7629),f=r(6119),d=r(421),p="Object already initialized",m=a.TypeError,g=a.WeakMap;if(o||l.state){var v=l.state||(l.state=new g);v.get=v.get,v.has=v.has,v.set=v.set,n=function(t,e){if(v.has(t))throw new m(p);return e.facade=t,v.set(t,e),e},i=function(t){return v.get(t)||{}},s=function(t){return v.has(t)}}else{var y=f("state");d[y]=!0,n=function(t,e){if(h(t,y))throw new m(p);return e.facade=t,c(t,y,e),e},i=function(t){return h(t,y)?t[y]:{}},s=function(t){return h(t,y)}}t.exports={set:n,get:i,has:s,enforce:function(t){return s(t)?i(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!u(e)||(r=i(e)).type!==t)throw new m("Incompatible receiver, "+t+" required");return r}}}},4209:(t,e,r)=>{"use strict";var n=r(8227),i=r(6269),s=n("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||o[s]===t)}},4376:(t,e,r)=>{"use strict";var n=r(4576);t.exports=Array.isArray||function(t){return"Array"===n(t)}},4901:t=>{"use strict";var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},3517:(t,e,r)=>{"use strict";var n=r(9504),i=r(9039),s=r(4901),o=r(6955),a=r(7751),u=r(3706),c=function(){},h=a("Reflect","construct"),l=/^\s*(?:class|function)\b/,f=n(l.exec),d=!l.test(c),p=function(t){if(!s(t))return!1;try{return h(c,[],t),!0}catch(t){return!1}},m=function(t){if(!s(t))return!1;switch(o(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!f(l,u(t))}catch(t){return!0}};m.sham=!0,t.exports=!h||i((function(){var t;return p(p.call)||!p(Object)||!p((function(){t=!0}))||t}))?m:p},2796:(t,e,r)=>{"use strict";var n=r(9039),i=r(4901),s=/#|\.prototype\./,o=function(t,e){var r=u[a(t)];return r===h||r!==c&&(i(e)?n(e):!!e)},a=o.normalize=function(t){return String(t).replace(s,".").toLowerCase()},u=o.data={},c=o.NATIVE="N",h=o.POLYFILL="P";t.exports=o},1563:(t,e,r)=>{"use strict";var n=r(6955),i=r(9297),s=r(4117),o=r(8227),a=r(6269),u=o("iterator"),c=Object;t.exports=function(t){if(s(t))return!1;var e=c(t);return void 0!==e[u]||"@@iterator"in e||i(a,n(e))}},4117:t=>{"use strict";t.exports=function(t){return null==t}},34:(t,e,r)=>{"use strict";var n=r(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},3925:(t,e,r)=>{"use strict";var n=r(34);t.exports=function(t){return n(t)||null===t}},6395:t=>{"use strict";t.exports=!1},757:(t,e,r)=>{"use strict";var n=r(7751),i=r(4901),s=r(1625),o=r(7040),a=Object;t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return i(e)&&s(e.prototype,a(t))}},507:(t,e,r)=>{"use strict";var n=r(9565);t.exports=function(t,e,r){for(var i,s,o=r?t:t.iterator,a=t.next;!(i=n(a,o)).done;)if(void 0!==(s=e(i.value)))return s}},2652:(t,e,r)=>{"use strict";var n=r(6080),i=r(9565),s=r(8551),o=r(6823),a=r(4209),u=r(6198),c=r(1625),h=r(81),l=r(851),f=r(9539),d=TypeError,p=function(t,e){this.stopped=t,this.result=e},m=p.prototype;t.exports=function(t,e,r){var g,v,y,b,x,w,_,I=r&&r.that,A=!(!r||!r.AS_ENTRIES),O=!(!r||!r.IS_RECORD),S=!(!r||!r.IS_ITERATOR),P=!(!r||!r.INTERRUPTED),k=n(e,I),C=function(t){return g&&f(g,"normal",t),new p(!0,t)},T=function(t){return A?(s(t),P?k(t[0],t[1],C):k(t[0],t[1])):P?k(t,C):k(t)};if(O)g=t.iterator;else if(S)g=t;else{if(!(v=l(t)))throw new d(o(t)+" is not iterable");if(a(v)){for(y=0,b=u(t);b>y;y++)if((x=T(t[y]))&&c(m,x))return x;return new p(!1)}g=h(t,v)}for(w=O?t.next:g.next;!(_=i(w,g)).done;){try{x=T(_.value)}catch(t){f(g,"throw",t)}if("object"==typeof x&&x&&c(m,x))return x}return new p(!1)}},9539:(t,e,r)=>{"use strict";var n=r(9565),i=r(8551),s=r(5966);t.exports=function(t,e,r){var o,a;i(t);try{if(!(o=s(t,"return"))){if("throw"===e)throw r;return r}o=n(o,t)}catch(t){a=!0,o=t}if("throw"===e)throw r;if(a)throw o;return i(o),r}},3994:(t,e,r)=>{"use strict";var n=r(7657).IteratorPrototype,i=r(2360),s=r(6980),o=r(687),a=r(6269),u=function(){return this};t.exports=function(t,e,r,c){var h=e+" Iterator";return t.prototype=i(n,{next:s(+!c,r)}),o(t,h,!1,!0),a[h]=u,t}},1088:(t,e,r)=>{"use strict";var n=r(6518),i=r(9565),s=r(6395),o=r(350),a=r(4901),u=r(3994),c=r(2787),h=r(2967),l=r(687),f=r(6699),d=r(6840),p=r(8227),m=r(6269),g=r(7657),v=o.PROPER,y=o.CONFIGURABLE,b=g.IteratorPrototype,x=g.BUGGY_SAFARI_ITERATORS,w=p("iterator"),_="keys",I="values",A="entries",O=function(){return this};t.exports=function(t,e,r,o,p,g,S){u(r,e,o);var P,k,C,T=function(t){if(t===p&&z)return z;if(!x&&t&&t in F)return F[t];switch(t){case _:case I:case A:return function(){return new r(this,t)}}return function(){return new r(this)}},M=e+" Iterator",E=!1,F=t.prototype,R=F[w]||F["@@iterator"]||p&&F[p],z=!x&&R||T(p),V="Array"===e&&F.entries||R;if(V&&(P=c(V.call(new t)))!==Object.prototype&&P.next&&(s||c(P)===b||(h?h(P,b):a(P[w])||d(P,w,O)),l(P,M,!0,!0),s&&(m[M]=O)),v&&p===I&&R&&R.name!==I&&(!s&&y?f(F,"name",I):(E=!0,z=function(){return i(R,this)})),p)if(k={values:T(I),keys:g?z:T(_),entries:T(A)},S)for(C in k)(x||E||!(C in F))&&d(F,C,k[C]);else n({target:e,proto:!0,forced:x||E},k);return s&&!S||F[w]===z||d(F,w,z,{name:p}),m[e]=z,k}},7657:(t,e,r)=>{"use strict";var n,i,s,o=r(9039),a=r(4901),u=r(34),c=r(2360),h=r(2787),l=r(6840),f=r(8227),d=r(6395),p=f("iterator"),m=!1;[].keys&&("next"in(s=[].keys())?(i=h(h(s)))!==Object.prototype&&(n=i):m=!0),!u(n)||o((function(){var t={};return n[p].call(t)!==t}))?n={}:d&&(n=c(n)),a(n[p])||l(n,p,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:m}},6269:t=>{"use strict";t.exports={}},6198:(t,e,r)=>{"use strict";var n=r(8014);t.exports=function(t){return n(t.length)}},283:(t,e,r)=>{"use strict";var n=r(9504),i=r(9039),s=r(4901),o=r(9297),a=r(3724),u=r(350).CONFIGURABLE,c=r(3706),h=r(1181),l=h.enforce,f=h.get,d=String,p=Object.defineProperty,m=n("".slice),g=n("".replace),v=n([].join),y=a&&!i((function(){return 8!==p((function(){}),"length",{value:8}).length})),b=String(String).split("String"),x=t.exports=function(t,e,r){"Symbol("===m(d(e),0,7)&&(e="["+g(d(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!o(t,"name")||u&&t.name!==e)&&(a?p(t,"name",{value:e,configurable:!0}):t.name=e),y&&r&&o(r,"arity")&&t.length!==r.arity&&p(t,"length",{value:r.arity});try{r&&o(r,"constructor")&&r.constructor?a&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=l(t);return o(n,"source")||(n.source=v(b,"string"==typeof e?e:"")),t};Function.prototype.toString=x((function(){return s(this)&&f(this).source||c(this)}),"toString")},2248:(t,e,r)=>{"use strict";var n=r(9504),i=Map.prototype;t.exports={Map,set:n(i.set),get:n(i.get),has:n(i.has),remove:n(i.delete),proto:i}},6223:(t,e,r)=>{"use strict";var n=r(9504),i=r(507),s=r(2248),o=s.Map,a=s.proto,u=n(a.forEach),c=n(a.entries),h=c(new o).next;t.exports=function(t,e,r){return r?i({iterator:c(t),next:h},(function(t){return e(t[1],t[0])})):u(t,e)}},3164:(t,e,r)=>{"use strict";var n=r(7782),i=Math.abs,s=2220446049250313e-31,o=1/s;t.exports=function(t,e,r,a){var u=+t,c=i(u),h=n(u);if(c<a)return h*function(t){return t+o-o}(c/a/e)*a*e;var l=(1+e/s)*c,f=l-(l-c);return f>r||f!=f?h*(1/0):h*f}},5617:(t,e,r)=>{"use strict";var n=r(3164);t.exports=Math.fround||function(t){return n(t,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)}},7905:t=>{"use strict";t.exports=Math.scale||function(t,e,r,n,i){var s=+t,o=+e,a=+r,u=+n,c=+i;return s!=s||o!=o||a!=a||u!=u||c!=c?NaN:s===1/0||s===-1/0?s:(s-o)*(c-u)/(a-o)+u}},7782:t=>{"use strict";t.exports=Math.sign||function(t){var e=+t;return 0===e||e!=e?e:e<0?-1:1}},741:t=>{"use strict";var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},6043:(t,e,r)=>{"use strict";var n=r(9306),i=TypeError,s=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw new i("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new s(t)}},360:(t,e,r)=>{"use strict";var n=r(4475).isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&n(t)}},2360:(t,e,r)=>{"use strict";var n,i=r(8551),s=r(6801),o=r(8727),a=r(421),u=r(397),c=r(4055),h=r(6119),l="prototype",f="script",d=h("IE_PROTO"),p=function(){},m=function(t){return"<"+f+">"+t+"</"+f+">"},g=function(t){t.write(m("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;v="undefined"!=typeof document?document.domain&&n?g(n):(e=c("iframe"),r="java"+f+":",e.style.display="none",u.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(m("document.F=Object")),t.close(),t.F):g(n);for(var i=o.length;i--;)delete v[l][o[i]];return v()};a[d]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(p[l]=i(t),r=new p,p[l]=null,r[d]=t):r=v(),void 0===e?r:s.f(r,e)}},6801:(t,e,r)=>{"use strict";var n=r(3724),i=r(8686),s=r(4913),o=r(8551),a=r(5397),u=r(1072);e.f=n&&!i?Object.defineProperties:function(t,e){o(t);for(var r,n=a(e),i=u(e),c=i.length,h=0;c>h;)s.f(t,r=i[h++],n[r]);return t}},4913:(t,e,r)=>{"use strict";var n=r(3724),i=r(5917),s=r(8686),o=r(8551),a=r(6969),u=TypeError,c=Object.defineProperty,h=Object.getOwnPropertyDescriptor,l="enumerable",f="configurable",d="writable";e.f=n?s?function(t,e,r){if(o(t),e=a(e),o(r),"function"==typeof t&&"prototype"===e&&"value"in r&&d in r&&!r[d]){var n=h(t,e);n&&n[d]&&(t[e]=r.value,r={configurable:f in r?r[f]:n[f],enumerable:l in r?r[l]:n[l],writable:!1})}return c(t,e,r)}:c:function(t,e,r){if(o(t),e=a(e),o(r),i)try{return c(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new u("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},7347:(t,e,r)=>{"use strict";var n=r(3724),i=r(9565),s=r(8773),o=r(6980),a=r(5397),u=r(6969),c=r(9297),h=r(5917),l=Object.getOwnPropertyDescriptor;e.f=n?l:function(t,e){if(t=a(t),e=u(e),h)try{return l(t,e)}catch(t){}if(c(t,e))return o(!i(s.f,t,e),t[e])}},298:(t,e,r)=>{"use strict";var n=r(4576),i=r(5397),s=r(8480).f,o=r(7680),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"Window"===n(t)?function(t){try{return s(t)}catch(t){return o(a)}}(t):s(i(t))}},8480:(t,e,r)=>{"use strict";var n=r(1828),i=r(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},3717:(t,e)=>{"use strict";e.f=Object.getOwnPropertySymbols},2787:(t,e,r)=>{"use strict";var n=r(9297),i=r(4901),s=r(8981),o=r(6119),a=r(2211),u=o("IE_PROTO"),c=Object,h=c.prototype;t.exports=a?c.getPrototypeOf:function(t){var e=s(t);if(n(e,u))return e[u];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof c?h:null}},4124:(t,e,r)=>{"use strict";var n=r(9039),i=r(34),s=r(4576),o=r(5652),a=Object.isExtensible,u=n((function(){a(1)}));t.exports=u||o?function(t){return!!i(t)&&(!o||"ArrayBuffer"!==s(t))&&(!a||a(t))}:a},1625:(t,e,r)=>{"use strict";var n=r(9504);t.exports=n({}.isPrototypeOf)},1828:(t,e,r)=>{"use strict";var n=r(9504),i=r(9297),s=r(5397),o=r(9617).indexOf,a=r(421),u=n([].push);t.exports=function(t,e){var r,n=s(t),c=0,h=[];for(r in n)!i(a,r)&&i(n,r)&&u(h,r);for(;e.length>c;)i(n,r=e[c++])&&(~o(h,r)||u(h,r));return h}},1072:(t,e,r)=>{"use strict";var n=r(1828),i=r(8727);t.exports=Object.keys||function(t){return n(t,i)}},8773:(t,e)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},2967:(t,e,r)=>{"use strict";var n=r(6706),i=r(34),s=r(7750),o=r(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return s(r),o(n),i(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0)},4270:(t,e,r)=>{"use strict";var n=r(9565),i=r(4901),s=r(34),o=TypeError;t.exports=function(t,e){var r,a;if("string"===e&&i(r=t.toString)&&!s(a=n(r,t)))return a;if(i(r=t.valueOf)&&!s(a=n(r,t)))return a;if("string"!==e&&i(r=t.toString)&&!s(a=n(r,t)))return a;throw new o("Can't convert object to primitive value")}},5031:(t,e,r)=>{"use strict";var n=r(7751),i=r(9504),s=r(8480),o=r(3717),a=r(8551),u=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=s.f(a(t)),r=o.f;return r?u(e,r(t)):e}},9167:(t,e,r)=>{"use strict";var n=r(4475);t.exports=n},1103:t=>{"use strict";t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},8449:(t,e,r)=>{"use strict";r(6033),r(3772);var n=r(7751),i=r(9504),s=r(5745),o=n("Map"),a=n("WeakMap"),u=i([].push),c=s("metadata"),h=c.store||(c.store=new a),l=function(t,e,r){var n=h.get(t);if(!n){if(!r)return;h.set(t,n=new o)}var i=n.get(e);if(!i){if(!r)return;n.set(e,i=new o)}return i};t.exports={store:h,getMap:l,has:function(t,e,r){var n=l(e,r,!1);return void 0!==n&&n.has(t)},get:function(t,e,r){var n=l(e,r,!1);return void 0===n?void 0:n.get(t)},set:function(t,e,r,n){l(r,n,!0).set(t,e)},keys:function(t,e){var r=l(t,e,!1),n=[];return r&&r.forEach((function(t,e){u(n,e)})),n},toKey:function(t){return void 0===t||"symbol"==typeof t?t:String(t)}}},7979:(t,e,r)=>{"use strict";var n=r(8551);t.exports=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},7750:(t,e,r)=>{"use strict";var n=r(4117),i=TypeError;t.exports=function(t){if(n(t))throw new i("Can't call method on "+t);return t}},3317:t=>{"use strict";t.exports=function(t,e){return t===e||t!=t&&e!=e}},9472:(t,e,r)=>{"use strict";var n,i=r(4475),s=r(8745),o=r(4901),a=r(6763),u=r(9392),c=r(7680),h=r(2812),l=i.Function,f=/MSIE .\./.test(u)||a&&((n=i.Bun.version.split(".")).length<3||"0"===n[0]&&(n[1]<3||"3"===n[1]&&"0"===n[2]));t.exports=function(t,e){var r=e?2:1;return f?function(n,i){var a=h(arguments.length,1)>r,u=o(n)?n:l(n),f=a?c(arguments,r):[],d=a?function(){s(u,this,f)}:u;return e?t(d,i):t(d)}:t}},9286:(t,e,r)=>{"use strict";var n=r(4402),i=r(8469),s=n.Set,o=n.add;t.exports=function(t){var e=new s;return i(t,(function(t){o(e,t)})),e}},3440:(t,e,r)=>{"use strict";var n=r(7080),i=r(4402),s=r(9286),o=r(5170),a=r(3789),u=r(8469),c=r(507),h=i.has,l=i.remove;t.exports=function(t){var e=n(this),r=a(t),i=s(e);return o(e)<=r.size?u(e,(function(t){r.includes(t)&&l(i,t)})):c(r.getIterator(),(function(t){h(e,t)&&l(i,t)})),i}},4402:(t,e,r)=>{"use strict";var n=r(9504),i=Set.prototype;t.exports={Set,add:n(i.add),has:n(i.has),remove:n(i.delete),proto:i}},8750:(t,e,r)=>{"use strict";var n=r(7080),i=r(4402),s=r(5170),o=r(3789),a=r(8469),u=r(507),c=i.Set,h=i.add,l=i.has;t.exports=function(t){var e=n(this),r=o(t),i=new c;return s(e)>r.size?u(r.getIterator(),(function(t){l(e,t)&&h(i,t)})):a(e,(function(t){r.includes(t)&&h(i,t)})),i}},4449:(t,e,r)=>{"use strict";var n=r(7080),i=r(4402).has,s=r(5170),o=r(3789),a=r(8469),u=r(507),c=r(9539);t.exports=function(t){var e=n(this),r=o(t);if(s(e)<=r.size)return!1!==a(e,(function(t){if(r.includes(t))return!1}),!0);var h=r.getIterator();return!1!==u(h,(function(t){if(i(e,t))return c(h,"normal",!1)}))}},3838:(t,e,r)=>{"use strict";var n=r(7080),i=r(5170),s=r(8469),o=r(3789);t.exports=function(t){var e=n(this),r=o(t);return!(i(e)>r.size)&&!1!==s(e,(function(t){if(!r.includes(t))return!1}),!0)}},8527:(t,e,r)=>{"use strict";var n=r(7080),i=r(4402).has,s=r(5170),o=r(3789),a=r(507),u=r(9539);t.exports=function(t){var e=n(this),r=o(t);if(s(e)<r.size)return!1;var c=r.getIterator();return!1!==a(c,(function(t){if(!i(e,t))return u(c,"normal",!1)}))}},8469:(t,e,r)=>{"use strict";var n=r(9504),i=r(507),s=r(4402),o=s.Set,a=s.proto,u=n(a.forEach),c=n(a.keys),h=c(new o).next;t.exports=function(t,e,r){return r?i({iterator:c(t),next:h},e):u(t,e)}},5170:(t,e,r)=>{"use strict";var n=r(6706),i=r(4402);t.exports=n(i.proto,"size","get")||function(t){return t.size}},7633:(t,e,r)=>{"use strict";var n=r(7751),i=r(2106),s=r(8227),o=r(3724),a=s("species");t.exports=function(t){var e=n(t);o&&e&&!e[a]&&i(e,a,{configurable:!0,get:function(){return this}})}},3650:(t,e,r)=>{"use strict";var n=r(7080),i=r(4402),s=r(9286),o=r(3789),a=r(507),u=i.add,c=i.has,h=i.remove;t.exports=function(t){var e=n(this),r=o(t).getIterator(),i=s(e);return a(r,(function(t){c(e,t)?h(i,t):u(i,t)})),i}},687:(t,e,r)=>{"use strict";var n=r(4913).f,i=r(9297),s=r(8227)("toStringTag");t.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!i(t,s)&&n(t,s,{configurable:!0,value:e})}},4204:(t,e,r)=>{"use strict";var n=r(7080),i=r(4402).add,s=r(9286),o=r(3789),a=r(507);t.exports=function(t){var e=n(this),r=o(t).getIterator(),u=s(e);return a(r,(function(t){i(u,t)})),u}},6119:(t,e,r)=>{"use strict";var n=r(5745),i=r(3392),s=n("keys");t.exports=function(t){return s[t]||(s[t]=i(t))}},7629:(t,e,r)=>{"use strict";var n=r(6395),i=r(4475),s=r(9433),o="__core-js_shared__",a=t.exports=i[o]||s(o,{});(a.versions||(a.versions=[])).push({version:"3.36.1",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:(t,e,r)=>{"use strict";var n=r(7629);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},8183:(t,e,r)=>{"use strict";var n=r(9504),i=r(1291),s=r(655),o=r(7750),a=n("".charAt),u=n("".charCodeAt),c=n("".slice),h=function(t){return function(e,r){var n,h,l=s(o(e)),f=i(r),d=l.length;return f<0||f>=d?t?"":void 0:(n=u(l,f))<55296||n>56319||f+1===d||(h=u(l,f+1))<56320||h>57343?t?a(l,f):n:t?c(l,f,f+2):h-56320+(n-55296<<10)+65536}};t.exports={codeAt:h(!1),charAt:h(!0)}},4495:(t,e,r)=>{"use strict";var n=r(7388),i=r(9039),s=r(4475).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!s(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},9225:(t,e,r)=>{"use strict";var n,i,s,o,a=r(4475),u=r(8745),c=r(6080),h=r(4901),l=r(9297),f=r(9039),d=r(397),p=r(7680),m=r(4055),g=r(2812),v=r(8119),y=r(9088),b=a.setImmediate,x=a.clearImmediate,w=a.process,_=a.Dispatch,I=a.Function,A=a.MessageChannel,O=a.String,S=0,P={},k="onreadystatechange";f((function(){n=a.location}));var C=function(t){if(l(P,t)){var e=P[t];delete P[t],e()}},T=function(t){return function(){C(t)}},M=function(t){C(t.data)},E=function(t){a.postMessage(O(t),n.protocol+"//"+n.host)};b&&x||(b=function(t){g(arguments.length,1);var e=h(t)?t:I(t),r=p(arguments,1);return P[++S]=function(){u(e,void 0,r)},i(S),S},x=function(t){delete P[t]},y?i=function(t){w.nextTick(T(t))}:_&&_.now?i=function(t){_.now(T(t))}:A&&!v?(o=(s=new A).port2,s.port1.onmessage=M,i=c(o.postMessage,o)):a.addEventListener&&h(a.postMessage)&&!a.importScripts&&n&&"file:"!==n.protocol&&!f(E)?(i=E,a.addEventListener("message",M,!1)):i=k in m("script")?function(t){d.appendChild(m("script"))[k]=function(){d.removeChild(this),C(t)}}:function(t){setTimeout(T(t),0)}),t.exports={set:b,clear:x}},5610:(t,e,r)=>{"use strict";var n=r(1291),i=Math.max,s=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):s(r,e)}},5397:(t,e,r)=>{"use strict";var n=r(7055),i=r(7750);t.exports=function(t){return n(i(t))}},1291:(t,e,r)=>{"use strict";var n=r(741);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},8014:(t,e,r)=>{"use strict";var n=r(1291),i=Math.min;t.exports=function(t){var e=n(t);return e>0?i(e,9007199254740991):0}},8981:(t,e,r)=>{"use strict";var n=r(7750),i=Object;t.exports=function(t){return i(n(t))}},8229:(t,e,r)=>{"use strict";var n=r(9590),i=RangeError;t.exports=function(t,e){var r=n(t);if(r%e)throw new i("Wrong offset");return r}},9590:(t,e,r)=>{"use strict";var n=r(1291),i=RangeError;t.exports=function(t){var e=n(t);if(e<0)throw new i("The argument can't be less than 0");return e}},2777:(t,e,r)=>{"use strict";var n=r(9565),i=r(34),s=r(757),o=r(5966),a=r(4270),u=r(8227),c=TypeError,h=u("toPrimitive");t.exports=function(t,e){if(!i(t)||s(t))return t;var r,u=o(t,h);if(u){if(void 0===e&&(e="default"),r=n(u,t,e),!i(r)||s(r))return r;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},6969:(t,e,r)=>{"use strict";var n=r(2777),i=r(757);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},7650:(t,e,r)=>{"use strict";var n=r(7751),i=r(4901),s=r(1563),o=r(34),a=n("Set");t.exports=function(t){return function(t){return o(t)&&"number"==typeof t.size&&i(t.has)&&i(t.keys)}(t)?t:s(t)?new a(t):t}},2140:(t,e,r)=>{"use strict";var n={};n[r(8227)("toStringTag")]="z",t.exports="[object z]"===String(n)},655:(t,e,r)=>{"use strict";var n=r(6955),i=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},6823:t=>{"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},3392:(t,e,r)=>{"use strict";var n=r(9504),i=0,s=Math.random(),o=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++i+s,36)}},7040:(t,e,r)=>{"use strict";var n=r(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:(t,e,r)=>{"use strict";var n=r(3724),i=r(9039);t.exports=n&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},2812:t=>{"use strict";var e=TypeError;t.exports=function(t,r){if(t<r)throw new e("Not enough arguments");return t}},8622:(t,e,r)=>{"use strict";var n=r(4475),i=r(4901),s=n.WeakMap;t.exports=i(s)&&/native code/.test(String(s))},4995:(t,e,r)=>{"use strict";var n=r(9504),i=WeakMap.prototype;t.exports={WeakMap,set:n(i.set),get:n(i.get),has:n(i.has),remove:n(i.delete)}},8205:(t,e,r)=>{"use strict";var n=r(9504),i=WeakSet.prototype;t.exports={WeakSet,add:n(i.add),has:n(i.has),remove:n(i.delete)}},511:(t,e,r)=>{"use strict";var n=r(9167),i=r(9297),s=r(1951),o=r(4913).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});i(e,t)||o(e,t,{value:s.f(t)})}},1951:(t,e,r)=>{"use strict";var n=r(8227);e.f=n},8227:(t,e,r)=>{"use strict";var n=r(4475),i=r(5745),s=r(9297),o=r(3392),a=r(4495),u=r(7040),c=n.Symbol,h=i("wks"),l=u?c.for||c:c&&c.withoutSetter||o;t.exports=function(t){return s(h,t)||(h[t]=a&&s(c,t)?c[t]:l("Symbol."+t)),h[t]}},4423:(t,e,r)=>{"use strict";var n=r(6518),i=r(9617).includes,s=r(9039),o=r(6469);n({target:"Array",proto:!0,forced:s((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},8523:(t,e,r)=>{"use strict";r(6468)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(6938))},7072:(t,e,r)=>{"use strict";var n=r(6518),i=r(9504),s=r(9306),o=r(7750),a=r(2652),u=r(2248),c=r(6395),h=u.Map,l=u.has,f=u.get,d=u.set,p=i([].push);n({target:"Map",stat:!0,forced:c},{groupBy:function(t,e){o(t),s(e);var r=new h,n=0;return a(t,(function(t){var i=e(t,n++);l(r,i)?p(f(r,i),t):d(r,i,[t])})),r}})},6033:(t,e,r)=>{"use strict";r(8523)},9479:(t,e,r)=>{"use strict";var n=r(4475),i=r(3724),s=r(2106),o=r(7979),a=r(9039),u=n.RegExp,c=u.prototype;i&&a((function(){var t=!0;try{u(".","d")}catch(e){t=!1}var e={},r="",n=t?"dgimsy":"gimsy",i=function(t,n){Object.defineProperty(e,t,{get:function(){return r+=n,!0}})},s={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var o in t&&(s.hasIndices="d"),s)i(o,s[o]);return Object.getOwnPropertyDescriptor(c,"flags").get.call(e)!==n||r!==n}))&&s(c,"flags",{configurable:!0,get:o})},8845:(t,e,r)=>{"use strict";var n=r(4475),i=r(9565),s=r(4644),o=r(6198),a=r(8229),u=r(8981),c=r(9039),h=n.RangeError,l=n.Int8Array,f=l&&l.prototype,d=f&&f.set,p=s.aTypedArray,m=s.exportTypedArrayMethod,g=!c((function(){var t=new Uint8ClampedArray(2);return i(d,t,{length:1,0:3},1),3!==t[1]})),v=g&&s.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var t=new l(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));m("set",(function(t){p(this);var e=a(arguments.length>1?arguments[1]:void 0,1),r=u(t);if(g)return i(d,this,r,e);var n=this.length,s=o(r),c=0;if(s+e>n)throw new h("Wrong length");for(;c<s;)this[e+c]=r[c++]}),!g||v)},5746:(t,e,r)=>{"use strict";var n,i=r(2744),s=r(4475),o=r(9504),a=r(6279),u=r(3451),c=r(6468),h=r(4006),l=r(34),f=r(1181).enforce,d=r(9039),p=r(8622),m=Object,g=Array.isArray,v=m.isExtensible,y=m.isFrozen,b=m.isSealed,x=m.freeze,w=m.seal,_=!s.ActiveXObject&&"ActiveXObject"in s,I=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},A=c("WeakMap",I,h),O=A.prototype,S=o(O.set);if(p)if(_){n=h.getConstructor(I,"WeakMap",!0),u.enable();var P=o(O.delete),k=o(O.has),C=o(O.get);a(O,{delete:function(t){if(l(t)&&!v(t)){var e=f(this);return e.frozen||(e.frozen=new n),P(this,t)||e.frozen.delete(t)}return P(this,t)},has:function(t){if(l(t)&&!v(t)){var e=f(this);return e.frozen||(e.frozen=new n),k(this,t)||e.frozen.has(t)}return k(this,t)},get:function(t){if(l(t)&&!v(t)){var e=f(this);return e.frozen||(e.frozen=new n),k(this,t)?C(this,t):e.frozen.get(t)}return C(this,t)},set:function(t,e){if(l(t)&&!v(t)){var r=f(this);r.frozen||(r.frozen=new n),k(this,t)?S(this,t,e):r.frozen.set(t,e)}else S(this,t,e);return this}})}else i&&d((function(){var t=x([]);return S(new A,t,1),!y(t)}))&&a(O,{set:function(t,e){var r;return g(t)&&(y(t)?r=x:b(t)&&(r=w)),S(this,t,e),r&&r(t),this}})},3772:(t,e,r)=>{"use strict";r(5746)},7656:(t,e,r)=>{"use strict";var n=r(3724),i=r(6469),s=r(8981),o=r(6198),a=r(2106);n&&(a(Array.prototype,"lastIndex",{configurable:!0,get:function(){var t=s(this),e=o(t);return 0===e?0:e-1}}),i("lastIndex"))},5105:(t,e,r)=>{"use strict";var n=r(3724),i=r(6469),s=r(8981),o=r(6198),a=r(2106);n&&(a(Array.prototype,"lastItem",{configurable:!0,get:function(){var t=s(this),e=o(t);return 0===e?void 0:t[e-1]},set:function(t){var e=s(this),r=o(e);return e[0===r?0:r-1]=t}}),i("lastItem"))},7467:(t,e,r)=>{"use strict";var n=r(6518),i=r(8745),s=r(9323),o=r(7751),a=r(2360),u=Object,c=function(){var t=o("Object","freeze");return t?t(a(null)):a(null)};n({global:!0,forced:!0},{compositeKey:function(){return i(s,u,arguments).get("object",c)}})},586:(t,e,r)=>{"use strict";var n=r(6518),i=r(9323),s=r(7751),o=r(8745);n({global:!0,forced:!0},{compositeSymbol:function(){return 1===arguments.length&&"string"==typeof arguments[0]?s("Symbol").for(arguments[0]):o(i,null,arguments).get("symbol",s("Symbol"))}})},1517:(t,e,r)=>{"use strict";var n=r(6518),i=r(6194),s=r(2248).remove;n({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),r=!0,n=0,o=arguments.length;n<o;n++)t=s(e,arguments[n]),r=r&&t;return!!r}})},3777:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(6194),o=r(6223);n({target:"Map",proto:!0,real:!0,forced:!0},{every:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0);return!1!==o(e,(function(t,n){if(!r(t,n,e))return!1}),!0)}})},4190:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(6194),o=r(2248),a=r(6223),u=o.Map,c=o.set;n({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new u;return a(e,(function(t,i){r(t,i,e)&&c(n,i,t)})),n}})},6097:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(6194),o=r(6223);n({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=o(e,(function(t,n){if(r(t,n,e))return{key:n}}),!0);return n&&n.key}})},2359:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(6194),o=r(6223);n({target:"Map",proto:!0,real:!0,forced:!0},{find:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=o(e,(function(t,n){if(r(t,n,e))return{value:t}}),!0);return n&&n.value}})},9172:(t,e,r)=>{"use strict";var n=r(6518),i=r(2248);n({target:"Map",stat:!0,forced:!0},{from:r(933)(i.Map,i.set,!0)})},7019:(t,e,r)=>{"use strict";r(7072)},7273:(t,e,r)=>{"use strict";var n=r(6518),i=r(3317),s=r(6194),o=r(6223);n({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(t){return!0===o(s(this),(function(e){if(i(e,t))return!0}),!0)}})},1723:(t,e,r)=>{"use strict";var n=r(6518),i=r(9565),s=r(2652),o=r(4901),a=r(9306),u=r(2248).Map;n({target:"Map",stat:!0,forced:!0},{keyBy:function(t,e){var r=new(o(this)?this:u);a(e);var n=a(r.set);return s(t,(function(t){i(n,r,e(t),t)})),r}})},7415:(t,e,r)=>{"use strict";var n=r(6518),i=r(6194),s=r(6223);n({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(t){var e=s(i(this),(function(e,r){if(e===t)return{key:r}}),!0);return e&&e.key}})},9929:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(6194),o=r(2248),a=r(6223),u=o.Map,c=o.set;n({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new u;return a(e,(function(t,i){c(n,r(t,i,e),t)})),n}})},7583:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(6194),o=r(2248),a=r(6223),u=o.Map,c=o.set;n({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new u;return a(e,(function(t,i){c(n,i,r(t,i,e))})),n}})},5122:(t,e,r)=>{"use strict";var n=r(6518),i=r(6194),s=r(2652),o=r(2248).set;n({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(t){for(var e=i(this),r=arguments.length,n=0;n<r;)s(arguments[n++],(function(t,r){o(e,t,r)}),{AS_ENTRIES:!0});return e}})},6385:(t,e,r)=>{"use strict";var n=r(6518),i=r(2248);n({target:"Map",stat:!0,forced:!0},{of:r(7500)(i.Map,i.set,!0)})},230:(t,e,r)=>{"use strict";var n=r(6518),i=r(9306),s=r(6194),o=r(6223),a=TypeError;n({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=s(this),r=arguments.length<2,n=r?void 0:arguments[1];if(i(t),o(e,(function(i,s){r?(r=!1,n=i):n=t(n,i,s,e)})),r)throw new a("Reduce of empty map with no initial value");return n}})},7268:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(6194),o=r(6223);n({target:"Map",proto:!0,real:!0,forced:!0},{some:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0);return!0===o(e,(function(t,n){if(r(t,n,e))return!0}),!0)}})},9733:(t,e,r)=>{"use strict";var n=r(6518),i=r(9306),s=r(6194),o=r(2248),a=TypeError,u=o.get,c=o.has,h=o.set;n({target:"Map",proto:!0,real:!0,forced:!0},{update:function(t,e){var r=s(this),n=arguments.length;i(e);var o=c(r,t);if(!o&&n<3)throw new a("Updating absent value");var l=o?u(r,t):i(n>2?arguments[2]:void 0)(t,r);return h(r,t,e(l,t,r)),r}})},8179:(t,e,r)=>{"use strict";var n=r(6518),i=Math.min,s=Math.max;n({target:"Math",stat:!0,forced:!0},{clamp:function(t,e,r){return i(r,s(e,t))}})},456:(t,e,r)=>{"use strict";r(6518)({target:"Math",stat:!0,nonConfigurable:!0,nonWritable:!0},{DEG_PER_RAD:Math.PI/180})},4017:(t,e,r)=>{"use strict";var n=r(6518),i=180/Math.PI;n({target:"Math",stat:!0,forced:!0},{degrees:function(t){return t*i}})},9310:(t,e,r)=>{"use strict";var n=r(6518),i=r(7905),s=r(5617);n({target:"Math",stat:!0,forced:!0},{fscale:function(t,e,r,n,o){return s(i(t,e,r,n,o))}})},3062:(t,e,r)=>{"use strict";r(6518)({target:"Math",stat:!0,forced:!0},{iaddh:function(t,e,r,n){var i=t>>>0,s=r>>>0;return(e>>>0)+(n>>>0)+((i&s|(i|s)&~(i+s>>>0))>>>31)|0}})},6369:(t,e,r)=>{"use strict";r(6518)({target:"Math",stat:!0,forced:!0},{imulh:function(t,e){var r=65535,n=+t,i=+e,s=n&r,o=i&r,a=n>>16,u=i>>16,c=(a*o>>>0)+(s*o>>>16);return a*u+(c>>16)+((s*u>>>0)+(c&r)>>16)}})},5637:(t,e,r)=>{"use strict";r(6518)({target:"Math",stat:!0,forced:!0},{isubh:function(t,e,r,n){var i=t>>>0,s=r>>>0;return(e>>>0)-(n>>>0)-((~i&s|(i^~s)&i-s>>>0)>>>31)|0}})},2848:(t,e,r)=>{"use strict";r(6518)({target:"Math",stat:!0,nonConfigurable:!0,nonWritable:!0},{RAD_PER_DEG:180/Math.PI})},4842:(t,e,r)=>{"use strict";var n=r(6518),i=Math.PI/180;n({target:"Math",stat:!0,forced:!0},{radians:function(t){return t*i}})},4746:(t,e,r)=>{"use strict";r(6518)({target:"Math",stat:!0,forced:!0},{scale:r(7905)})},3454:(t,e,r)=>{"use strict";var n=r(6518),i=r(8551),s=r(360),o=r(3994),a=r(2529),u=r(1181),c="Seeded Random",h=c+" Generator",l=u.set,f=u.getterFor(h),d=TypeError,p=o((function(t){l(this,{type:h,seed:t%2147483647})}),c,(function(){var t=f(this),e=t.seed=(1103515245*t.seed+12345)%2147483647;return a((1073741823&e)/1073741823,!1)}));n({target:"Math",stat:!0,forced:!0},{seededPRNG:function(t){var e=i(t).seed;if(!s(e))throw new d('Math.seededPRNG() argument should have a "seed" field with a finite value.');return new p(e)}})},6660:(t,e,r)=>{"use strict";r(6518)({target:"Math",stat:!0,forced:!0},{signbit:function(t){var e=+t;return e==e&&0===e?1/e==-1/0:e<0}})},5941:(t,e,r)=>{"use strict";r(6518)({target:"Math",stat:!0,forced:!0},{umulh:function(t,e){var r=65535,n=+t,i=+e,s=n&r,o=i&r,a=n>>>16,u=i>>>16,c=(a*o>>>0)+(s*o>>>16);return a*u+(c>>>16)+((s*u>>>0)+(c&r)>>>16)}})},2101:(t,e,r)=>{"use strict";var n=r(6518),i=r(9504),s=r(1291),o="Invalid number representation",a=RangeError,u=SyntaxError,c=TypeError,h=parseInt,l=Math.pow,f=/^[\d.a-z]+$/,d=i("".charAt),p=i(f.exec),m=i(1..toString),g=i("".slice),v=i("".split);n({target:"Number",stat:!0,forced:!0},{fromString:function(t,e){var r=1;if("string"!=typeof t)throw new c(o);if(!t.length)throw new u(o);if("-"===d(t,0)&&(r=-1,!(t=g(t,1)).length))throw new u(o);var n=void 0===e?10:s(e);if(n<2||n>36)throw new a("Invalid radix");if(!p(f,t))throw new u(o);var i=v(t,"."),y=h(i[0],n);if(i.length>1&&(y+=h(i[1],n)/l(n,i[1].length)),10===n&&m(y,n)!==t)throw new u(o);return r*y}})},5239:(t,e,r)=>{"use strict";var n=r(6518),i=r(9565),s=r(3724),o=r(7633),a=r(9306),u=r(8551),c=r(679),h=r(4901),l=r(4117),f=r(34),d=r(5966),p=r(6840),m=r(6279),g=r(2106),v=r(3138),y=r(8227),b=r(1181),x=y("observable"),w="Observable",_="Subscription",I="SubscriptionObserver",A=b.getterFor,O=b.set,S=A(w),P=A(_),k=A(I),C=function(t){this.observer=u(t),this.cleanup=void 0,this.subscriptionObserver=void 0};C.prototype={type:_,clean:function(){var t=this.cleanup;if(t){this.cleanup=void 0;try{t()}catch(t){v(t)}}},close:function(){if(!s){var t=this.facade,e=this.subscriptionObserver;t.closed=!0,e&&(e.closed=!0)}this.observer=void 0},isClosed:function(){return void 0===this.observer}};var T=function(t,e){var r,n=O(this,new C(t));s||(this.closed=!1);try{(r=d(t,"start"))&&i(r,t,this)}catch(t){v(t)}if(!n.isClosed()){var o=n.subscriptionObserver=new M(n);try{var u=e(o),c=u;l(u)||(n.cleanup=h(u.unsubscribe)?function(){c.unsubscribe()}:a(u))}catch(t){return void o.error(t)}n.isClosed()&&n.clean()}};T.prototype=m({},{unsubscribe:function(){var t=P(this);t.isClosed()||(t.close(),t.clean())}}),s&&g(T.prototype,"closed",{configurable:!0,get:function(){return P(this).isClosed()}});var M=function(t){O(this,{type:I,subscriptionState:t}),s||(this.closed=!1)};M.prototype=m({},{next:function(t){var e=k(this).subscriptionState;if(!e.isClosed()){var r=e.observer;try{var n=d(r,"next");n&&i(n,r,t)}catch(t){v(t)}}},error:function(t){var e=k(this).subscriptionState;if(!e.isClosed()){var r=e.observer;e.close();try{var n=d(r,"error");n?i(n,r,t):v(t)}catch(t){v(t)}e.clean()}},complete:function(){var t=k(this).subscriptionState;if(!t.isClosed()){var e=t.observer;t.close();try{var r=d(e,"complete");r&&i(r,e)}catch(t){v(t)}t.clean()}}}),s&&g(M.prototype,"closed",{configurable:!0,get:function(){return k(this).subscriptionState.isClosed()}});var E=function(t){c(this,F),O(this,{type:w,subscriber:a(t)})},F=E.prototype;m(F,{subscribe:function(t){var e=arguments.length;return new T(h(t)?{next:t,error:e>1?arguments[1]:void 0,complete:e>2?arguments[2]:void 0}:f(t)?t:{},S(this).subscriber)}}),p(F,x,(function(){return this})),n({global:!0,constructor:!0,forced:!0},{Observable:E}),o(w)},9035:(t,e,r)=>{"use strict";var n=r(6518),i=r(7751),s=r(9565),o=r(8551),a=r(3517),u=r(81),c=r(5966),h=r(2652),l=r(8227)("observable");n({target:"Observable",stat:!0,forced:!0},{from:function(t){var e=a(this)?this:i("Observable"),r=c(o(t),l);if(r){var n=o(s(r,t));return n.constructor===e?n:new e((function(t){return n.subscribe(t)}))}var f=u(t);return new e((function(t){h(f,(function(e,r){if(t.next(e),t.closed)return r()}),{IS_ITERATOR:!0,INTERRUPTED:!0}),t.complete()}))}})},2917:(t,e,r)=>{"use strict";r(5239),r(9035),r(8662)},8662:(t,e,r)=>{"use strict";var n=r(6518),i=r(7751),s=r(3517),o=i("Array");n({target:"Observable",stat:!0,forced:!0},{of:function(){for(var t=s(this)?this:i("Observable"),e=arguments.length,r=o(e),n=0;n<e;)r[n]=arguments[n++];return new t((function(t){for(var n=0;n<e;n++)if(t.next(r[n]),t.closed)return;t.complete()}))}})},7628:(t,e,r)=>{"use strict";var n=r(6518),i=r(6043),s=r(1103);n({target:"Promise",stat:!0,forced:!0},{try:function(t){var e=i.f(this),r=s(t);return(r.error?e.reject:e.resolve)(r.value),e.promise}})},5186:(t,e,r)=>{"use strict";var n=r(6518),i=r(8449),s=r(8551),o=i.toKey,a=i.set;n({target:"Reflect",stat:!0},{defineMetadata:function(t,e,r){var n=arguments.length<4?void 0:o(arguments[3]);a(t,e,s(r),n)}})},2978:(t,e,r)=>{"use strict";var n=r(6518),i=r(8449),s=r(8551),o=i.toKey,a=i.getMap,u=i.store;n({target:"Reflect",stat:!0},{deleteMetadata:function(t,e){var r=arguments.length<3?void 0:o(arguments[2]),n=a(s(e),r,!1);if(void 0===n||!n.delete(t))return!1;if(n.size)return!0;var i=u.get(e);return i.delete(r),!!i.size||u.delete(e)}})},9852:(t,e,r)=>{"use strict";var n=r(6518),i=r(9504),s=r(8449),o=r(8551),a=r(2787),u=i(r(1946)),c=i([].concat),h=s.keys,l=s.toKey,f=function(t,e){var r=h(t,e),n=a(t);if(null===n)return r;var i=f(n,e);return i.length?r.length?u(c(r,i)):i:r};n({target:"Reflect",stat:!0},{getMetadataKeys:function(t){var e=arguments.length<2?void 0:l(arguments[1]);return f(o(t),e)}})},2527:(t,e,r)=>{"use strict";var n=r(6518),i=r(8449),s=r(8551),o=r(2787),a=i.has,u=i.get,c=i.toKey,h=function(t,e,r){if(a(t,e,r))return u(t,e,r);var n=o(e);return null!==n?h(t,n,r):void 0};n({target:"Reflect",stat:!0},{getMetadata:function(t,e){var r=arguments.length<3?void 0:c(arguments[2]);return h(t,s(e),r)}})},617:(t,e,r)=>{"use strict";var n=r(6518),i=r(8449),s=r(8551),o=i.keys,a=i.toKey;n({target:"Reflect",stat:!0},{getOwnMetadataKeys:function(t){var e=arguments.length<2?void 0:a(arguments[1]);return o(s(t),e)}})},2376:(t,e,r)=>{"use strict";var n=r(6518),i=r(8449),s=r(8551),o=i.get,a=i.toKey;n({target:"Reflect",stat:!0},{getOwnMetadata:function(t,e){var r=arguments.length<3?void 0:a(arguments[2]);return o(t,s(e),r)}})},3067:(t,e,r)=>{"use strict";var n=r(6518),i=r(8449),s=r(8551),o=r(2787),a=i.has,u=i.toKey,c=function(t,e,r){if(a(t,e,r))return!0;var n=o(e);return null!==n&&c(t,n,r)};n({target:"Reflect",stat:!0},{hasMetadata:function(t,e){var r=arguments.length<3?void 0:u(arguments[2]);return c(t,s(e),r)}})},6820:(t,e,r)=>{"use strict";var n=r(6518),i=r(8449),s=r(8551),o=i.has,a=i.toKey;n({target:"Reflect",stat:!0},{hasOwnMetadata:function(t,e){var r=arguments.length<3?void 0:a(arguments[2]);return o(t,s(e),r)}})},8288:(t,e,r)=>{"use strict";var n=r(6518),i=r(8449),s=r(8551),o=i.toKey,a=i.set;n({target:"Reflect",stat:!0},{metadata:function(t,e){return function(r,n){a(t,e,s(r),o(n))}}})},5509:(t,e,r)=>{"use strict";var n=r(6518),i=r(7080),s=r(4402).add;n({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var t=i(this),e=0,r=arguments.length;e<r;e++)s(t,arguments[e]);return t}})},5223:(t,e,r)=>{"use strict";var n=r(6518),i=r(7080),s=r(4402).remove;n({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),r=!0,n=0,o=arguments.length;n<o;n++)t=s(e,arguments[n]),r=r&&t;return!!r}})},321:(t,e,r)=>{"use strict";var n=r(6518),i=r(9565),s=r(7650),o=r(3440);n({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(t){return i(o,this,s(t))}})},1927:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(7080),o=r(8469);n({target:"Set",proto:!0,real:!0,forced:!0},{every:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0);return!1!==o(e,(function(t){if(!r(t,t,e))return!1}),!0)}})},1632:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(7080),o=r(4402),a=r(8469),u=o.Set,c=o.add;n({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new u;return a(e,(function(t){r(t,t,e)&&c(n,t)})),n}})},4377:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(7080),o=r(8469);n({target:"Set",proto:!0,real:!0,forced:!0},{find:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=o(e,(function(t){if(r(t,t,e))return{value:t}}),!0);return n&&n.value}})},9522:(t,e,r)=>{"use strict";var n=r(6518),i=r(4402);n({target:"Set",stat:!0,forced:!0},{from:r(933)(i.Set,i.add,!1)})},6771:(t,e,r)=>{"use strict";var n=r(6518),i=r(9565),s=r(7650),o=r(8750);n({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(t){return i(o,this,s(t))}})},2516:(t,e,r)=>{"use strict";var n=r(6518),i=r(9565),s=r(7650),o=r(4449);n({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(t){return i(o,this,s(t))}})},8931:(t,e,r)=>{"use strict";var n=r(6518),i=r(9565),s=r(7650),o=r(3838);n({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(t){return i(o,this,s(t))}})},2514:(t,e,r)=>{"use strict";var n=r(6518),i=r(9565),s=r(7650),o=r(8527);n({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(t){return i(o,this,s(t))}})},5694:(t,e,r)=>{"use strict";var n=r(6518),i=r(9504),s=r(7080),o=r(8469),a=r(655),u=i([].join),c=i([].push);n({target:"Set",proto:!0,real:!0,forced:!0},{join:function(t){var e=s(this),r=void 0===t?",":a(t),n=[];return o(e,(function(t){c(n,t)})),u(n,r)}})},2774:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(7080),o=r(4402),a=r(8469),u=o.Set,c=o.add;n({target:"Set",proto:!0,real:!0,forced:!0},{map:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0),n=new u;return a(e,(function(t){c(n,r(t,t,e))})),n}})},3283:(t,e,r)=>{"use strict";var n=r(6518),i=r(4402);n({target:"Set",stat:!0,forced:!0},{of:r(7500)(i.Set,i.add,!1)})},9536:(t,e,r)=>{"use strict";var n=r(6518),i=r(9306),s=r(7080),o=r(8469),a=TypeError;n({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=s(this),r=arguments.length<2,n=r?void 0:arguments[1];if(i(t),o(e,(function(i){r?(r=!1,n=i):n=t(n,i,i,e)})),r)throw new a("Reduce of empty set with no initial value");return n}})},1926:(t,e,r)=>{"use strict";var n=r(6518),i=r(6080),s=r(7080),o=r(8469);n({target:"Set",proto:!0,real:!0,forced:!0},{some:function(t){var e=s(this),r=i(t,arguments.length>1?arguments[1]:void 0);return!0===o(e,(function(t){if(r(t,t,e))return!0}),!0)}})},4483:(t,e,r)=>{"use strict";var n=r(6518),i=r(9565),s=r(7650),o=r(3650);n({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(t){return i(o,this,s(t))}})},6215:(t,e,r)=>{"use strict";var n=r(6518),i=r(9565),s=r(7650),o=r(4204);n({target:"Set",proto:!0,real:!0,forced:!0},{union:function(t){return i(o,this,s(t))}})},8898:(t,e,r)=>{"use strict";var n=r(6518),i=r(8183).charAt,s=r(7750),o=r(1291),a=r(655);n({target:"String",proto:!0,forced:!0},{at:function(t){var e=a(s(this)),r=e.length,n=o(t),u=n>=0?n:r+n;return u<0||u>=r?void 0:i(e,u)}})},4176:(t,e,r)=>{"use strict";var n=r(6518),i=r(3994),s=r(2529),o=r(7750),a=r(655),u=r(1181),c=r(8183),h=c.codeAt,l=c.charAt,f="String Iterator",d=u.set,p=u.getterFor(f),m=i((function(t){d(this,{type:f,string:t,index:0})}),"String",(function(){var t,e=p(this),r=e.string,n=e.index;return n>=r.length?s(void 0,!0):(t=l(r,n),e.index+=t.length,s({codePoint:h(t,0),position:n},!1))}));n({target:"String",proto:!0,forced:!0},{codePoints:function(){return new m(a(o(this)))}})},3275:(t,e,r)=>{"use strict";var n=r(4475),i=r(511),s=r(4913).f,o=r(7347).f,a=n.Symbol;if(i("dispose"),a){var u=o(a,"dispose");u.enumerable&&u.configurable&&u.writable&&s(a,"dispose",{value:u.value,enumerable:!1,configurable:!1,writable:!1})}},2793:(t,e,r)=>{"use strict";r(511)("observable")},7208:(t,e,r)=>{"use strict";r(511)("patternMatch")},7348:(t,e,r)=>{"use strict";var n=r(6518),i=r(6557),s=r(4995).remove;n({target:"WeakMap",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),r=!0,n=0,o=arguments.length;n<o;n++)t=s(e,arguments[n]),r=r&&t;return!!r}})},6957:(t,e,r)=>{"use strict";var n=r(6518),i=r(4995);n({target:"WeakMap",stat:!0,forced:!0},{from:r(933)(i.WeakMap,i.set,!0)})},9732:(t,e,r)=>{"use strict";var n=r(6518),i=r(4995);n({target:"WeakMap",stat:!0,forced:!0},{of:r(7500)(i.WeakMap,i.set,!0)})},3742:(t,e,r)=>{"use strict";var n=r(6518),i=r(3755),s=r(8205).add;n({target:"WeakSet",proto:!0,real:!0,forced:!0},{addAll:function(){for(var t=i(this),e=0,r=arguments.length;e<r;e++)s(t,arguments[e]);return t}})},6422:(t,e,r)=>{"use strict";var n=r(6518),i=r(3755),s=r(8205).remove;n({target:"WeakSet",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),r=!0,n=0,o=arguments.length;n<o;n++)t=s(e,arguments[n]),r=r&&t;return!!r}})},2451:(t,e,r)=>{"use strict";var n=r(6518),i=r(8205);n({target:"WeakSet",stat:!0,forced:!0},{from:r(933)(i.WeakSet,i.add,!1)})},6270:(t,e,r)=>{"use strict";var n=r(6518),i=r(8205);n({target:"WeakSet",stat:!0,forced:!0},{of:r(7500)(i.WeakSet,i.add,!1)})},6368:(t,e,r)=>{"use strict";var n=r(6518),i=r(4475),s=r(9225).clear;n({global:!0,bind:!0,enumerable:!0,forced:i.clearImmediate!==s},{clearImmediate:s})},9848:(t,e,r)=>{"use strict";r(6368),r(9309)},9309:(t,e,r)=>{"use strict";var n=r(6518),i=r(4475),s=r(9225).set,o=r(9472),a=i.setImmediate?o(s,!1):s;n({global:!0,bind:!0,enumerable:!0,forced:i.setImmediate!==a},{setImmediate:a})}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var s=e[n]={exports:{}};return t[n].call(s.exports,s,s.exports,r),s.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{OPFSCache:()=>s.x});var t=r(1136),e=r(577);let i=new class{constructor(){this._workers={}}dispatch(r){if(Object.prototype.hasOwnProperty.call(r,"operation")){r.endpoint&&e.sR.setEndpointAndApi(r.endpoint,r.api);var n=this._workers[r.operation];if(n){if(r.basePath="",r.url){var i=r.url.lastIndexOf("/");-1!=i&&(r.basePath=r.url.substr(0,i+1))}r.raiseError=function(){r.worker.raiseError.apply(r.worker,arguments)},r.onFailureCallback=t.PG.defaultFailureCallback.bind(r),n.doOperation(r)}}}register(t,e){this._workers[t]=e}unregister(t){delete this._workers[t]}};r(3870).k(i),r(574).k(i),r(8262).k(i),r(5499).k(i),r(3484).k(i),r(2637).k(i),r(8401).k(i),r(6324).k(i),r(1711).k(i),r(7676).k(i),i.register("REGISTER_FILE_PORT",{doOperation:function(e){if(e&&e.protocolPortMap)for(var r in e.protocolPortMap)t.PG.registerProtocolPort(r,e.protocolPortMap[r])}});var s=r(8914);self.addEventListener("message",(function(t){var e=t.data;e.worker=self,i.dispatch(e)}),!1),self.raiseError=function(t,e,r){self.postMessage({error:{code:t,msg:e,args:r}})},self.debug=function(t){self.postMessage({debug:1,message:t})}})(),LMV=n})();
|
|
//# sourceMappingURL=lmvworker.min.js.map
|