@vertexvis/viewer 1.0.0-testing.2 → 1.0.0-testing.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{config-CBFIZ5gy.js → config-C1xbl3Qa.js} +3 -3
- package/dist/cjs/{config-CBFIZ5gy.js.map → config-C1xbl3Qa.js.map} +1 -1
- package/dist/cjs/{entities-CAphDi6v.js → entities-D6AUMclh.js} +4 -4
- package/dist/cjs/{entities-CAphDi6v.js.map → entities-D6AUMclh.js.map} +1 -1
- package/dist/cjs/{geometry_pb-DW53co_-.js → geometry_pb-Ctp-Gcjm.js} +3 -3
- package/dist/cjs/{geometry_pb-DW53co_-.js.map → geometry_pb-Ctp-Gcjm.js.map} +1 -1
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/{queries-uJfbbPWV.js → queries-CZmukyhu.js} +4 -4
- package/dist/cjs/{queries-uJfbbPWV.js.map → queries-CZmukyhu.js.map} +1 -1
- package/dist/cjs/{regl-component-CF41rUUv.js → regl-component-DOa8eHGy.js} +3 -3
- package/dist/cjs/{regl-component-CF41rUUv.js.map → regl-component-DOa8eHGy.js.map} +1 -1
- package/dist/cjs/{representation_pb-u7t5FI12.js → representation_pb-BrMsFavQ.js} +3 -3
- package/dist/cjs/{representation_pb-u7t5FI12.js.map → representation_pb-BrMsFavQ.js.map} +1 -1
- package/dist/cjs/{streamAttributes-BX291dI6.js → streamAttributes-DQm8yx7F.js} +6 -4
- package/dist/cjs/streamAttributes-DQm8yx7F.js.map +1 -0
- package/dist/cjs/vertex-scene-tree-table-cell.cjs.entry.js +1 -1
- package/dist/cjs/vertex-scene-tree.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-dom-element_2.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-hit-result-indicator.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-measurement-details.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-measurement-distance.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-measurement-line_2.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-measurement-precise.cjs.entry.js +4 -4
- package/dist/cjs/vertex-viewer-pin-group.cjs.entry.js +3 -3
- package/dist/cjs/vertex-viewer-transform-widget.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-view-cube.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer.cjs.entry.js +27 -7
- package/dist/cjs/vertex-viewer.cjs.entry.js.map +1 -1
- package/dist/collection/lib/meters.js +15 -1
- package/dist/collection/lib/meters.js.map +1 -1
- package/dist/collection/lib/storage.js +8 -2
- package/dist/collection/lib/storage.js.map +1 -1
- package/dist/collection/workers/png-decoder-pool.js +4 -2
- package/dist/collection/workers/png-decoder-pool.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-BhgrvpJL.js → p-BLSuslo8.js} +2 -2
- package/dist/components/{p-D7rQku5u.js → p-Bmj32MLp.js} +2 -2
- package/dist/components/{p-MYlndA6B.js → p-Bo49wgwt.js} +2 -2
- package/dist/components/{p-BjcO9U8D.js → p-BvOB1WAv.js} +2 -2
- package/dist/components/{p-DSeOWYJ_.js → p-BygjJ1WP.js} +2 -2
- package/dist/components/{p-CJuOe1O1.js → p-CGpWfqFr.js} +2 -2
- package/dist/components/{p-uwvTj3Cw.js → p-CHQ7ZKZd.js} +2 -2
- package/dist/components/{p-Lx4iaHhY.js → p-CYhNWr6k.js} +2 -2
- package/dist/components/{p-JSB7V_jW.js → p-DLV-gg65.js} +2 -2
- package/dist/components/{p-JSB7V_jW.js.map → p-DLV-gg65.js.map} +1 -1
- package/dist/components/{p-DyPaZtSF.js → p-gFMW2KYT.js} +2 -2
- package/dist/components/vertex-scene-tree-table-cell.js +1 -1
- package/dist/components/vertex-scene-tree.js +1 -1
- package/dist/components/vertex-viewer-dom-renderer.js +1 -1
- package/dist/components/vertex-viewer-hit-result-indicator.js +1 -1
- package/dist/components/vertex-viewer-measurement-details.js +1 -1
- package/dist/components/vertex-viewer-measurement-distance.js +1 -1
- package/dist/components/vertex-viewer-measurement-overlays.js +1 -1
- package/dist/components/vertex-viewer-measurement-precise.js +1 -1
- package/dist/components/vertex-viewer-measurement-precise.js.map +1 -1
- package/dist/components/vertex-viewer-pin-group.js +1 -1
- package/dist/components/vertex-viewer-pin-tool.js +1 -1
- package/dist/components/vertex-viewer-transform-widget.js +1 -1
- package/dist/components/vertex-viewer-transform-widget.js.map +1 -1
- package/dist/components/vertex-viewer-view-cube.js +1 -1
- package/dist/components/vertex-viewer.js +1 -1
- package/dist/components/vertex-viewer.js.map +1 -1
- package/dist/esm/{config-_vT0BdS-.js → config-BrYuY-7v.js} +3 -3
- package/dist/esm/{config-_vT0BdS-.js.map → config-BrYuY-7v.js.map} +1 -1
- package/dist/esm/{entities-8QCEsVRy.js → entities-DxpPFj9w.js} +4 -4
- package/dist/esm/{entities-8QCEsVRy.js.map → entities-DxpPFj9w.js.map} +1 -1
- package/dist/esm/{geometry_pb-Dj0yGTFi.js → geometry_pb-BLGp5Nq8.js} +3 -3
- package/dist/esm/{geometry_pb-Dj0yGTFi.js.map → geometry_pb-BLGp5Nq8.js.map} +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.mjs +5 -5
- package/dist/esm/{queries-W4aeN1vv.js → queries-Coo1RH5H.js} +4 -4
- package/dist/esm/{queries-W4aeN1vv.js.map → queries-Coo1RH5H.js.map} +1 -1
- package/dist/esm/{regl-component-Rio5LpoO.js → regl-component-B30675op.js} +3 -3
- package/dist/esm/{regl-component-Rio5LpoO.js.map → regl-component-B30675op.js.map} +1 -1
- package/dist/esm/{representation_pb-CCDsiQtg.js → representation_pb-DYkJtHQo.js} +3 -3
- package/dist/esm/{representation_pb-CCDsiQtg.js.map → representation_pb-DYkJtHQo.js.map} +1 -1
- package/dist/esm/{streamAttributes-DhQVsxJf.js → streamAttributes-Cfp9UX5m.js} +6 -4
- package/dist/esm/streamAttributes-Cfp9UX5m.js.map +1 -0
- package/dist/esm/vertex-scene-tree-table-cell.entry.js +1 -1
- package/dist/esm/vertex-scene-tree.entry.js +2 -2
- package/dist/esm/vertex-viewer-dom-element_2.entry.js +1 -1
- package/dist/esm/vertex-viewer-hit-result-indicator.entry.js +2 -2
- package/dist/esm/vertex-viewer-measurement-details.entry.js +1 -1
- package/dist/esm/vertex-viewer-measurement-distance.entry.js +2 -2
- package/dist/esm/vertex-viewer-measurement-line_2.entry.js +2 -2
- package/dist/esm/vertex-viewer-measurement-precise.entry.js +4 -4
- package/dist/esm/vertex-viewer-pin-group.entry.js +3 -3
- package/dist/esm/vertex-viewer-transform-widget.entry.js +2 -2
- package/dist/esm/vertex-viewer-view-cube.entry.js +1 -1
- package/dist/esm/vertex-viewer.entry.js +27 -7
- package/dist/esm/vertex-viewer.entry.js.map +1 -1
- package/dist/viewer/index.esm.js +1 -1
- package/dist/viewer/{p-baec8489.entry.js → p-0287e1ba.entry.js} +2 -2
- package/dist/viewer/{p-2bd6cd13.entry.js → p-380e0112.entry.js} +2 -2
- package/dist/viewer/{p-101825c2.entry.js → p-40d90c6e.entry.js} +2 -2
- package/dist/viewer/{p-317da1b6.entry.js → p-6a546084.entry.js} +2 -2
- package/dist/viewer/p-7189eb18.entry.js +5 -0
- package/dist/viewer/p-7189eb18.entry.js.map +1 -0
- package/dist/viewer/{p-807aa9d0.entry.js → p-72fa9fba.entry.js} +2 -2
- package/dist/viewer/{p-0bf39fff.entry.js → p-81391d86.entry.js} +2 -2
- package/dist/viewer/{p-5VxzXVFc.js → p-B7mOY-Vi.js} +2 -2
- package/dist/viewer/{p-5VxzXVFc.js.map → p-B7mOY-Vi.js.map} +1 -1
- package/dist/viewer/{p-B9AGwrOP.js → p-CVRW2Plt.js} +2 -2
- package/dist/viewer/{p-B9AGwrOP.js.map → p-CVRW2Plt.js.map} +1 -1
- package/dist/viewer/{p-C0bm56qJ.js → p-CrcoZmKt.js} +2 -2
- package/dist/viewer/p-CrcoZmKt.js.map +1 -0
- package/dist/viewer/{p-BNiP3SE7.js → p-DKKHW33X.js} +2 -2
- package/dist/viewer/{p-BNiP3SE7.js.map → p-DKKHW33X.js.map} +1 -1
- package/dist/viewer/p-F9YPK1I7.js +5 -0
- package/dist/viewer/{p-DOMCeSTr.js.map → p-F9YPK1I7.js.map} +1 -1
- package/dist/viewer/p-Nk8SgPHE.js +5 -0
- package/dist/viewer/{p-CrwKMz5f.js.map → p-Nk8SgPHE.js.map} +1 -1
- package/dist/viewer/{p-BoFi-Uyu.js → p-_19YlCN5.js} +2 -2
- package/dist/viewer/{p-BoFi-Uyu.js.map → p-_19YlCN5.js.map} +1 -1
- package/dist/viewer/{p-dd2f92e3.entry.js → p-c7eb05ec.entry.js} +2 -2
- package/dist/viewer/{p-fade0dba.entry.js → p-c9d71f1e.entry.js} +2 -2
- package/dist/viewer/{p-49b9bba2.entry.js → p-d50b2449.entry.js} +2 -2
- package/dist/viewer/{p-0fa89933.entry.js → p-e80260d3.entry.js} +2 -2
- package/dist/viewer/{p-71c08a04.entry.js → p-fc082185.entry.js} +2 -2
- package/dist/viewer/viewer.esm.js +1 -1
- package/package.json +8 -7
- package/dist/cjs/streamAttributes-BX291dI6.js.map +0 -1
- package/dist/esm/streamAttributes-DhQVsxJf.js.map +0 -1
- package/dist/viewer/p-C0bm56qJ.js.map +0 -1
- package/dist/viewer/p-CrwKMz5f.js +0 -5
- package/dist/viewer/p-DOMCeSTr.js +0 -5
- package/dist/viewer/p-ea736bd1.entry.js +0 -5
- package/dist/viewer/p-ea736bd1.entry.js.map +0 -1
- /package/dist/components/{p-BhgrvpJL.js.map → p-BLSuslo8.js.map} +0 -0
- /package/dist/components/{p-D7rQku5u.js.map → p-Bmj32MLp.js.map} +0 -0
- /package/dist/components/{p-MYlndA6B.js.map → p-Bo49wgwt.js.map} +0 -0
- /package/dist/components/{p-BjcO9U8D.js.map → p-BvOB1WAv.js.map} +0 -0
- /package/dist/components/{p-DSeOWYJ_.js.map → p-BygjJ1WP.js.map} +0 -0
- /package/dist/components/{p-CJuOe1O1.js.map → p-CGpWfqFr.js.map} +0 -0
- /package/dist/components/{p-uwvTj3Cw.js.map → p-CHQ7ZKZd.js.map} +0 -0
- /package/dist/components/{p-Lx4iaHhY.js.map → p-CYhNWr6k.js.map} +0 -0
- /package/dist/components/{p-DyPaZtSF.js.map → p-gFMW2KYT.js.map} +0 -0
- /package/dist/viewer/{p-baec8489.entry.js.map → p-0287e1ba.entry.js.map} +0 -0
- /package/dist/viewer/{p-2bd6cd13.entry.js.map → p-380e0112.entry.js.map} +0 -0
- /package/dist/viewer/{p-101825c2.entry.js.map → p-40d90c6e.entry.js.map} +0 -0
- /package/dist/viewer/{p-317da1b6.entry.js.map → p-6a546084.entry.js.map} +0 -0
- /package/dist/viewer/{p-807aa9d0.entry.js.map → p-72fa9fba.entry.js.map} +0 -0
- /package/dist/viewer/{p-0bf39fff.entry.js.map → p-81391d86.entry.js.map} +0 -0
- /package/dist/viewer/{p-dd2f92e3.entry.js.map → p-c7eb05ec.entry.js.map} +0 -0
- /package/dist/viewer/{p-fade0dba.entry.js.map → p-c9d71f1e.entry.js.map} +0 -0
- /package/dist/viewer/{p-49b9bba2.entry.js.map → p-d50b2449.entry.js.map} +0 -0
- /package/dist/viewer/{p-0fa89933.entry.js.map → p-e80260d3.entry.js.map} +0 -0
- /package/dist/viewer/{p-71c08a04.entry.js.map → p-fc082185.entry.js.map} +0 -0
|
@@ -20,5 +20,5 @@ import{a as t,v as e,f as n,p as r,r as i,g as s,l as o,b as a,m as u,e as c,c a
|
|
|
20
20
|
* limitations under the License.
|
|
21
21
|
*
|
|
22
22
|
* SPDX-License-Identifier: Apache-2.0
|
|
23
|
-
*/var S=null;try{S=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function B(t,e,n){this.low=t|0;this.high=e|0;this.unsigned=!!n}Object.defineProperty(B.prototype,"__isLong__",{value:true});function C(t){return(t&&t["__isLong__"])===true}function A(t){var e=Math.clz32(t&-t);return t?31-e:e}B.isLong=C;var V={};var j={};function D(t,e){var n,r,i;if(e){t>>>=0;if(i=0<=t&&t<256){r=j[t];if(r)return r}n=k(t,0,true);if(i)j[t]=n;return n}else{t|=0;if(i=-128<=t&&t<128){r=V[t];if(r)return r}n=k(t,t<0?-1:0,false);if(i)V[t]=n;return n}}B.fromInt=D;function P(t,e){if(isNaN(t))return e?G:L;if(e){if(t<0)return G;if(t>=F)return J}else{if(t<=-q)return Q;if(t+1>=q)return K}if(t<0)return P(-t,e).neg();return k(t%z|0,t/z|0,e)}B.fromNumber=P;function k(t,e,n){return new B(t,e,n)}B.fromBits=k;var T=Math.pow;function E(t,e,n){if(t.length===0)throw Error("empty string");if(typeof e==="number"){n=e;e=false}else{e=!!e}if(t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return e?G:L;n=n||10;if(n<2||36<n)throw RangeError("radix");var r;if((r=t.indexOf("-"))>0)throw Error("interior hyphen");else if(r===0){return E(t.substring(1),e,n).neg()}var i=P(T(n,8));var s=L;for(var o=0;o<t.length;o+=8){var a=Math.min(8,t.length-o),u=parseInt(t.substring(o,o+a),n);if(a<8){var c=P(T(n,a));s=s.mul(c).add(P(u))}else{s=s.mul(i);s=s.add(P(u))}}s.unsigned=e;return s}B.fromString=E;function O(t,e){if(typeof t==="number")return P(t,e);if(typeof t==="string")return E(t,e);return k(t.low,t.high,typeof e==="boolean"?e:t.unsigned)}B.fromValue=O;var R=1<<16;var W=1<<24;var z=R*R;var F=z*z;var q=F/2;var H=D(W);var L=D(0);B.ZERO=L;var G=D(0,true);B.UZERO=G;var U=D(1);B.ONE=U;var Y=D(1,true);B.UONE=Y;var _=D(-1);B.NEG_ONE=_;var K=k(4294967295|0,2147483647|0,false);B.MAX_VALUE=K;var J=k(4294967295|0,4294967295|0,true);B.MAX_UNSIGNED_VALUE=J;var Q=k(0,2147483648|0,false);B.MIN_VALUE=Q;var X=B.prototype;X.toInt=function t(){return this.unsigned?this.low>>>0:this.low};X.toNumber=function t(){if(this.unsigned)return(this.high>>>0)*z+(this.low>>>0);return this.high*z+(this.low>>>0)};X.toString=function t(e){e=e||10;if(e<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(Q)){var n=P(e),r=this.div(n),i=r.mul(n).sub(this);return r.toString(e)+i.toInt().toString(e)}else return"-"+this.neg().toString(e)}var s=P(T(e,6),this.unsigned),o=this;var a="";while(true){var u=o.div(s),c=o.sub(u.mul(s)).toInt()>>>0,h=c.toString(e);o=u;if(o.isZero())return h+a;else{while(h.length<6)h="0"+h;a=""+h+a}}};X.getHighBits=function t(){return this.high};X.getHighBitsUnsigned=function t(){return this.high>>>0};X.getLowBits=function t(){return this.low};X.getLowBitsUnsigned=function t(){return this.low>>>0};X.getNumBitsAbs=function t(){if(this.isNegative())return this.eq(Q)?64:this.neg().getNumBitsAbs();var e=this.high!=0?this.high:this.low;for(var n=31;n>0;n--)if((e&1<<n)!=0)break;return this.high!=0?n+33:n+1};X.isSafeInteger=function t(){var e=this.high>>21;if(!e)return true;if(this.unsigned)return false;return e===-1&&!(this.low===0&&this.high===-2097152)};X.isZero=function t(){return this.high===0&&this.low===0};X.eqz=X.isZero;X.isNegative=function t(){return!this.unsigned&&this.high<0};X.isPositive=function t(){return this.unsigned||this.high>=0};X.isOdd=function t(){return(this.low&1)===1};X.isEven=function t(){return(this.low&1)===0};X.equals=function t(e){if(!C(e))e=O(e);if(this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1)return false;return this.high===e.high&&this.low===e.low};X.eq=X.equals;X.notEquals=function t(e){return!this.eq(e)};X.neq=X.notEquals;X.ne=X.notEquals;X.lessThan=function t(e){return this.comp(e)<0};X.lt=X.lessThan;X.lessThanOrEqual=function t(e){return this.comp(e)<=0};X.lte=X.lessThanOrEqual;X.le=X.lessThanOrEqual;X.greaterThan=function t(e){return this.comp(e)>0};X.gt=X.greaterThan;X.greaterThanOrEqual=function t(e){return this.comp(e)>=0};X.gte=X.greaterThanOrEqual;X.ge=X.greaterThanOrEqual;X.compare=function t(e){if(!C(e))e=O(e);if(this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();if(n&&!r)return-1;if(!n&&r)return 1;if(!this.unsigned)return this.sub(e).isNegative()?-1:1;return e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1};X.comp=X.compare;X.negate=function t(){if(!this.unsigned&&this.eq(Q))return Q;return this.not().add(U)};X.neg=X.negate;X.add=function t(e){if(!C(e))e=O(e);var n=this.high>>>16;var r=this.high&65535;var i=this.low>>>16;var s=this.low&65535;var o=e.high>>>16;var a=e.high&65535;var u=e.low>>>16;var c=e.low&65535;var h=0,f=0,l=0,v=0;v+=s+c;l+=v>>>16;v&=65535;l+=i+u;f+=l>>>16;l&=65535;f+=r+a;h+=f>>>16;f&=65535;h+=n+o;h&=65535;return k(l<<16|v,h<<16|f,this.unsigned)};X.subtract=function t(e){if(!C(e))e=O(e);return this.add(e.neg())};X.sub=X.subtract;X.multiply=function t(e){if(this.isZero())return this;if(!C(e))e=O(e);if(S){var n=S["mul"](this.low,this.high,e.low,e.high);return k(n,S["get_high"](),this.unsigned)}if(e.isZero())return this.unsigned?G:L;if(this.eq(Q))return e.isOdd()?Q:L;if(e.eq(Q))return this.isOdd()?Q:L;if(this.isNegative()){if(e.isNegative())return this.neg().mul(e.neg());else return this.neg().mul(e).neg()}else if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(H)&&e.lt(H))return P(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16;var i=this.high&65535;var s=this.low>>>16;var o=this.low&65535;var a=e.high>>>16;var u=e.high&65535;var c=e.low>>>16;var h=e.low&65535;var f=0,l=0,v=0,d=0;d+=o*h;v+=d>>>16;d&=65535;v+=s*h;l+=v>>>16;v&=65535;v+=o*c;l+=v>>>16;v&=65535;l+=i*h;f+=l>>>16;l&=65535;l+=s*c;f+=l>>>16;l&=65535;l+=o*u;f+=l>>>16;l&=65535;f+=r*h+i*c+s*u+o*a;f&=65535;return k(v<<16|d,f<<16|l,this.unsigned)};X.mul=X.multiply;X.divide=function t(e){if(!C(e))e=O(e);if(e.isZero())throw Error("division by zero");if(S){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1){return this}var n=(this.unsigned?S["div_u"]:S["div_s"])(this.low,this.high,e.low,e.high);return k(n,S["get_high"](),this.unsigned)}if(this.isZero())return this.unsigned?G:L;var r,i,s;if(!this.unsigned){if(this.eq(Q)){if(e.eq(U)||e.eq(_))return Q;else if(e.eq(Q))return U;else{var o=this.shr(1);r=o.div(e).shl(1);if(r.eq(L)){return e.isNegative()?U:_}else{i=this.sub(e.mul(r));s=r.add(i.div(e));return s}}}else if(e.eq(Q))return this.unsigned?G:L;if(this.isNegative()){if(e.isNegative())return this.neg().div(e.neg());return this.neg().div(e).neg()}else if(e.isNegative())return this.div(e.neg()).neg();s=L}else{if(!e.unsigned)e=e.toUnsigned();if(e.gt(this))return G;if(e.gt(this.shru(1)))return Y;s=G}i=this;while(i.gte(e)){r=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));var a=Math.ceil(Math.log(r)/Math.LN2),u=a<=48?1:T(2,a-48),c=P(r),h=c.mul(e);while(h.isNegative()||h.gt(i)){r-=u;c=P(r,this.unsigned);h=c.mul(e)}if(c.isZero())c=U;s=s.add(c);i=i.sub(h)}return s};X.div=X.divide;X.modulo=function t(e){if(!C(e))e=O(e);if(S){var n=(this.unsigned?S["rem_u"]:S["rem_s"])(this.low,this.high,e.low,e.high);return k(n,S["get_high"](),this.unsigned)}return this.sub(this.div(e).mul(e))};X.mod=X.modulo;X.rem=X.modulo;X.not=function t(){return k(~this.low,~this.high,this.unsigned)};X.countLeadingZeros=function t(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};X.clz=X.countLeadingZeros;X.countTrailingZeros=function t(){return this.low?A(this.low):A(this.high)+32};X.ctz=X.countTrailingZeros;X.and=function t(e){if(!C(e))e=O(e);return k(this.low&e.low,this.high&e.high,this.unsigned)};X.or=function t(e){if(!C(e))e=O(e);return k(this.low|e.low,this.high|e.high,this.unsigned)};X.xor=function t(e){if(!C(e))e=O(e);return k(this.low^e.low,this.high^e.high,this.unsigned)};X.shiftLeft=function t(e){if(C(e))e=e.toInt();if((e&=63)===0)return this;else if(e<32)return k(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned);else return k(0,this.low<<e-32,this.unsigned)};X.shl=X.shiftLeft;X.shiftRight=function t(e){if(C(e))e=e.toInt();if((e&=63)===0)return this;else if(e<32)return k(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned);else return k(this.high>>e-32,this.high>=0?0:-1,this.unsigned)};X.shr=X.shiftRight;X.shiftRightUnsigned=function t(e){if(C(e))e=e.toInt();if((e&=63)===0)return this;if(e<32)return k(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned);if(e===32)return k(this.high,0,this.unsigned);return k(this.high>>>e-32,0,this.unsigned)};X.shru=X.shiftRightUnsigned;X.shr_u=X.shiftRightUnsigned;X.rotateLeft=function t(e){var n;if(C(e))e=e.toInt();if((e&=63)===0)return this;if(e===32)return k(this.high,this.low,this.unsigned);if(e<32){n=32-e;return k(this.low<<e|this.high>>>n,this.high<<e|this.low>>>n,this.unsigned)}e-=32;n=32-e;return k(this.high<<e|this.low>>>n,this.low<<e|this.high>>>n,this.unsigned)};X.rotl=X.rotateLeft;X.rotateRight=function t(e){var n;if(C(e))e=e.toInt();if((e&=63)===0)return this;if(e===32)return k(this.high,this.low,this.unsigned);if(e<32){n=32-e;return k(this.high<<n|this.low>>>e,this.low<<n|this.high>>>e,this.unsigned)}e-=32;n=32-e;return k(this.low<<n|this.high>>>e,this.high<<n|this.low>>>e,this.unsigned)};X.rotr=X.rotateRight;X.toSigned=function t(){if(!this.unsigned)return this;return k(this.low,this.high,false)};X.toUnsigned=function t(){if(this.unsigned)return this;return k(this.low,this.high,true)};X.toBytes=function t(e){return e?this.toBytesLE():this.toBytesBE()};X.toBytesLE=function t(){var e=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]};X.toBytesBE=function t(){var e=this.high,n=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,n>>>24,n>>>16&255,n>>>8&255,n&255]};B.fromBytes=function t(e,n,r){return r?B.fromBytesLE(e,n):B.fromBytesBE(e,n)};B.fromBytesLE=function t(e,n){return new B(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)};B.fromBytesBE=function t(e,n){return new B(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)};if(typeof BigInt==="function"){B.fromBigInt=function t(e,n){var r=Number(BigInt.asIntN(32,e));var i=Number(BigInt.asIntN(32,e>>BigInt(32)));return k(r,i,n)};B.fromValue=function t(e,n){if(typeof e==="bigint")return B.fromBigInt(e,n);return O(e,n)};X.toBigInt=function t(){var e=BigInt(this.low>>>0);var n=BigInt(this.unsigned?this.high>>>0:this.high);return n<<BigInt(32)|e}}const $=m.defineMapper(m.read(m.requiredProp("hex")),(([t])=>t));const Z=m.defineMapper(m.read(m.requiredProp("msb"),m.requiredProp("lsb")),(([t,e])=>{const n=BigInt(typeof t==="number"?t:t.toString());const r=BigInt(typeof e==="number"?e:e.toString());return w.fromMsbLsb(n,r)}));const tt=m.defineMapper(m.compose((t=>w.toMsbLsb(t)),m.read(m.mapProp("msb",B.fromString),m.mapProp("lsb",B.fromString))),(([t,e])=>({msb:t,lsb:e})));function et(t){"@babel/helpers - typeof";return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},et(t)}function nt(t){if(t===null||t===true||t===false){return NaN}var e=Number(t);if(isNaN(e)){return e}return e<0?Math.ceil(e):Math.floor(e)}function rt(t,e){if(e.length<t){throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}}function it(t){rt(1,arguments);var e=Object.prototype.toString.call(t);if(t instanceof Date||et(t)==="object"&&e==="[object Date]"){return new Date(t.getTime())}else if(typeof t==="number"||e==="[object Number]"){return new Date(t)}else{if((typeof t==="string"||e==="[object String]")&&typeof console!=="undefined"){console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");console.warn((new Error).stack)}return new Date(NaN)}}function st(t,e){rt(2,arguments);var n=it(t);var r=nt(e);if(isNaN(r)){return new Date(NaN)}if(!r){return n}n.setDate(n.getDate()+r);return n}function ot(t,e){rt(2,arguments);var n=it(t);var r=nt(e);if(isNaN(r)){return new Date(NaN)}if(!r){return n}var i=n.getDate();var s=new Date(n.getTime());s.setMonth(n.getMonth()+r+1,0);var o=s.getDate();if(i>=o){return s}else{n.setFullYear(s.getFullYear(),s.getMonth(),i);return n}}function at(t,e){rt(2,arguments);if(!e||et(e)!=="object")return new Date(NaN);var n=e.years?nt(e.years):0;var r=e.months?nt(e.months):0;var i=e.weeks?nt(e.weeks):0;var s=e.days?nt(e.days):0;var o=e.hours?nt(e.hours):0;var a=e.minutes?nt(e.minutes):0;var u=e.seconds?nt(e.seconds):0;var c=it(t);var h=r||n?ot(c,r+n*12):c;var f=s||i?st(h,s+i*7):h;var l=a+o*60;var v=u+l*60;var d=v*1e3;var m=new Date(f.getTime()+d);return m}function ut(t,e){rt(2,arguments);return it(t).getTime()-it(e).getTime()}function ct(t,e){rt(2,arguments);var n=it(t);var r=it(e);return n.getTime()>r.getTime()}function ht(t,e){rt(2,arguments);var n=nt(e);return st(t,-n)}function ft(t,e){rt(2,arguments);var n=nt(e);return ot(t,-n)}function lt(t,e){rt(2,arguments);if(!e||et(e)!=="object")return new Date(NaN);var n=e.years?nt(e.years):0;var r=e.months?nt(e.months):0;var i=e.weeks?nt(e.weeks):0;var s=e.days?nt(e.days):0;var o=e.hours?nt(e.hours):0;var a=e.minutes?nt(e.minutes):0;var u=e.seconds?nt(e.seconds):0;var c=ft(t,r+n*12);var h=ht(c,s+i*7);var f=a+o*60;var l=u+f*60;var v=l*1e3;var d=new Date(h.getTime()-v);return d}class vt{constructor(t,e,n){this.token=t;this.expiresIn=e;this.expiresAt=n}static create(t,e){const n=at(new Date,{seconds:e});return new vt(t,e,n)}hasExpired(){return ct(new Date,this.expiresAt)}remainingTimeInMs(t){return ut(lt(this.expiresAt,{seconds:t}),new Date)}}function dt(t){if(mt(t)){const n=e.isValid(t.lookAt);const r=e.isValid(t.position);const i=e.isValid(t.up);return n&&r&&i}else{const n=t;const r=e.isValid(n.viewVector);const i=e.isValid(n.lookAt);const s=e.isValid(n.up);const o=Number.isFinite(n.fovHeight);return r&&i&&s&&o}}function mt(t){return t.position!=null&&t.fovHeight==null}function pt(t){const e=t;return e.viewVector!=null&&e.fovHeight!=null}function wt(t){if(pt(t)){return{...t,position:e.add(t.lookAt,e.negate(t.viewVector))}}else{return{...t,viewVector:e.subtract(t.lookAt,t.position)}}}function gt(r,i){var s;const o=e.subtract(r.lookAt,r.position);const a=n.create(i);const u=a.radius/e.magnitude(o);return{viewVector:e.scale(u,o),up:r.up,lookAt:r.lookAt,fovHeight:2*e.magnitude(o)*Math.tan(t.toRadians(((s=r.fovY)!==null&&s!==void 0?s:45)/2))}}function bt(n,r=45){const i=n.fovHeight/(2*Math.tan(t.toRadians(r/2)));const s=e.magnitude(n.viewVector);const o=i/s;return{position:e.add(n.lookAt,e.negate(e.scale(o,n.viewVector))),up:n.up,lookAt:n.lookAt,fovY:r}}function yt(t){if(pt(t)){return{orthographic:{viewVector:{...t.viewVector},lookAt:{...t.lookAt},up:{...t.up},fovHeight:t.fovHeight}}}else if(mt(t)){return{perspective:{position:{...t.position},lookAt:{...t.lookAt},up:{...t.up},fovY:t.fovY?{value:t.fovY}:null},position:{...t.position},lookAt:{...t.lookAt},up:{...t.up}}}else{return{...t}}}function Mt(t,e){return pt(e)?Nt(t):xt(t,e)}function xt(t,r){const i=n.create(t);const s=i.epsilon*100;const o=e.dot(e.subtract(i.center,r.position),e.normalize(e.subtract(r.lookAt,r.position)));const a=Math.max(i.radius,s);let u=a+o<s?a*3:a+o;let c=u-a*2<s?Math.min(s,u):u-a*2;if(u-c<s){c=Math.max(c,s);u+=c+s}else if(c/u<1e-4){c=u*1e-4}if(c>u-a*2){if(c>1e3+s){u-=c-1e3;c=1e3}}return{near:c,far:u}}function Nt(t,e){const r=n.create(t);const i=r.epsilon*100;const s=Math.max(r.radius,i);return{near:-s,far:s}}function It(t={}){return{sectionPlanes:t.sectionPlanes||[],highlightColor:t.highlightColor,lineWidth:t.lineWidth}}var St=Object.freeze({__proto__:null,create:It});function Bt(t={}){return{visibleSummary:t.visibleSummary,selectedVisibleSummary:t.selectedVisibleSummary}}function Ct(t,e){return At(t.scene.sceneViewSummary)?t.copy({scene:t.scene.copy({sceneViewSummary:e===null||e===void 0?void 0:e.scene.sceneViewSummary})}):t}function At(t){return t.visibleSummary==null}class Vt{constructor(t,e,n){this.camera=t;this.imageAttr=e;this.pixels=n}static fromPng(t,e,n){if(t.data instanceof Uint16Array){return new Vt(e,n,t.data)}else{throw new Error("Expected depth PNG to have depth of 16-bit")}}getDepthAtPoint(t,e){const{near:n,far:r}=this.camera;const i=this.camera.isPerspective();const s=this.getNormalizedDepthAtPoint(t,e);if(i){return s*(r-n)+n}else{return s*(r-n)}}getMaxDepthOfGeometry(){const{near:t,far:e}=this.camera;const n=this.camera.isPerspective();if(n){return e}else{return e-t}}getNormalizedDepthAtPoint(t,e){const{width:n,height:i}=this.imageAttr.imageRect;const s=r.subtract(t,this.imageAttr.imageRect);const o=1/this.imageAttr.imageScale;const a=r.scale(s,o,o);if(a.x>=0&&a.y>=0&&a.x<n&&a.y<i){const t=Math.floor(a.x)+Math.floor(a.y)*n;const r=this.pixels[t];const i=r===Vt.MAX_DEPTH_VALUE?e!==null&&e!==void 0?e:r:r;return(i!==null&&i!==void 0?i:Vt.MAX_DEPTH_VALUE)/Vt.MAX_DEPTH_VALUE}else{return e!==null&&e!==void 0?e:1}}hitTest(t){return this.getNormalizedDepthAtPoint(t)<1}getWorldPoint(t,n,r){const s=this.getDepthAtPoint(t,r);const o=this.camera.isPerspective();if(o){const{position:t,viewVector:r,far:o}=this.camera;const a=i.at(n,o);const u=e.subtract(a,t);const c=e.dot(r,u)/(e.magnitude(r)*e.magnitude(u));return i.at(n,s/c)}else{return i.at(n,s)}}distanceToPoint(t){const{position:n,direction:r}=this.camera;const i=e.subtract(t,n);return Math.abs(e.dot(i,r))}depthOfClosestGeometry(t,e){const{projectionViewMatrix:n}=this.camera;const r=e.transformWorldToViewport(t,n);const i=e.transformPointToFrame(r,this);return this.getDepthAtPoint(i)}isOccluded(t,e){const n=this.distanceToPoint(t);const r=this.depthOfClosestGeometry(t,e);const i=Math.abs(.02*n);const s=Math.abs(r-n);return n>r&&s>i}isDetached(t,e){const n=this.distanceToPoint(t);const r=this.depthOfClosestGeometry(t,e);const i=r-n;const s=.02*n;const o=i<s;const a=this.getMaxDepthOfGeometry();const u=n>a;const c=!o||u;return c}}Vt.MAX_DEPTH_VALUE=2**16-1;class jt{constructor(t){this.scale=t}convertTo(t){return t*this.scale}convertFrom(t){return t/this.scale}}class Dt extends jt{constructor(){super(1)}}class Pt extends jt{constructor(t=1){super(1/Math.pow(10,t))}}class kt extends jt{constructor(t=1){super(1/Math.pow(1e3,t))}}class Tt extends jt{constructor(t=1){super(1/Math.pow(25.4,t))}}class Et extends jt{constructor(t=1){super(1/Math.pow(25.4*12,t))}}class Ot extends jt{constructor(t=1){super(1/Math.pow(25.4*12*3,t))}}class Rt{constructor(t){this.unitType=t;this.unit=Rt.units[t]}convertWorldValueToReal(t){return this.unit.converter.convertTo(t)}convertRealValueToWorld(t){return this.unit.converter.convertFrom(t)}convertWorldPointToReal(t){const e=this.unit.converter.convertTo(t.x);const n=this.unit.converter.convertTo(t.y);const r=this.unit.converter.convertTo(t.z);return{x:e,y:n,z:r}}convertRealPointToWorld(t){const e=this.unit.converter.convertFrom(t.x);const n=this.unit.converter.convertFrom(t.y);const r=this.unit.converter.convertFrom(t.z);return{x:e,y:n,z:r}}}Rt.units={millimeters:{name:"Millimeters",abbreviatedName:"mm",converter:new Dt},centimeters:{name:"Centimeters",abbreviatedName:"cm",converter:new Pt},meters:{name:"Meters",abbreviatedName:"m",converter:new kt},inches:{name:"Inches",abbreviatedName:"in",converter:new Tt},feet:{name:"Feet",abbreviatedName:"ft",converter:new Et},yards:{name:"Yards",abbreviatedName:"yd",converter:new Ot}};class Wt{convertTo(e){return t.toDegrees(e)}convertFrom(e){return t.toRadians(e)}}class zt{constructor(t){this.unitType=t;this.unit=zt.units[t]}convertTo(t){return this.unit.converter.convertTo(t)}convertFrom(t){return this.unit.converter.convertFrom(t)}}zt.units={radians:{name:"Radians",abbreviatedName:"rad",converter:new jt(1)},degrees:{name:"Degrees",abbreviatedName:"deg",converter:new Wt}};class Ft{constructor(t){this.unitType=t;this.unit=Ft.units[t]}convertWorldValueToReal(t){return this.unit.converter.convertTo(t)}convertRealValueToWorld(t){return this.unit.converter.convertFrom(t)}}Ft.units={millimeters:{name:"Square Millimeters",abbreviatedName:"mm²",converter:new Dt},centimeters:{name:"Square Centimeters",abbreviatedName:"cm²",converter:new Pt(2)},meters:{name:"Square Meters",abbreviatedName:"m²",converter:new kt(2)},inches:{name:"Square Inches",abbreviatedName:"in²",converter:new Tt(2)},feet:{name:"Square Feet",abbreviatedName:"ft²",converter:new Et(2)},yards:{name:"Square Yards",abbreviatedName:"yd²",converter:new Ot(2)}};class qt{constructor(t,e){this.pixels=t;this.imageAttr=e}static fromPng(t,e){if(!(t.data instanceof Uint8Array)){throw new Error("Cannot create FeatureMap. Expected decoded PNG to be a Uint8Array.")}else if(t.channels!==4){throw new Error("Cannot create FeatureMap. Missing alpha channel.")}else{return new qt(t.data,{...e,imageRect:s.fromPointAndDimensions(e.imageRect,t)})}}getEntityType(t){const e=this.getColor(t);if((e===null||e===void 0?void 0:e.a)===g.CROSS_SECTION){return g.CROSS_SECTION}else if((e===null||e===void 0?void 0:e.a)===g.GENERIC_GEOMETRY){return g.GENERIC_GEOMETRY}else if((e===null||e===void 0?void 0:e.a)===g.IMPRECISE_EDGE){return g.IMPRECISE_EDGE}else if((e===null||e===void 0?void 0:e.a)===g.IMPRECISE_SURFACE){return g.IMPRECISE_SURFACE}else if((e===null||e===void 0?void 0:e.a)===g.PRECISE_EDGE){return g.PRECISE_EDGE}else if((e===null||e===void 0?void 0:e.a)===g.PRECISE_SURFACE){return g.PRECISE_SURFACE}else{return g.NO_GEOMETRY}}getColor(t){const{width:e,height:n}=this.imageAttr.imageRect;const i=r.subtract(t,this.imageAttr.imageRect);const s=1/this.imageAttr.imageScale;const o=r.scale(i,s,s);if(o.x>=0&&o.y>=0&&o.x<e&&o.y<n){const t=Math.floor(o.x)*4+Math.floor(o.y)*4*e;const n=this.pixels[t];const r=this.pixels[t+1];const i=this.pixels[t+2];const s=this.pixels[t+3];return p.create(n,r,i,s)}else return undefined}}async function Ht(){return import("./p-BUvpJrVN.js")}let Lt;let Gt;const Ut=1;function Yt(){if(Lt==null){console.debug(`Loading PNG worker module`);Lt=Ht()}return Lt}function _t(){var t;if(typeof window!=="undefined"){const e=(t=window.navigator.hardwareConcurrency)!==null&&t!==void 0?t:8;return Math.ceil(e/4)}else{return Ut}}async function Kt(){if(Gt==null){Gt=Yt().then((async({spawnPool:t})=>{const e=_t();console.debug(`Spawning PNG worker pool [size=${e}]`);return t({size:e})}))}return Gt}const Jt=async t=>{const e=await Kt();return e.queue((e=>e(t)))};Kt();function Qt(t,n){const r=e.magnitude(t);const i=n.radius/r;return e.scale(i,t)}function Xt(t,n,r){const i=e.subtract(r,t);const s=e.dot(n,i);const o=e.magnitudeSquared(n);const a=s/o;const u=e.scale(a,n);return e.add(u,t)}class $t{constructor(t,e,n,r,i,s,o,a,u=w.create()){this.correlationIds=t;this.temporalRefinementCorrelationId=e;this.sequenceNumber=n;this.dimensions=r;this.image=i;this.scene=s;this.depthBufferBytes=o;this.featureMapBytes=a;this.id=u}getId(){return this.id}async depthBuffer(){if(this.cachedDepthBuffer==null){this.cachedDepthBuffer=this.depthBufferBytes!=null?this.decodeDepthBuffer(new Uint8Array(this.depthBufferBytes)):Promise.resolve(undefined)}return this.cachedDepthBuffer}async decodeDepthBuffer(t){const e=await Jt(t);return Vt.fromPng(e,this.scene.camera,this.image.imageAttr)}async featureMap(){if(this.cachedFeatureMap==null){this.cachedFeatureMap=this.featureMapBytes!=null?this.decodeFeatureMap(new Uint8Array(this.featureMapBytes)):Promise.resolve(undefined)}return this.cachedFeatureMap}async decodeFeatureMap(t){const e=await Jt(t);return qt.fromPng(e,this.image.imageAttr)}copy({correlationIds:t,temporalRefinementCorrelationId:e,sequenceNumber:n,dimensions:r,image:i,scene:s,depthBufferBytes:o,featureMapBytes:a}){return new $t(t!==null&&t!==void 0?t:this.correlationIds,e!==null&&e!==void 0?e:this.temporalRefinementCorrelationId,n!==null&&n!==void 0?n:this.sequenceNumber,r!==null&&r!==void 0?r:this.dimensions,i!==null&&i!==void 0?i:this.image,s!==null&&s!==void 0?s:this.scene,o!==null&&o!==void 0?o:this.depthBufferBytes,a!==null&&a!==void 0?a:this.featureMapBytes,this.id)}}class Zt{constructor(t,e){this.imageAttr=t;this.imageBytes=e}}class te{constructor(t,e,n,r,i,s,o){this.camera=t;this.boundingBox=e;this.crossSection=n;this.worldOrientation=r;this.hasChanged=i;this.sceneViewSummary=s;this.modelViewId=o}copy({camera:t,boundingBox:e,crossSection:n,worldOrientation:r,hasChanged:i,sceneViewSummary:s,modelViewId:o}){return new te(t!==null&&t!==void 0?t:this.camera,e!==null&&e!==void 0?e:this.boundingBox,n!==null&&n!==void 0?n:this.crossSection,r!==null&&r!==void 0?r:this.worldOrientation,i!==null&&i!==void 0?i:this.hasChanged,s!==null&&s!==void 0?s:this.sceneViewSummary,o!==null&&o!==void 0?o:this.modelViewId)}}class ee{constructor(t,e,n,r,i,s){this.position=t;this.lookAt=e;this.up=n;this.near=r;this.far=i;this.aspectRatio=s}get direction(){return e.normalize(this.viewVector)}get viewVector(){return e.subtract(this.lookAt,this.position)}get worldMatrix(){return this.computeCameraMatrices().worldMatrix}get viewMatrix(){return this.computeCameraMatrices().viewMatrix}get projectionMatrix(){return this.computeCameraMatrices().projectionMatrix}get projectionMatrixInverse(){return this.computeCameraMatrices().projectionMatrixInverse}get projectionViewMatrix(){return this.computeCameraMatrices().projectionViewMatrix}get frustumProjectionViewMatrix(){return this.computeCameraMatrices().projectionViewMatrix}static fromBoundingBox(t,e,r){var i;const{near:s,far:o}=Mt(e,t);if(pt(t)){const i=n.create(e);const a=Qt(t.viewVector,i);const u=Xt(t.lookAt,a,i.center);return new re(a,u,t.up,s,o,r,t.fovHeight,t.rotationPoint)}else{return new ne(t.position,t.lookAt,t.up,s,o,r,(i=t.fovY)!==null&&i!==void 0?i:45)}}isOrthographic(){return false}isPerspective(){return false}isPointBehindNear(t){const{position:n,direction:r,near:i}=this;const s=e.dot(e.subtract(t,n),r);return s<i}intersectLineWithNear(t){const{position:n,direction:r,near:i}=this;const s=e.subtract(t.start,n);const u=e.subtract(t.end,n);const c=o.create({start:s,end:u});const h=a.create({normal:r,constant:-i});const f=a.intersectLine(h,c);return f!=null?e.add(f,n):undefined}computeCameraMatrices(){if(this.cameraMatrices==null){return{viewMatrix:u.makeIdentity(),worldMatrix:u.makeIdentity(),projectionMatrix:u.makeIdentity(),projectionMatrixInverse:u.makeIdentity(),projectionViewMatrix:u.makeIdentity()}}return this.cameraMatrices}updateCameraMatrices(t){this.cameraMatrices=t;return this.cameraMatrices}}class ne extends ee{constructor(t,e,n,r,i,s,o){super(t,e,n,r,i,s);this.position=t;this.lookAt=e;this.up=n;this.near=r;this.far=i;this.aspectRatio=s;this.fovY=o}toOrthographic(t){return ee.fromBoundingBox(gt(this,t),t,this.aspectRatio)}isPerspective(){return true}computeCameraMatrices(){if(this.cameraMatrices==null){const t=u.makeLookAtView(this.position,this.lookAt,this.up);const e=u.invert(t);const n=u.makePerspective(this.near,this.far,this.fovY,this.aspectRatio);const r=u.invert(n);const i=u.multiply(n,t);return super.updateCameraMatrices({viewMatrix:t,worldMatrix:e,projectionMatrix:n,projectionMatrixInverse:r,projectionViewMatrix:i})}return this.cameraMatrices}}class re extends ee{constructor(t,n,r,i,s,o,a,u){super(e.add(n,e.negate(t)),n,r,i,s,o);this.lookAt=n;this.up=r;this.near=i;this.far=s;this.aspectRatio=o;this.fovHeight=a;this.rotationPoint=u;this.top=a*.5;this.bottom=-this.top;this.right=this.top*o;this.left=-this.right}toPerspective(t){return ee.fromBoundingBox(bt(this),t,this.aspectRatio)}isOrthographic(){return true}get frustumProjectionViewMatrix(){const t=u.makeFrustum(this.left,this.right,this.top,this.bottom,this.near,this.far);return u.multiply(t,this.computeCameraMatrices().viewMatrix)}computeCameraMatrices(){if(this.cameraMatrices==null){const t=u.makeLookAtView(this.position,this.lookAt,this.up);const e=u.invert(t);const n=u.makeOrthographic(this.left,this.right,this.bottom,this.top,this.near,this.far);const r=u.invert(n);const i=u.multiply(n,t);return super.updateCameraMatrices({viewMatrix:t,worldMatrix:e,projectionMatrix:n,projectionMatrixInverse:r,projectionViewMatrix:i})}return this.cameraMatrices}}class ie{constructor(t,e){this.y=t;this.z=e}get matrix(){const t=this.z;const n=this.y;const r=e.cross(n,t);return u.makeBasis(r,n,t)}}ie.DEFAULT=new ie(e.up(),e.back());class se{constructor(t,e){this.position=t;this.up=e}transformMatrix(t){const n=e.transformMatrix(this.position,t);const r=e.transformMatrix(this.up,t);return new se(n,r)}}se.FRONT=new se(e.back(),e.up());se.RIGHT=new se(e.right(),e.up());se.LEFT=new se(e.left(),e.up());se.BACK=new se(e.forward(),e.up());se.TOP=new se(e.up(),e.forward());se.BOTTOM=new se(e.down(),e.back());se.TOP_FRONT_RIGHT=new se(e.add(e.back(),e.up(),e.left()),e.up());se.TOP_FRONT_LEFT=new se(e.add(e.back(),e.up(),e.right()),e.up());se.BOTTOM_FRONT_RIGHT=new se(e.add(e.back(),e.down(),e.left()),e.up());se.BOTTOM_FRONT_LEFT=new se(e.add(e.back(),e.down(),e.right()),e.up());se.TOP_BACK_LEFT=new se(e.add(e.forward(),e.up(),e.right()),e.up());se.TOP_BACK_RIGHT=new se(e.add(e.forward(),e.up(),e.left()),e.up());se.BOTTOM_BACK_LEFT=new se(e.add(e.forward(),e.down(),e.right()),e.up());se.BOTTOM_BACK_RIGHT=new se(e.add(e.forward(),e.down(),e.left()),e.up());se.TOP_FRONT=new se(e.add(e.back(),e.up()),e.up());se.BOTTOM_FRONT=new se(e.add(e.back(),e.down()),e.up());se.FRONT_RIGHT=new se(e.add(e.back(),e.left()),e.up());se.FRONT_LEFT=new se(e.add(e.back(),e.right()),e.up());se.TOP_BACK=new se(e.add(e.forward(),e.up()),e.up());se.BOTTOM_BACK=new se(e.add(e.forward(),e.down()),e.up());se.BACK_LEFT=new se(e.add(e.forward(),e.right()),e.up());se.BACK_RIGHT=new se(e.add(e.forward(),e.left()),e.up());se.TOP_LEFT=new se(e.add(e.up(),e.right()),e.up());se.TOP_RIGHT=new se(e.add(e.up(),e.left()),e.up());se.BOTTOM_LEFT=new se(e.add(e.down(),e.right()),e.up());se.BOTTOM_RIGHT=new se(e.add(e.down(),e.left()),e.up());const oe=m.defineMapper(m.read(m.requiredProp("x"),m.requiredProp("y")),(([t,e])=>r.create(t,e)));const ae=m.defineMapper(m.read(m.requiredProp("width"),m.requiredProp("height")),(([t,e])=>c.create(t,e)));const ue=m.defineMapper(m.read(m.requiredProp("x"),m.requiredProp("y"),m.requiredProp("width"),m.requiredProp("height")),(([t,e,n,r])=>s.create(t,e,n,r)));const ce=m.defineMapper(m.read(m.requiredProp("x"),m.requiredProp("y"),m.requiredProp("z")),(([t,n,r])=>e.create(t,n,r)));const he=m.defineMapper(m.read(m.requiredProp("xmin"),m.requiredProp("ymin"),m.requiredProp("zmin"),m.requiredProp("xmax"),m.requiredProp("ymax"),m.requiredProp("zmax")),(([t,n,r,i,s,o])=>h.create(e.create(t,n,r),e.create(i,s,o))));const fe=m.defineMapper(m.read(m.requiredProp("d"),m.mapRequiredProp("normal",ce)),(([t,e])=>a.create({normal:e,constant:t})));const le=m.defineMapper(m.read(m.requiredProp("x"),m.requiredProp("y"),m.requiredProp("z"),m.requiredProp("w")),(([t,e,n,r])=>f.create({x:t,y:e,z:n,w:r})));const ve=m.defineMapper(m.read(m.mapRequiredProp("r0",le),m.mapRequiredProp("r1",le),m.mapRequiredProp("r2",le),m.mapRequiredProp("r3",le)),(([t,e,n,r])=>u.fromValues(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,n.x,n.y,n.z,n.w,r.x,r.y,r.z,r.w)));const de=m.defineMapper(m.read(m.requiredProp("r"),m.requiredProp("g"),m.requiredProp("b")),(([t,e,n])=>p.create(t,e,n)));const me=m.defineMapper((t=>{function e(t){return{r:t.r,g:t.g,b:t.b}}if(typeof t==="string"){const n=p.fromHexString(t);return n!=null?e(n):{errors:["String is not a valid color."]}}else if(typeof t==="number"){return e(p.fromNumber(t))}else{return e(t)}}),(t=>t));Me();const pe=Me();const we=Me();const ge=xe();const be=xe();const ye=xe();function Me(){return m.defineMapper((t=>t!=null?{value:t}:undefined),(t=>t))}function xe(){return m.defineMapper((t=>(t===null||t===void 0?void 0:t.value)||undefined),(t=>t))}const Ne=m.defineMapper(m.read(m.mapProp("position",m.compose(m.required("position"),ce)),m.mapProp("lookAt",m.compose(m.required("lookAt"),ce)),m.mapProp("up",m.compose(m.required("up"),ce)),m.getProp("fovY")),(([t,e,n,r])=>({position:t,lookAt:e,up:n,fovY:(r===null||r===void 0?void 0:r.value)!=null?r.value:45})));const Ie=m.defineMapper(m.read(m.mapProp("viewVector",m.compose(m.required("viewVector"),ce)),m.mapProp("lookAt",m.compose(m.required("lookAt"),ce)),m.mapProp("up",m.compose(m.required("up"),ce)),m.mapProp("fovHeight",m.required("fovHeight"))),(([t,e,n,r])=>({viewVector:t,lookAt:e,up:n,fovHeight:r})));const Se=m.defineMapper(m.read(m.mapProp("position",m.ifDefined(ce)),m.mapProp("lookAt",m.ifDefined(ce)),m.mapProp("up",m.ifDefined(ce)),m.mapProp("perspective",m.ifDefined(Ne)),m.mapProp("orthographic",m.ifDefined(Ie))),(([t,n,r,i,s])=>{var o;return(o=i!==null&&i!==void 0?i:s)!==null&&o!==void 0?o:{position:t!==null&&t!==void 0?t:e.back(),lookAt:n!==null&&n!==void 0?n:e.origin(),up:r!==null&&r!==void 0?r:e.up(),fovY:45}}));const Be=m.defineMapper(m.read(m.mapProp("normal",m.compose(m.required("normal"),ce)),m.requiredProp("offset")),(([t,e])=>({normal:t,offset:e})));const Ce=m.defineMapper(m.read(m.mapProp("frameDimensions",m.compose(m.required("frameDimensions"),ae)),m.mapProp("imageRect",m.compose(m.required("imageRect"),ue)),m.mapProp("scaleFactor",m.required("scaleFactor"))),(([t,e,n])=>({frameDimensions:t,imageRect:e,imageScale:n})));const Ae=m.defineMapper(m.read(m.mapProp("sectionPlanes",m.compose(m.required("sectionPlanes"),m.mapArray(Be))),m.mapProp("highlightColor",m.ifDefined(de))),(([t,e])=>It({sectionPlanes:t,highlightColor:e||undefined})));const Ve=m.defineMapper(m.read(m.requiredProp("count"),m.mapProp("boundingBox",m.ifDefined(he))),(([t,e])=>({count:t,boundingBox:e!==null&&e!==void 0?e:undefined})));const je=m.defineMapper(m.read(m.mapProp("visibleSummary",m.ifDefined(Ve)),m.mapProp("selectedVisibleSummary",m.ifDefined(Ve))),(([t,e])=>Bt({visibleSummary:t!==null&&t!==void 0?t:undefined,selectedVisibleSummary:e!==null&&e!==void 0?e:undefined})));const De=m.defineMapper(m.read(m.mapProp("imageAttributes",m.compose(m.required("imageAttributes"),Ce))),(([t])=>t));const Pe=m.defineMapper(m.read(De,m.mapProp("image",m.required("image"))),(([t,e])=>new Zt(t,e)));const ke=m.defineMapper(m.read(m.mapRequiredProp("camera",Se),m.mapRequiredProp("visibleBoundingBox",he),m.mapRequiredProp("crossSectioning",Ae),m.requiredProp("hasChanged"),m.mapRequiredProp("displayListSummary",je),m.mapProp("modelViewId",m.ifDefined(Z))),(([t,e,n,r,i,s])=>({camera:t,boundingBox:e,crossSectioning:n,hasChanged:r,displayListSummary:i,modelViewId:s!=null?s:undefined})));const Te=m.defineMapper(m.read(m.mapProp("sceneAttributes",m.compose(m.required("sceneAttributes"),ke))),(([t])=>t));const Ee=m.defineMapper(m.read(Te,De),(([t,e])=>ee.fromBoundingBox(t.camera,t.boundingBox,c.aspectRatio(e.frameDimensions))));function Oe(t){return m.defineMapper(m.read(Te,Ee),(([e,n])=>new te(n,e.boundingBox,e.crossSectioning,t,e.hasChanged,e.displayListSummary,e.modelViewId)))}function Re(t){return m.defineMapper(m.read(m.mapProp("frameCorrelationIds",(t=>t!=null?t:[])),m.requiredProp("sequenceNumber"),m.compose(De,m.getProp("frameDimensions")),Oe(t),Pe,m.mapProp("depthBuffer",be),m.mapProp("featureMap",be),m.mapProp("temporalRefinementCorrelationId",(t=>t!=null?$(t):null))),(([t,e,n,r,i,s,o,a])=>new $t(t,a||"",e,n,i,r,s,o)))}function We(t){return m.ifInvalidThrow(Re(t))}const ze=m.defineMapper(m.compose(m.required("orientation"),m.read(m.mapProp("up",m.compose(m.required("up"),ce)),m.mapProp("front",m.compose(m.required("front"),ce)))),(([t,e])=>new ie(t,e)));m.ifInvalidThrow(ze);const Fe=m.defineMapper(m.read(m.mapRequiredProp("imageAttributes",Ce),m.requiredProp("stencilBuffer"),m.mapRequiredProp("depthBuffer",m.compose(be,m.required("depthBuffer")))),(([t,e,n])=>({imageAttributes:t,stencilBuffer:e,depthBuffer:n})));const qe=Le("stencilBuffer",Fe);const He=m.ifInvalidThrow(qe);function Le(t,e){return m.mapRequiredProp(t,e)}const Ge=m.defineMapper(m.read(m.requiredProp("token"),m.requiredProp("expiresIn")),(([t,e])=>vt.create(t,e)));const Ue=m.defineMapper(m.read(m.compose(m.requiredProp("startStream"),m.mapRequiredProp("streamId",$)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("sceneId",$)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("sceneViewId",$)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("sessionId",$)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("worldOrientation",ze)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("token",Ge))),(([t,e,n,r,i,s])=>({streamId:t,sceneId:e,sceneViewId:n,sessionId:r,worldOrientation:i,token:s})));const Ye=m.ifInvalidThrow(Ue);const _e=m.defineMapper(m.read(m.compose(m.requiredProp("reconnect"),m.mapRequiredProp("token",Ge))),(([t])=>({token:t})));const Ke=m.ifInvalidThrow(_e);const Je=m.defineMapper(m.compose(m.requiredProp("refreshToken"),m.requiredProp("token"),Ge),(t=>t));const Qe=m.ifInvalidThrow(Je);const Xe=m.defineMapper(m.compose(m.requiredProp("syncTime"),m.requiredProp("replyTime"),m.read(m.requiredProp("seconds"),m.requiredProp("nanos"))),(([t,e])=>d({seconds:t,nanos:e})));const $e=m.ifInvalidThrow(Xe);const Ze=m.defineMapper(m.ifDefined(m.getProp("next")),(t=>t!=null?t:undefined));const tn=m.defineMapper((t=>{switch(t){case"all":return{enabled:{value:true},frameType:v.protobuf.stream.FrameType.FRAME_TYPE_ALL};case"final":return{enabled:{value:true},frameType:v.protobuf.stream.FrameType.FRAME_TYPE_FINAL};default:return{enabled:{value:false},frameType:v.protobuf.stream.FrameType.FRAME_TYPE_INVALID}}}),(t=>t));const en=m.defineMapper(m.read(m.ifDefined(m.getProp("opacity"))),(([t])=>({opacity:{value:l(t!==null&&t!==void 0?t:0,0,1)}})));const nn=m.defineMapper(m.read(m.ifDefined(m.getProp("width")),m.ifDefined(m.mapProp("color",m.ifDefined(me)))),(([t,e])=>({lineWidth:t,lineColor:e})));const rn=m.defineMapper(m.read(m.ifDefined(m.mapProp("color",m.ifDefined(me))),m.ifDefined(m.mapProp("opacity",pe)),m.ifDefined(m.getProp("lineWidth"))),(([t,e,n])=>{if(t||e||n){return{color:t,opacity:e,lineWidth:n}}else return undefined}));const sn=m.defineMapper(m.read(m.ifDefined(m.mapProp("highlightColor",m.ifDefined(me))),m.ifDefined(m.mapProp("occludedOpacity",pe)),m.ifDefined(m.mapProp("outline",m.ifDefined(nn)))),(([t,e,n])=>({highlightColor:t,occludedOpacity:e,outline:n})));const on=m.defineMapper((t=>!!t),(t=>t));const an=m.defineMapper((t=>t!==null&&t!==void 0?t:""),(t=>t));const un=m.defineMapper(m.read(m.ifDefined(m.mapProp("frameBackgroundColor",m.ifDefined(me)))),(([t])=>({frameBackgroundColor:t})));const cn=m.defineMapper(m.read(m.ifDefined(m.mapProp("streamKeyToCompare",m.ifDefined(we)))),(([t])=>({streamKeyToCompare:t})));const hn=m.defineMapper(m.read(m.ifDefined(m.mapProp("endCapEnabled",(t=>!!t))),m.ifDefined(m.mapProp("endCapColor",m.ifDefined(me)))),(([t,e])=>({endCapEnabled:t,endCapColor:e})));const fn=m.defineMapper(m.read(m.mapProp("depthBuffers",tn),m.mapProp("phantom",en),m.mapProp("noDefaultLights",on),m.mapProp("featureLines",nn),m.mapProp("featureHighlighting",sn),m.mapProp("featureMaps",tn),m.mapProp("experimentalRenderingOptions",an),m.mapProp("selectionHighlighting",rn),m.mapProp("frames",un),m.mapProp("sceneComparison",cn),m.mapProp("crossSectioning",hn)),(([t,e,n,r,i,s,o,a,u,c,h])=>{const f={depthBuffers:t,phantomItems:e,noDefaultLights:n,featureLines:r,featureHighlighting:i,featureMaps:s,experimentalRenderingOptions:o,selectionHighlighting:a,frames:u,sceneComparison:c,crossSectioningAttributes:h};return f}));export{zt as A,b as B,We as C,Rt as D,Ye as E,ee as F,Ke as G,$e as H,Qe as I,Ct as J,y as K,gt as L,bt as M,dt as N,ie as O,B as P,wt as Q,Mt as R,se as S,Qt as T,tt as U,fe as V,$t as a,Zt as b,St as c,te as d,re as e,ne as f,Ft as g,He as h,Jt as i,Vt as j,x as k,N as l,ye as m,ce as n,M as o,oe as p,de as q,Ze as r,I as s,yt as t,Xt as u,ve as v,ge as w,he as x,fn as y,me as z};
|
|
24
|
-
//# sourceMappingURL=p-
|
|
23
|
+
*/var S=null;try{S=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function B(t,e,n){this.low=t|0;this.high=e|0;this.unsigned=!!n}Object.defineProperty(B.prototype,"__isLong__",{value:true});function C(t){return(t&&t["__isLong__"])===true}function A(t){var e=Math.clz32(t&-t);return t?31-e:e}B.isLong=C;var V={};var j={};function D(t,e){var n,r,i;if(e){t>>>=0;if(i=0<=t&&t<256){r=j[t];if(r)return r}n=k(t,0,true);if(i)j[t]=n;return n}else{t|=0;if(i=-128<=t&&t<128){r=V[t];if(r)return r}n=k(t,t<0?-1:0,false);if(i)V[t]=n;return n}}B.fromInt=D;function P(t,e){if(isNaN(t))return e?G:L;if(e){if(t<0)return G;if(t>=F)return J}else{if(t<=-q)return Q;if(t+1>=q)return K}if(t<0)return P(-t,e).neg();return k(t%z|0,t/z|0,e)}B.fromNumber=P;function k(t,e,n){return new B(t,e,n)}B.fromBits=k;var T=Math.pow;function E(t,e,n){if(t.length===0)throw Error("empty string");if(typeof e==="number"){n=e;e=false}else{e=!!e}if(t==="NaN"||t==="Infinity"||t==="+Infinity"||t==="-Infinity")return e?G:L;n=n||10;if(n<2||36<n)throw RangeError("radix");var r;if((r=t.indexOf("-"))>0)throw Error("interior hyphen");else if(r===0){return E(t.substring(1),e,n).neg()}var i=P(T(n,8));var s=L;for(var o=0;o<t.length;o+=8){var a=Math.min(8,t.length-o),u=parseInt(t.substring(o,o+a),n);if(a<8){var c=P(T(n,a));s=s.mul(c).add(P(u))}else{s=s.mul(i);s=s.add(P(u))}}s.unsigned=e;return s}B.fromString=E;function O(t,e){if(typeof t==="number")return P(t,e);if(typeof t==="string")return E(t,e);return k(t.low,t.high,typeof e==="boolean"?e:t.unsigned)}B.fromValue=O;var R=1<<16;var W=1<<24;var z=R*R;var F=z*z;var q=F/2;var H=D(W);var L=D(0);B.ZERO=L;var G=D(0,true);B.UZERO=G;var U=D(1);B.ONE=U;var Y=D(1,true);B.UONE=Y;var _=D(-1);B.NEG_ONE=_;var K=k(4294967295|0,2147483647|0,false);B.MAX_VALUE=K;var J=k(4294967295|0,4294967295|0,true);B.MAX_UNSIGNED_VALUE=J;var Q=k(0,2147483648|0,false);B.MIN_VALUE=Q;var X=B.prototype;X.toInt=function t(){return this.unsigned?this.low>>>0:this.low};X.toNumber=function t(){if(this.unsigned)return(this.high>>>0)*z+(this.low>>>0);return this.high*z+(this.low>>>0)};X.toString=function t(e){e=e||10;if(e<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(Q)){var n=P(e),r=this.div(n),i=r.mul(n).sub(this);return r.toString(e)+i.toInt().toString(e)}else return"-"+this.neg().toString(e)}var s=P(T(e,6),this.unsigned),o=this;var a="";while(true){var u=o.div(s),c=o.sub(u.mul(s)).toInt()>>>0,h=c.toString(e);o=u;if(o.isZero())return h+a;else{while(h.length<6)h="0"+h;a=""+h+a}}};X.getHighBits=function t(){return this.high};X.getHighBitsUnsigned=function t(){return this.high>>>0};X.getLowBits=function t(){return this.low};X.getLowBitsUnsigned=function t(){return this.low>>>0};X.getNumBitsAbs=function t(){if(this.isNegative())return this.eq(Q)?64:this.neg().getNumBitsAbs();var e=this.high!=0?this.high:this.low;for(var n=31;n>0;n--)if((e&1<<n)!=0)break;return this.high!=0?n+33:n+1};X.isSafeInteger=function t(){var e=this.high>>21;if(!e)return true;if(this.unsigned)return false;return e===-1&&!(this.low===0&&this.high===-2097152)};X.isZero=function t(){return this.high===0&&this.low===0};X.eqz=X.isZero;X.isNegative=function t(){return!this.unsigned&&this.high<0};X.isPositive=function t(){return this.unsigned||this.high>=0};X.isOdd=function t(){return(this.low&1)===1};X.isEven=function t(){return(this.low&1)===0};X.equals=function t(e){if(!C(e))e=O(e);if(this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1)return false;return this.high===e.high&&this.low===e.low};X.eq=X.equals;X.notEquals=function t(e){return!this.eq(e)};X.neq=X.notEquals;X.ne=X.notEquals;X.lessThan=function t(e){return this.comp(e)<0};X.lt=X.lessThan;X.lessThanOrEqual=function t(e){return this.comp(e)<=0};X.lte=X.lessThanOrEqual;X.le=X.lessThanOrEqual;X.greaterThan=function t(e){return this.comp(e)>0};X.gt=X.greaterThan;X.greaterThanOrEqual=function t(e){return this.comp(e)>=0};X.gte=X.greaterThanOrEqual;X.ge=X.greaterThanOrEqual;X.compare=function t(e){if(!C(e))e=O(e);if(this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();if(n&&!r)return-1;if(!n&&r)return 1;if(!this.unsigned)return this.sub(e).isNegative()?-1:1;return e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1};X.comp=X.compare;X.negate=function t(){if(!this.unsigned&&this.eq(Q))return Q;return this.not().add(U)};X.neg=X.negate;X.add=function t(e){if(!C(e))e=O(e);var n=this.high>>>16;var r=this.high&65535;var i=this.low>>>16;var s=this.low&65535;var o=e.high>>>16;var a=e.high&65535;var u=e.low>>>16;var c=e.low&65535;var h=0,f=0,l=0,v=0;v+=s+c;l+=v>>>16;v&=65535;l+=i+u;f+=l>>>16;l&=65535;f+=r+a;h+=f>>>16;f&=65535;h+=n+o;h&=65535;return k(l<<16|v,h<<16|f,this.unsigned)};X.subtract=function t(e){if(!C(e))e=O(e);return this.add(e.neg())};X.sub=X.subtract;X.multiply=function t(e){if(this.isZero())return this;if(!C(e))e=O(e);if(S){var n=S["mul"](this.low,this.high,e.low,e.high);return k(n,S["get_high"](),this.unsigned)}if(e.isZero())return this.unsigned?G:L;if(this.eq(Q))return e.isOdd()?Q:L;if(e.eq(Q))return this.isOdd()?Q:L;if(this.isNegative()){if(e.isNegative())return this.neg().mul(e.neg());else return this.neg().mul(e).neg()}else if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(H)&&e.lt(H))return P(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16;var i=this.high&65535;var s=this.low>>>16;var o=this.low&65535;var a=e.high>>>16;var u=e.high&65535;var c=e.low>>>16;var h=e.low&65535;var f=0,l=0,v=0,d=0;d+=o*h;v+=d>>>16;d&=65535;v+=s*h;l+=v>>>16;v&=65535;v+=o*c;l+=v>>>16;v&=65535;l+=i*h;f+=l>>>16;l&=65535;l+=s*c;f+=l>>>16;l&=65535;l+=o*u;f+=l>>>16;l&=65535;f+=r*h+i*c+s*u+o*a;f&=65535;return k(v<<16|d,f<<16|l,this.unsigned)};X.mul=X.multiply;X.divide=function t(e){if(!C(e))e=O(e);if(e.isZero())throw Error("division by zero");if(S){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1){return this}var n=(this.unsigned?S["div_u"]:S["div_s"])(this.low,this.high,e.low,e.high);return k(n,S["get_high"](),this.unsigned)}if(this.isZero())return this.unsigned?G:L;var r,i,s;if(!this.unsigned){if(this.eq(Q)){if(e.eq(U)||e.eq(_))return Q;else if(e.eq(Q))return U;else{var o=this.shr(1);r=o.div(e).shl(1);if(r.eq(L)){return e.isNegative()?U:_}else{i=this.sub(e.mul(r));s=r.add(i.div(e));return s}}}else if(e.eq(Q))return this.unsigned?G:L;if(this.isNegative()){if(e.isNegative())return this.neg().div(e.neg());return this.neg().div(e).neg()}else if(e.isNegative())return this.div(e.neg()).neg();s=L}else{if(!e.unsigned)e=e.toUnsigned();if(e.gt(this))return G;if(e.gt(this.shru(1)))return Y;s=G}i=this;while(i.gte(e)){r=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));var a=Math.ceil(Math.log(r)/Math.LN2),u=a<=48?1:T(2,a-48),c=P(r),h=c.mul(e);while(h.isNegative()||h.gt(i)){r-=u;c=P(r,this.unsigned);h=c.mul(e)}if(c.isZero())c=U;s=s.add(c);i=i.sub(h)}return s};X.div=X.divide;X.modulo=function t(e){if(!C(e))e=O(e);if(S){var n=(this.unsigned?S["rem_u"]:S["rem_s"])(this.low,this.high,e.low,e.high);return k(n,S["get_high"](),this.unsigned)}return this.sub(this.div(e).mul(e))};X.mod=X.modulo;X.rem=X.modulo;X.not=function t(){return k(~this.low,~this.high,this.unsigned)};X.countLeadingZeros=function t(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};X.clz=X.countLeadingZeros;X.countTrailingZeros=function t(){return this.low?A(this.low):A(this.high)+32};X.ctz=X.countTrailingZeros;X.and=function t(e){if(!C(e))e=O(e);return k(this.low&e.low,this.high&e.high,this.unsigned)};X.or=function t(e){if(!C(e))e=O(e);return k(this.low|e.low,this.high|e.high,this.unsigned)};X.xor=function t(e){if(!C(e))e=O(e);return k(this.low^e.low,this.high^e.high,this.unsigned)};X.shiftLeft=function t(e){if(C(e))e=e.toInt();if((e&=63)===0)return this;else if(e<32)return k(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned);else return k(0,this.low<<e-32,this.unsigned)};X.shl=X.shiftLeft;X.shiftRight=function t(e){if(C(e))e=e.toInt();if((e&=63)===0)return this;else if(e<32)return k(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned);else return k(this.high>>e-32,this.high>=0?0:-1,this.unsigned)};X.shr=X.shiftRight;X.shiftRightUnsigned=function t(e){if(C(e))e=e.toInt();if((e&=63)===0)return this;if(e<32)return k(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned);if(e===32)return k(this.high,0,this.unsigned);return k(this.high>>>e-32,0,this.unsigned)};X.shru=X.shiftRightUnsigned;X.shr_u=X.shiftRightUnsigned;X.rotateLeft=function t(e){var n;if(C(e))e=e.toInt();if((e&=63)===0)return this;if(e===32)return k(this.high,this.low,this.unsigned);if(e<32){n=32-e;return k(this.low<<e|this.high>>>n,this.high<<e|this.low>>>n,this.unsigned)}e-=32;n=32-e;return k(this.high<<e|this.low>>>n,this.low<<e|this.high>>>n,this.unsigned)};X.rotl=X.rotateLeft;X.rotateRight=function t(e){var n;if(C(e))e=e.toInt();if((e&=63)===0)return this;if(e===32)return k(this.high,this.low,this.unsigned);if(e<32){n=32-e;return k(this.high<<n|this.low>>>e,this.low<<n|this.high>>>e,this.unsigned)}e-=32;n=32-e;return k(this.low<<n|this.high>>>e,this.high<<n|this.low>>>e,this.unsigned)};X.rotr=X.rotateRight;X.toSigned=function t(){if(!this.unsigned)return this;return k(this.low,this.high,false)};X.toUnsigned=function t(){if(this.unsigned)return this;return k(this.low,this.high,true)};X.toBytes=function t(e){return e?this.toBytesLE():this.toBytesBE()};X.toBytesLE=function t(){var e=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]};X.toBytesBE=function t(){var e=this.high,n=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,n>>>24,n>>>16&255,n>>>8&255,n&255]};B.fromBytes=function t(e,n,r){return r?B.fromBytesLE(e,n):B.fromBytesBE(e,n)};B.fromBytesLE=function t(e,n){return new B(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)};B.fromBytesBE=function t(e,n){return new B(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],n)};if(typeof BigInt==="function"){B.fromBigInt=function t(e,n){var r=Number(BigInt.asIntN(32,e));var i=Number(BigInt.asIntN(32,e>>BigInt(32)));return k(r,i,n)};B.fromValue=function t(e,n){if(typeof e==="bigint")return B.fromBigInt(e,n);return O(e,n)};X.toBigInt=function t(){var e=BigInt(this.low>>>0);var n=BigInt(this.unsigned?this.high>>>0:this.high);return n<<BigInt(32)|e}}const $=m.defineMapper(m.read(m.requiredProp("hex")),(([t])=>t));const Z=m.defineMapper(m.read(m.requiredProp("msb"),m.requiredProp("lsb")),(([t,e])=>{const n=BigInt(typeof t==="number"?t:t.toString());const r=BigInt(typeof e==="number"?e:e.toString());return w.fromMsbLsb(n,r)}));const tt=m.defineMapper(m.compose((t=>w.toMsbLsb(t)),m.read(m.mapProp("msb",B.fromString),m.mapProp("lsb",B.fromString))),(([t,e])=>({msb:t,lsb:e})));function et(t){"@babel/helpers - typeof";return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},et(t)}function nt(t){if(t===null||t===true||t===false){return NaN}var e=Number(t);if(isNaN(e)){return e}return e<0?Math.ceil(e):Math.floor(e)}function rt(t,e){if(e.length<t){throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}}function it(t){rt(1,arguments);var e=Object.prototype.toString.call(t);if(t instanceof Date||et(t)==="object"&&e==="[object Date]"){return new Date(t.getTime())}else if(typeof t==="number"||e==="[object Number]"){return new Date(t)}else{if((typeof t==="string"||e==="[object String]")&&typeof console!=="undefined"){console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");console.warn((new Error).stack)}return new Date(NaN)}}function st(t,e){rt(2,arguments);var n=it(t);var r=nt(e);if(isNaN(r)){return new Date(NaN)}if(!r){return n}n.setDate(n.getDate()+r);return n}function ot(t,e){rt(2,arguments);var n=it(t);var r=nt(e);if(isNaN(r)){return new Date(NaN)}if(!r){return n}var i=n.getDate();var s=new Date(n.getTime());s.setMonth(n.getMonth()+r+1,0);var o=s.getDate();if(i>=o){return s}else{n.setFullYear(s.getFullYear(),s.getMonth(),i);return n}}function at(t,e){rt(2,arguments);if(!e||et(e)!=="object")return new Date(NaN);var n=e.years?nt(e.years):0;var r=e.months?nt(e.months):0;var i=e.weeks?nt(e.weeks):0;var s=e.days?nt(e.days):0;var o=e.hours?nt(e.hours):0;var a=e.minutes?nt(e.minutes):0;var u=e.seconds?nt(e.seconds):0;var c=it(t);var h=r||n?ot(c,r+n*12):c;var f=s||i?st(h,s+i*7):h;var l=a+o*60;var v=u+l*60;var d=v*1e3;var m=new Date(f.getTime()+d);return m}function ut(t,e){rt(2,arguments);return it(t).getTime()-it(e).getTime()}function ct(t,e){rt(2,arguments);var n=it(t);var r=it(e);return n.getTime()>r.getTime()}function ht(t,e){rt(2,arguments);var n=nt(e);return st(t,-n)}function ft(t,e){rt(2,arguments);var n=nt(e);return ot(t,-n)}function lt(t,e){rt(2,arguments);if(!e||et(e)!=="object")return new Date(NaN);var n=e.years?nt(e.years):0;var r=e.months?nt(e.months):0;var i=e.weeks?nt(e.weeks):0;var s=e.days?nt(e.days):0;var o=e.hours?nt(e.hours):0;var a=e.minutes?nt(e.minutes):0;var u=e.seconds?nt(e.seconds):0;var c=ft(t,r+n*12);var h=ht(c,s+i*7);var f=a+o*60;var l=u+f*60;var v=l*1e3;var d=new Date(h.getTime()-v);return d}class vt{constructor(t,e,n){this.token=t;this.expiresIn=e;this.expiresAt=n}static create(t,e){const n=at(new Date,{seconds:e});return new vt(t,e,n)}hasExpired(){return ct(new Date,this.expiresAt)}remainingTimeInMs(t){return ut(lt(this.expiresAt,{seconds:t}),new Date)}}function dt(t){if(mt(t)){const n=e.isValid(t.lookAt);const r=e.isValid(t.position);const i=e.isValid(t.up);return n&&r&&i}else{const n=t;const r=e.isValid(n.viewVector);const i=e.isValid(n.lookAt);const s=e.isValid(n.up);const o=Number.isFinite(n.fovHeight);return r&&i&&s&&o}}function mt(t){return t.position!=null&&t.fovHeight==null}function pt(t){const e=t;return e.viewVector!=null&&e.fovHeight!=null}function wt(t){if(pt(t)){return{...t,position:e.add(t.lookAt,e.negate(t.viewVector))}}else{return{...t,viewVector:e.subtract(t.lookAt,t.position)}}}function gt(r,i){var s;const o=e.subtract(r.lookAt,r.position);const a=n.create(i);const u=a.radius/e.magnitude(o);return{viewVector:e.scale(u,o),up:r.up,lookAt:r.lookAt,fovHeight:2*e.magnitude(o)*Math.tan(t.toRadians(((s=r.fovY)!==null&&s!==void 0?s:45)/2))}}function bt(n,r=45){const i=n.fovHeight/(2*Math.tan(t.toRadians(r/2)));const s=e.magnitude(n.viewVector);const o=i/s;return{position:e.add(n.lookAt,e.negate(e.scale(o,n.viewVector))),up:n.up,lookAt:n.lookAt,fovY:r}}function yt(t){if(pt(t)){return{orthographic:{viewVector:{...t.viewVector},lookAt:{...t.lookAt},up:{...t.up},fovHeight:t.fovHeight}}}else if(mt(t)){return{perspective:{position:{...t.position},lookAt:{...t.lookAt},up:{...t.up},fovY:t.fovY?{value:t.fovY}:null},position:{...t.position},lookAt:{...t.lookAt},up:{...t.up}}}else{return{...t}}}function Mt(t,e){return pt(e)?Nt(t):xt(t,e)}function xt(t,r){const i=n.create(t);const s=i.epsilon*100;const o=e.dot(e.subtract(i.center,r.position),e.normalize(e.subtract(r.lookAt,r.position)));const a=Math.max(i.radius,s);let u=a+o<s?a*3:a+o;let c=u-a*2<s?Math.min(s,u):u-a*2;if(u-c<s){c=Math.max(c,s);u+=c+s}else if(c/u<1e-4){c=u*1e-4}if(c>u-a*2){if(c>1e3+s){u-=c-1e3;c=1e3}}return{near:c,far:u}}function Nt(t,e){const r=n.create(t);const i=r.epsilon*100;const s=Math.max(r.radius,i);return{near:-s,far:s}}function It(t={}){return{sectionPlanes:t.sectionPlanes||[],highlightColor:t.highlightColor,lineWidth:t.lineWidth}}var St=Object.freeze({__proto__:null,create:It});function Bt(t={}){return{visibleSummary:t.visibleSummary,selectedVisibleSummary:t.selectedVisibleSummary}}function Ct(t,e){return At(t.scene.sceneViewSummary)?t.copy({scene:t.scene.copy({sceneViewSummary:e===null||e===void 0?void 0:e.scene.sceneViewSummary})}):t}function At(t){return t.visibleSummary==null}class Vt{constructor(t,e,n){this.camera=t;this.imageAttr=e;this.pixels=n}static fromPng(t,e,n){if(t.data instanceof Uint16Array){return new Vt(e,n,t.data)}else{throw new Error("Expected depth PNG to have depth of 16-bit")}}getDepthAtPoint(t,e){const{near:n,far:r}=this.camera;const i=this.camera.isPerspective();const s=this.getNormalizedDepthAtPoint(t,e);if(i){return s*(r-n)+n}else{return s*(r-n)}}getMaxDepthOfGeometry(){const{near:t,far:e}=this.camera;const n=this.camera.isPerspective();if(n){return e}else{return e-t}}getNormalizedDepthAtPoint(t,e){const{width:n,height:i}=this.imageAttr.imageRect;const s=r.subtract(t,this.imageAttr.imageRect);const o=1/this.imageAttr.imageScale;const a=r.scale(s,o,o);if(a.x>=0&&a.y>=0&&a.x<n&&a.y<i){const t=Math.floor(a.x)+Math.floor(a.y)*n;const r=this.pixels[t];const i=r===Vt.MAX_DEPTH_VALUE?e!==null&&e!==void 0?e:r:r;return(i!==null&&i!==void 0?i:Vt.MAX_DEPTH_VALUE)/Vt.MAX_DEPTH_VALUE}else{return e!==null&&e!==void 0?e:1}}hitTest(t){return this.getNormalizedDepthAtPoint(t)<1}getWorldPoint(t,n,r){const s=this.getDepthAtPoint(t,r);const o=this.camera.isPerspective();if(o){const{position:t,viewVector:r,far:o}=this.camera;const a=i.at(n,o);const u=e.subtract(a,t);const c=e.dot(r,u)/(e.magnitude(r)*e.magnitude(u));return i.at(n,s/c)}else{return i.at(n,s)}}distanceToPoint(t){const{position:n,direction:r}=this.camera;const i=e.subtract(t,n);return Math.abs(e.dot(i,r))}depthOfClosestGeometry(t,e){const{projectionViewMatrix:n}=this.camera;const r=e.transformWorldToViewport(t,n);const i=e.transformPointToFrame(r,this);return this.getDepthAtPoint(i)}isOccluded(t,e){const n=this.distanceToPoint(t);const r=this.depthOfClosestGeometry(t,e);const i=Math.abs(.02*n);const s=Math.abs(r-n);return n>r&&s>i}isDetached(t,e){const n=this.distanceToPoint(t);const r=this.depthOfClosestGeometry(t,e);const i=r-n;const s=.02*n;const o=i<s;const a=this.getMaxDepthOfGeometry();const u=n>a;const c=!o||u;return c}}Vt.MAX_DEPTH_VALUE=2**16-1;class jt{constructor(t){this.scale=t}convertTo(t){return t*this.scale}convertFrom(t){return t/this.scale}}class Dt extends jt{constructor(){super(1)}}class Pt extends jt{constructor(t=1){super(1/Math.pow(10,t))}}class kt extends jt{constructor(t=1){super(1/Math.pow(1e3,t))}}class Tt extends jt{constructor(t=1){super(1/Math.pow(25.4,t))}}class Et extends jt{constructor(t=1){super(1/Math.pow(25.4*12,t))}}class Ot extends jt{constructor(t=1){super(1/Math.pow(25.4*12*3,t))}}class Rt{constructor(t){this.unitType=t;this.unit=Rt.units[t]}convertWorldValueToReal(t){return this.unit.converter.convertTo(t)}convertRealValueToWorld(t){return this.unit.converter.convertFrom(t)}convertWorldPointToReal(t){const e=this.unit.converter.convertTo(t.x);const n=this.unit.converter.convertTo(t.y);const r=this.unit.converter.convertTo(t.z);return{x:e,y:n,z:r}}convertRealPointToWorld(t){const e=this.unit.converter.convertFrom(t.x);const n=this.unit.converter.convertFrom(t.y);const r=this.unit.converter.convertFrom(t.z);return{x:e,y:n,z:r}}}Rt.units={millimeters:{name:"Millimeters",abbreviatedName:"mm",converter:new Dt},centimeters:{name:"Centimeters",abbreviatedName:"cm",converter:new Pt},meters:{name:"Meters",abbreviatedName:"m",converter:new kt},inches:{name:"Inches",abbreviatedName:"in",converter:new Tt},feet:{name:"Feet",abbreviatedName:"ft",converter:new Et},yards:{name:"Yards",abbreviatedName:"yd",converter:new Ot}};class Wt{convertTo(e){return t.toDegrees(e)}convertFrom(e){return t.toRadians(e)}}class zt{constructor(t){this.unitType=t;this.unit=zt.units[t]}convertTo(t){return this.unit.converter.convertTo(t)}convertFrom(t){return this.unit.converter.convertFrom(t)}}zt.units={radians:{name:"Radians",abbreviatedName:"rad",converter:new jt(1)},degrees:{name:"Degrees",abbreviatedName:"deg",converter:new Wt}};class Ft{constructor(t){this.unitType=t;this.unit=Ft.units[t]}convertWorldValueToReal(t){return this.unit.converter.convertTo(t)}convertRealValueToWorld(t){return this.unit.converter.convertFrom(t)}}Ft.units={millimeters:{name:"Square Millimeters",abbreviatedName:"mm²",converter:new Dt},centimeters:{name:"Square Centimeters",abbreviatedName:"cm²",converter:new Pt(2)},meters:{name:"Square Meters",abbreviatedName:"m²",converter:new kt(2)},inches:{name:"Square Inches",abbreviatedName:"in²",converter:new Tt(2)},feet:{name:"Square Feet",abbreviatedName:"ft²",converter:new Et(2)},yards:{name:"Square Yards",abbreviatedName:"yd²",converter:new Ot(2)}};class qt{constructor(t,e){this.pixels=t;this.imageAttr=e}static fromPng(t,e){if(!(t.data instanceof Uint8Array)){throw new Error("Cannot create FeatureMap. Expected decoded PNG to be a Uint8Array.")}else if(t.channels!==4){throw new Error("Cannot create FeatureMap. Missing alpha channel.")}else{return new qt(t.data,{...e,imageRect:s.fromPointAndDimensions(e.imageRect,t)})}}getEntityType(t){const e=this.getColor(t);if((e===null||e===void 0?void 0:e.a)===g.CROSS_SECTION){return g.CROSS_SECTION}else if((e===null||e===void 0?void 0:e.a)===g.GENERIC_GEOMETRY){return g.GENERIC_GEOMETRY}else if((e===null||e===void 0?void 0:e.a)===g.IMPRECISE_EDGE){return g.IMPRECISE_EDGE}else if((e===null||e===void 0?void 0:e.a)===g.IMPRECISE_SURFACE){return g.IMPRECISE_SURFACE}else if((e===null||e===void 0?void 0:e.a)===g.PRECISE_EDGE){return g.PRECISE_EDGE}else if((e===null||e===void 0?void 0:e.a)===g.PRECISE_SURFACE){return g.PRECISE_SURFACE}else{return g.NO_GEOMETRY}}getColor(t){const{width:e,height:n}=this.imageAttr.imageRect;const i=r.subtract(t,this.imageAttr.imageRect);const s=1/this.imageAttr.imageScale;const o=r.scale(i,s,s);if(o.x>=0&&o.y>=0&&o.x<e&&o.y<n){const t=Math.floor(o.x)*4+Math.floor(o.y)*4*e;const n=this.pixels[t];const r=this.pixels[t+1];const i=this.pixels[t+2];const s=this.pixels[t+3];return p.create(n,r,i,s)}else return undefined}}async function Ht(){return import("./p-BUvpJrVN.js")}let Lt;let Gt;const Ut=1;function Yt(){if(Lt==null){console.debug(`Loading PNG worker module`);Lt=Ht()}return Lt}function _t(){var t;if(typeof window!=="undefined"){const e=(t=window.navigator.hardwareConcurrency)!==null&&t!==void 0?t:8;return Math.ceil(e/4)}else{return Ut}}async function Kt(){if(Gt==null){Gt=Yt().then((async({spawnPool:t})=>{const e=_t();console.debug(`Spawning PNG worker pool [size=${e}]`);return t({size:e})}))}return Gt}const Jt=async t=>{const e=await Kt();return e.queue((e=>e(t)))};if(typeof window!=="undefined"){void Kt()}function Qt(t,n){const r=e.magnitude(t);const i=n.radius/r;return e.scale(i,t)}function Xt(t,n,r){const i=e.subtract(r,t);const s=e.dot(n,i);const o=e.magnitudeSquared(n);const a=s/o;const u=e.scale(a,n);return e.add(u,t)}class $t{constructor(t,e,n,r,i,s,o,a,u=w.create()){this.correlationIds=t;this.temporalRefinementCorrelationId=e;this.sequenceNumber=n;this.dimensions=r;this.image=i;this.scene=s;this.depthBufferBytes=o;this.featureMapBytes=a;this.id=u}getId(){return this.id}async depthBuffer(){if(this.cachedDepthBuffer==null){this.cachedDepthBuffer=this.depthBufferBytes!=null?this.decodeDepthBuffer(new Uint8Array(this.depthBufferBytes)):Promise.resolve(undefined)}return this.cachedDepthBuffer}async decodeDepthBuffer(t){const e=await Jt(t);return Vt.fromPng(e,this.scene.camera,this.image.imageAttr)}async featureMap(){if(this.cachedFeatureMap==null){this.cachedFeatureMap=this.featureMapBytes!=null?this.decodeFeatureMap(new Uint8Array(this.featureMapBytes)):Promise.resolve(undefined)}return this.cachedFeatureMap}async decodeFeatureMap(t){const e=await Jt(t);return qt.fromPng(e,this.image.imageAttr)}copy({correlationIds:t,temporalRefinementCorrelationId:e,sequenceNumber:n,dimensions:r,image:i,scene:s,depthBufferBytes:o,featureMapBytes:a}){return new $t(t!==null&&t!==void 0?t:this.correlationIds,e!==null&&e!==void 0?e:this.temporalRefinementCorrelationId,n!==null&&n!==void 0?n:this.sequenceNumber,r!==null&&r!==void 0?r:this.dimensions,i!==null&&i!==void 0?i:this.image,s!==null&&s!==void 0?s:this.scene,o!==null&&o!==void 0?o:this.depthBufferBytes,a!==null&&a!==void 0?a:this.featureMapBytes,this.id)}}class Zt{constructor(t,e){this.imageAttr=t;this.imageBytes=e}}class te{constructor(t,e,n,r,i,s,o){this.camera=t;this.boundingBox=e;this.crossSection=n;this.worldOrientation=r;this.hasChanged=i;this.sceneViewSummary=s;this.modelViewId=o}copy({camera:t,boundingBox:e,crossSection:n,worldOrientation:r,hasChanged:i,sceneViewSummary:s,modelViewId:o}){return new te(t!==null&&t!==void 0?t:this.camera,e!==null&&e!==void 0?e:this.boundingBox,n!==null&&n!==void 0?n:this.crossSection,r!==null&&r!==void 0?r:this.worldOrientation,i!==null&&i!==void 0?i:this.hasChanged,s!==null&&s!==void 0?s:this.sceneViewSummary,o!==null&&o!==void 0?o:this.modelViewId)}}class ee{constructor(t,e,n,r,i,s){this.position=t;this.lookAt=e;this.up=n;this.near=r;this.far=i;this.aspectRatio=s}get direction(){return e.normalize(this.viewVector)}get viewVector(){return e.subtract(this.lookAt,this.position)}get worldMatrix(){return this.computeCameraMatrices().worldMatrix}get viewMatrix(){return this.computeCameraMatrices().viewMatrix}get projectionMatrix(){return this.computeCameraMatrices().projectionMatrix}get projectionMatrixInverse(){return this.computeCameraMatrices().projectionMatrixInverse}get projectionViewMatrix(){return this.computeCameraMatrices().projectionViewMatrix}get frustumProjectionViewMatrix(){return this.computeCameraMatrices().projectionViewMatrix}static fromBoundingBox(t,e,r){var i;const{near:s,far:o}=Mt(e,t);if(pt(t)){const i=n.create(e);const a=Qt(t.viewVector,i);const u=Xt(t.lookAt,a,i.center);return new re(a,u,t.up,s,o,r,t.fovHeight,t.rotationPoint)}else{return new ne(t.position,t.lookAt,t.up,s,o,r,(i=t.fovY)!==null&&i!==void 0?i:45)}}isOrthographic(){return false}isPerspective(){return false}isPointBehindNear(t){const{position:n,direction:r,near:i}=this;const s=e.dot(e.subtract(t,n),r);return s<i}intersectLineWithNear(t){const{position:n,direction:r,near:i}=this;const s=e.subtract(t.start,n);const u=e.subtract(t.end,n);const c=o.create({start:s,end:u});const h=a.create({normal:r,constant:-i});const f=a.intersectLine(h,c);return f!=null?e.add(f,n):undefined}computeCameraMatrices(){if(this.cameraMatrices==null){return{viewMatrix:u.makeIdentity(),worldMatrix:u.makeIdentity(),projectionMatrix:u.makeIdentity(),projectionMatrixInverse:u.makeIdentity(),projectionViewMatrix:u.makeIdentity()}}return this.cameraMatrices}updateCameraMatrices(t){this.cameraMatrices=t;return this.cameraMatrices}}class ne extends ee{constructor(t,e,n,r,i,s,o){super(t,e,n,r,i,s);this.position=t;this.lookAt=e;this.up=n;this.near=r;this.far=i;this.aspectRatio=s;this.fovY=o}toOrthographic(t){return ee.fromBoundingBox(gt(this,t),t,this.aspectRatio)}isPerspective(){return true}computeCameraMatrices(){if(this.cameraMatrices==null){const t=u.makeLookAtView(this.position,this.lookAt,this.up);const e=u.invert(t);const n=u.makePerspective(this.near,this.far,this.fovY,this.aspectRatio);const r=u.invert(n);const i=u.multiply(n,t);return super.updateCameraMatrices({viewMatrix:t,worldMatrix:e,projectionMatrix:n,projectionMatrixInverse:r,projectionViewMatrix:i})}return this.cameraMatrices}}class re extends ee{constructor(t,n,r,i,s,o,a,u){super(e.add(n,e.negate(t)),n,r,i,s,o);this.lookAt=n;this.up=r;this.near=i;this.far=s;this.aspectRatio=o;this.fovHeight=a;this.rotationPoint=u;this.top=a*.5;this.bottom=-this.top;this.right=this.top*o;this.left=-this.right}toPerspective(t){return ee.fromBoundingBox(bt(this),t,this.aspectRatio)}isOrthographic(){return true}get frustumProjectionViewMatrix(){const t=u.makeFrustum(this.left,this.right,this.top,this.bottom,this.near,this.far);return u.multiply(t,this.computeCameraMatrices().viewMatrix)}computeCameraMatrices(){if(this.cameraMatrices==null){const t=u.makeLookAtView(this.position,this.lookAt,this.up);const e=u.invert(t);const n=u.makeOrthographic(this.left,this.right,this.bottom,this.top,this.near,this.far);const r=u.invert(n);const i=u.multiply(n,t);return super.updateCameraMatrices({viewMatrix:t,worldMatrix:e,projectionMatrix:n,projectionMatrixInverse:r,projectionViewMatrix:i})}return this.cameraMatrices}}class ie{constructor(t,e){this.y=t;this.z=e}get matrix(){const t=this.z;const n=this.y;const r=e.cross(n,t);return u.makeBasis(r,n,t)}}ie.DEFAULT=new ie(e.up(),e.back());class se{constructor(t,e){this.position=t;this.up=e}transformMatrix(t){const n=e.transformMatrix(this.position,t);const r=e.transformMatrix(this.up,t);return new se(n,r)}}se.FRONT=new se(e.back(),e.up());se.RIGHT=new se(e.right(),e.up());se.LEFT=new se(e.left(),e.up());se.BACK=new se(e.forward(),e.up());se.TOP=new se(e.up(),e.forward());se.BOTTOM=new se(e.down(),e.back());se.TOP_FRONT_RIGHT=new se(e.add(e.back(),e.up(),e.left()),e.up());se.TOP_FRONT_LEFT=new se(e.add(e.back(),e.up(),e.right()),e.up());se.BOTTOM_FRONT_RIGHT=new se(e.add(e.back(),e.down(),e.left()),e.up());se.BOTTOM_FRONT_LEFT=new se(e.add(e.back(),e.down(),e.right()),e.up());se.TOP_BACK_LEFT=new se(e.add(e.forward(),e.up(),e.right()),e.up());se.TOP_BACK_RIGHT=new se(e.add(e.forward(),e.up(),e.left()),e.up());se.BOTTOM_BACK_LEFT=new se(e.add(e.forward(),e.down(),e.right()),e.up());se.BOTTOM_BACK_RIGHT=new se(e.add(e.forward(),e.down(),e.left()),e.up());se.TOP_FRONT=new se(e.add(e.back(),e.up()),e.up());se.BOTTOM_FRONT=new se(e.add(e.back(),e.down()),e.up());se.FRONT_RIGHT=new se(e.add(e.back(),e.left()),e.up());se.FRONT_LEFT=new se(e.add(e.back(),e.right()),e.up());se.TOP_BACK=new se(e.add(e.forward(),e.up()),e.up());se.BOTTOM_BACK=new se(e.add(e.forward(),e.down()),e.up());se.BACK_LEFT=new se(e.add(e.forward(),e.right()),e.up());se.BACK_RIGHT=new se(e.add(e.forward(),e.left()),e.up());se.TOP_LEFT=new se(e.add(e.up(),e.right()),e.up());se.TOP_RIGHT=new se(e.add(e.up(),e.left()),e.up());se.BOTTOM_LEFT=new se(e.add(e.down(),e.right()),e.up());se.BOTTOM_RIGHT=new se(e.add(e.down(),e.left()),e.up());const oe=m.defineMapper(m.read(m.requiredProp("x"),m.requiredProp("y")),(([t,e])=>r.create(t,e)));const ae=m.defineMapper(m.read(m.requiredProp("width"),m.requiredProp("height")),(([t,e])=>c.create(t,e)));const ue=m.defineMapper(m.read(m.requiredProp("x"),m.requiredProp("y"),m.requiredProp("width"),m.requiredProp("height")),(([t,e,n,r])=>s.create(t,e,n,r)));const ce=m.defineMapper(m.read(m.requiredProp("x"),m.requiredProp("y"),m.requiredProp("z")),(([t,n,r])=>e.create(t,n,r)));const he=m.defineMapper(m.read(m.requiredProp("xmin"),m.requiredProp("ymin"),m.requiredProp("zmin"),m.requiredProp("xmax"),m.requiredProp("ymax"),m.requiredProp("zmax")),(([t,n,r,i,s,o])=>h.create(e.create(t,n,r),e.create(i,s,o))));const fe=m.defineMapper(m.read(m.requiredProp("d"),m.mapRequiredProp("normal",ce)),(([t,e])=>a.create({normal:e,constant:t})));const le=m.defineMapper(m.read(m.requiredProp("x"),m.requiredProp("y"),m.requiredProp("z"),m.requiredProp("w")),(([t,e,n,r])=>f.create({x:t,y:e,z:n,w:r})));const ve=m.defineMapper(m.read(m.mapRequiredProp("r0",le),m.mapRequiredProp("r1",le),m.mapRequiredProp("r2",le),m.mapRequiredProp("r3",le)),(([t,e,n,r])=>u.fromValues(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,n.x,n.y,n.z,n.w,r.x,r.y,r.z,r.w)));const de=m.defineMapper(m.read(m.requiredProp("r"),m.requiredProp("g"),m.requiredProp("b")),(([t,e,n])=>p.create(t,e,n)));const me=m.defineMapper((t=>{function e(t){return{r:t.r,g:t.g,b:t.b}}if(typeof t==="string"){const n=p.fromHexString(t);return n!=null?e(n):{errors:["String is not a valid color."]}}else if(typeof t==="number"){return e(p.fromNumber(t))}else{return e(t)}}),(t=>t));Me();const pe=Me();const we=Me();const ge=xe();const be=xe();const ye=xe();function Me(){return m.defineMapper((t=>t!=null?{value:t}:undefined),(t=>t))}function xe(){return m.defineMapper((t=>(t===null||t===void 0?void 0:t.value)||undefined),(t=>t))}const Ne=m.defineMapper(m.read(m.mapProp("position",m.compose(m.required("position"),ce)),m.mapProp("lookAt",m.compose(m.required("lookAt"),ce)),m.mapProp("up",m.compose(m.required("up"),ce)),m.getProp("fovY")),(([t,e,n,r])=>({position:t,lookAt:e,up:n,fovY:(r===null||r===void 0?void 0:r.value)!=null?r.value:45})));const Ie=m.defineMapper(m.read(m.mapProp("viewVector",m.compose(m.required("viewVector"),ce)),m.mapProp("lookAt",m.compose(m.required("lookAt"),ce)),m.mapProp("up",m.compose(m.required("up"),ce)),m.mapProp("fovHeight",m.required("fovHeight"))),(([t,e,n,r])=>({viewVector:t,lookAt:e,up:n,fovHeight:r})));const Se=m.defineMapper(m.read(m.mapProp("position",m.ifDefined(ce)),m.mapProp("lookAt",m.ifDefined(ce)),m.mapProp("up",m.ifDefined(ce)),m.mapProp("perspective",m.ifDefined(Ne)),m.mapProp("orthographic",m.ifDefined(Ie))),(([t,n,r,i,s])=>{var o;return(o=i!==null&&i!==void 0?i:s)!==null&&o!==void 0?o:{position:t!==null&&t!==void 0?t:e.back(),lookAt:n!==null&&n!==void 0?n:e.origin(),up:r!==null&&r!==void 0?r:e.up(),fovY:45}}));const Be=m.defineMapper(m.read(m.mapProp("normal",m.compose(m.required("normal"),ce)),m.requiredProp("offset")),(([t,e])=>({normal:t,offset:e})));const Ce=m.defineMapper(m.read(m.mapProp("frameDimensions",m.compose(m.required("frameDimensions"),ae)),m.mapProp("imageRect",m.compose(m.required("imageRect"),ue)),m.mapProp("scaleFactor",m.required("scaleFactor"))),(([t,e,n])=>({frameDimensions:t,imageRect:e,imageScale:n})));const Ae=m.defineMapper(m.read(m.mapProp("sectionPlanes",m.compose(m.required("sectionPlanes"),m.mapArray(Be))),m.mapProp("highlightColor",m.ifDefined(de))),(([t,e])=>It({sectionPlanes:t,highlightColor:e||undefined})));const Ve=m.defineMapper(m.read(m.requiredProp("count"),m.mapProp("boundingBox",m.ifDefined(he))),(([t,e])=>({count:t,boundingBox:e!==null&&e!==void 0?e:undefined})));const je=m.defineMapper(m.read(m.mapProp("visibleSummary",m.ifDefined(Ve)),m.mapProp("selectedVisibleSummary",m.ifDefined(Ve))),(([t,e])=>Bt({visibleSummary:t!==null&&t!==void 0?t:undefined,selectedVisibleSummary:e!==null&&e!==void 0?e:undefined})));const De=m.defineMapper(m.read(m.mapProp("imageAttributes",m.compose(m.required("imageAttributes"),Ce))),(([t])=>t));const Pe=m.defineMapper(m.read(De,m.mapProp("image",m.required("image"))),(([t,e])=>new Zt(t,e)));const ke=m.defineMapper(m.read(m.mapRequiredProp("camera",Se),m.mapRequiredProp("visibleBoundingBox",he),m.mapRequiredProp("crossSectioning",Ae),m.requiredProp("hasChanged"),m.mapRequiredProp("displayListSummary",je),m.mapProp("modelViewId",m.ifDefined(Z))),(([t,e,n,r,i,s])=>({camera:t,boundingBox:e,crossSectioning:n,hasChanged:r,displayListSummary:i,modelViewId:s!=null?s:undefined})));const Te=m.defineMapper(m.read(m.mapProp("sceneAttributes",m.compose(m.required("sceneAttributes"),ke))),(([t])=>t));const Ee=m.defineMapper(m.read(Te,De),(([t,e])=>ee.fromBoundingBox(t.camera,t.boundingBox,c.aspectRatio(e.frameDimensions))));function Oe(t){return m.defineMapper(m.read(Te,Ee),(([e,n])=>new te(n,e.boundingBox,e.crossSectioning,t,e.hasChanged,e.displayListSummary,e.modelViewId)))}function Re(t){return m.defineMapper(m.read(m.mapProp("frameCorrelationIds",(t=>t!=null?t:[])),m.requiredProp("sequenceNumber"),m.compose(De,m.getProp("frameDimensions")),Oe(t),Pe,m.mapProp("depthBuffer",be),m.mapProp("featureMap",be),m.mapProp("temporalRefinementCorrelationId",(t=>t!=null?$(t):null))),(([t,e,n,r,i,s,o,a])=>new $t(t,a||"",e,n,i,r,s,o)))}function We(t){return m.ifInvalidThrow(Re(t))}const ze=m.defineMapper(m.compose(m.required("orientation"),m.read(m.mapProp("up",m.compose(m.required("up"),ce)),m.mapProp("front",m.compose(m.required("front"),ce)))),(([t,e])=>new ie(t,e)));m.ifInvalidThrow(ze);const Fe=m.defineMapper(m.read(m.mapRequiredProp("imageAttributes",Ce),m.requiredProp("stencilBuffer"),m.mapRequiredProp("depthBuffer",m.compose(be,m.required("depthBuffer")))),(([t,e,n])=>({imageAttributes:t,stencilBuffer:e,depthBuffer:n})));const qe=Le("stencilBuffer",Fe);const He=m.ifInvalidThrow(qe);function Le(t,e){return m.mapRequiredProp(t,e)}const Ge=m.defineMapper(m.read(m.requiredProp("token"),m.requiredProp("expiresIn")),(([t,e])=>vt.create(t,e)));const Ue=m.defineMapper(m.read(m.compose(m.requiredProp("startStream"),m.mapRequiredProp("streamId",$)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("sceneId",$)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("sceneViewId",$)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("sessionId",$)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("worldOrientation",ze)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("token",Ge))),(([t,e,n,r,i,s])=>({streamId:t,sceneId:e,sceneViewId:n,sessionId:r,worldOrientation:i,token:s})));const Ye=m.ifInvalidThrow(Ue);const _e=m.defineMapper(m.read(m.compose(m.requiredProp("reconnect"),m.mapRequiredProp("token",Ge))),(([t])=>({token:t})));const Ke=m.ifInvalidThrow(_e);const Je=m.defineMapper(m.compose(m.requiredProp("refreshToken"),m.requiredProp("token"),Ge),(t=>t));const Qe=m.ifInvalidThrow(Je);const Xe=m.defineMapper(m.compose(m.requiredProp("syncTime"),m.requiredProp("replyTime"),m.read(m.requiredProp("seconds"),m.requiredProp("nanos"))),(([t,e])=>d({seconds:t,nanos:e})));const $e=m.ifInvalidThrow(Xe);const Ze=m.defineMapper(m.ifDefined(m.getProp("next")),(t=>t!=null?t:undefined));const tn=m.defineMapper((t=>{switch(t){case"all":return{enabled:{value:true},frameType:v.protobuf.stream.FrameType.FRAME_TYPE_ALL};case"final":return{enabled:{value:true},frameType:v.protobuf.stream.FrameType.FRAME_TYPE_FINAL};default:return{enabled:{value:false},frameType:v.protobuf.stream.FrameType.FRAME_TYPE_INVALID}}}),(t=>t));const en=m.defineMapper(m.read(m.ifDefined(m.getProp("opacity"))),(([t])=>({opacity:{value:l(t!==null&&t!==void 0?t:0,0,1)}})));const nn=m.defineMapper(m.read(m.ifDefined(m.getProp("width")),m.ifDefined(m.mapProp("color",m.ifDefined(me)))),(([t,e])=>({lineWidth:t,lineColor:e})));const rn=m.defineMapper(m.read(m.ifDefined(m.mapProp("color",m.ifDefined(me))),m.ifDefined(m.mapProp("opacity",pe)),m.ifDefined(m.getProp("lineWidth"))),(([t,e,n])=>{if(t||e||n){return{color:t,opacity:e,lineWidth:n}}else return undefined}));const sn=m.defineMapper(m.read(m.ifDefined(m.mapProp("highlightColor",m.ifDefined(me))),m.ifDefined(m.mapProp("occludedOpacity",pe)),m.ifDefined(m.mapProp("outline",m.ifDefined(nn)))),(([t,e,n])=>({highlightColor:t,occludedOpacity:e,outline:n})));const on=m.defineMapper((t=>!!t),(t=>t));const an=m.defineMapper((t=>t!==null&&t!==void 0?t:""),(t=>t));const un=m.defineMapper(m.read(m.ifDefined(m.mapProp("frameBackgroundColor",m.ifDefined(me)))),(([t])=>({frameBackgroundColor:t})));const cn=m.defineMapper(m.read(m.ifDefined(m.mapProp("streamKeyToCompare",m.ifDefined(we)))),(([t])=>({streamKeyToCompare:t})));const hn=m.defineMapper(m.read(m.ifDefined(m.mapProp("endCapEnabled",(t=>!!t))),m.ifDefined(m.mapProp("endCapColor",m.ifDefined(me)))),(([t,e])=>({endCapEnabled:t,endCapColor:e})));const fn=m.defineMapper(m.read(m.mapProp("depthBuffers",tn),m.mapProp("phantom",en),m.mapProp("noDefaultLights",on),m.mapProp("featureLines",nn),m.mapProp("featureHighlighting",sn),m.mapProp("featureMaps",tn),m.mapProp("experimentalRenderingOptions",an),m.mapProp("selectionHighlighting",rn),m.mapProp("frames",un),m.mapProp("sceneComparison",cn),m.mapProp("crossSectioning",hn)),(([t,e,n,r,i,s,o,a,u,c,h])=>{const f={depthBuffers:t,phantomItems:e,noDefaultLights:n,featureLines:r,featureHighlighting:i,featureMaps:s,experimentalRenderingOptions:o,selectionHighlighting:a,frames:u,sceneComparison:c,crossSectioningAttributes:h};return f}));export{zt as A,b as B,We as C,Rt as D,Ye as E,ee as F,Ke as G,$e as H,Qe as I,Ct as J,y as K,gt as L,bt as M,dt as N,ie as O,B as P,wt as Q,Mt as R,se as S,Qt as T,tt as U,fe as V,$t as a,Zt as b,St as c,te as d,re as e,ne as f,Ft as g,He as h,Jt as i,Vt as j,x as k,N as l,ye as m,ce as n,M as o,oe as p,de as q,Ze as r,I as s,yt as t,Xt as u,ve as v,ge as w,he as x,fn as y,me as z};
|
|
24
|
+
//# sourceMappingURL=p-CrcoZmKt.js.map
|