@vertexvis/viewer 1.0.0-testing.3 → 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import{b as a,c as s}from"./p-zTYgyBoa.js";import{m as t}from"./p-BZtylp5V.js";import{V as n,n as e}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{b as a,c as s}from"./p-zTYgyBoa.js";import{m as t}from"./p-BZtylp5V.js";import{V as n,n as e}from"./p-DLV-gg65.js";var o=a();const p=t.defineMapper(t.read(t.mapRequiredProp("start",n),t.mapRequiredProp("end",n)),(([a,s])=>({start:a,end:s})));const c=t.defineMapper(t.read(t.getProp("distance"),t.mapRequiredProp("planes",t.compose(p,t.requiredProp("start"))),t.mapRequiredProp("planes",t.compose(p,t.requiredProp("end")))),(([a,s,t])=>({type:"planar-distance",distance:a,plane1:s,plane2:t})));const r=t.defineMapper(t.read(t.getProp("angleInRadians"),t.mapRequiredProp("planes",t.compose(p,t.requiredProp("start"))),t.mapRequiredProp("planes",t.compose(p,t.requiredProp("end")))),(([a,s,t])=>({type:"planar-angle",angle:a,plane1:s,plane2:t})));const i=t.defineMapper(t.read(t.getProp("distance"),t.mapRequiredProp("closestPoint1",e),t.mapRequiredProp("closestPoint2",e)),(([a,s,t])=>({type:"minimum-distance",distance:a,point1:s,point2:t})));const l=t.defineMapper(t.read(t.getProp("area")),(([a])=>({type:"surface-area",area:a})));const m=t.mapProp("planarDistance",t.ifDefined(c));const d=t.mapProp("planarAngle",t.ifDefined(r));const u=t.mapProp("minimumDistance",t.ifDefined(i));const g=t.mapProp("totalSurfaceArea",t.ifDefined(l));const f=t.compose(t.pickFirst(m,d,u,g),t.required("Result field"));const y=t.defineMapper(t.read(t.mapRequiredProp("outcome",t.mapRequiredProp("resultsList",t.mapArray(f))),t.mapRequiredProp("outcome",t.getProp("isApproximate"))),(([a,s])=>({results:a,isApproximate:s})));const A=t.ifInvalidThrow(y);var j=s();export{o as a,j as g,A as m};
|
|
5
|
+
//# sourceMappingURL=p-Bmj32MLp.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import{o as e}from"./p-BZtylp5V.js";import{d as t}from"./p-CPk-nchx.js";import"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{o as e}from"./p-BZtylp5V.js";import{d as t}from"./p-CPk-nchx.js";import"./p-DLV-gg65.js";const s=500;const r={durationMs:s};const n={throttleFrameDelivery:true,adaptiveRendering:true,logWsMessages:false,logFrameRate:false,letterboxFrames:false,grpcUseStreamingWebSocketTransport:true};const o={finePointerThreshold:1,coarsePointerThreshold:3,interactionDelay:75,useMinimumPerspectiveZoomDistance:true,mouseWheelInteractionEndDebounce:400,reverseMouseWheelDirection:false};const i={network:{apiHost:"https://platform.platprod.vertexvis.io",renderingHost:"wss://stream.platprod.vertexvis.io",sceneTreeHost:"https://scene-trees.platprod.vertexvis.io",sceneViewHost:"https://scenes.platprod.vertexvis.io"},flags:n,events:t,animation:r,interactions:o,EXPERIMENTAL_frameDelivery:{},EXPERIMENTAL_adaptiveRendering:{},EXPERIMENTAL_qualityOfService:{},EXPERIMENTAL_annotationPollingIntervalInMs:undefined};const a={...i,network:{apiHost:"https://platform.platdev.vertexvis.io",renderingHost:"wss://stream.platdev.vertexvis.io",sceneTreeHost:"https://scene-trees.platdev.vertexvis.io",sceneViewHost:"https://scenes.platdev.vertexvis.io"}};const p={...i,network:{apiHost:"https://platform.platstaging.vertexvis.io",renderingHost:"wss://stream.platstaging.vertexvis.io",sceneTreeHost:"https://scene-trees.platstaging.vertexvis.io",sceneViewHost:"https://scenes.platstaging.vertexvis.io"}};function c(e){switch(e){case"platdev":return a;case"platstaging":return p;default:return i}}function l(e="platprod",t){const s=v(e,t);return u(d(s))}function v(t="platprod",s){if(typeof s==="string"){s=JSON.parse(s)}const r=c(t);if(s==null){return r}else{return e.defaults({...s},r)}}function d(e){const t=e.network.apiHost.trim();const s=e.network.renderingHost.trim();const r=e.network.sceneTreeHost.trim();const n=e.network.sceneViewHost.trim();return{...e,network:{...e.network,apiHost:t,renderingHost:s,sceneTreeHost:r,sceneViewHost:n}}}function u(e){g(e.network,"apiHost","https://");g(e.network,"renderingHost","wss://");g(e.network,"sceneTreeHost","https://");g(e.network,"sceneViewHost","https://");return e}function g(e,t,s){if(!e[t].startsWith(s)){throw new Error(`Invalid ${t} "${e[t]}" specified. The URL must start with the ${s} scheme.`)}}export{l as p};
|
|
5
|
+
//# sourceMappingURL=p-Bo49wgwt.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import{h as e,F as t,t as r,p as s,H as a,e as n}from"./p-DmsAWRoU.js";import"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{h as e,F as t,t as r,p as s,H as a,e as n}from"./p-DmsAWRoU.js";import"./p-Bmj32MLp.js";import"./p-zTYgyBoa.js";import"./p-ux1ckSDN.js";import"./p-DJFjBgT7.js";import"./p-DLV-gg65.js";import{M as i}from"./p-BgzShg1O.js";import{l as o,p as l}from"./p-Tvs4yxd5.js";import{d as m}from"./p-Xr7Oa6iw.js";function v(e,t){const{camera:r,viewport:s}=t;const a=r.isPointBehindNear(e.start);const n=r.isPointBehindNear(e.end);if(a||n){const t=r.intersectLineWithNear(e);const i=o.create({start:a&&t!=null?t:e.start,end:n&&t!=null?t:e.end});const l=o.transformMatrix(i,r.projectionViewMatrix);return{start:s.transformVectorToViewport(l.start),end:s.transformVectorToViewport(l.end),hideStart:a,hideEnd:n}}else{const t=o.transformMatrix(e,r.projectionViewMatrix);return{start:s.transformVectorToViewport(t.start),end:s.transformVectorToViewport(t.end),hideStart:false,hideEnd:false}}}function d(e,t,r){const{start:s,end:a,hideStart:n,hideEnd:i}=v(e,r);const o=l.lerp(s,a,.5);const m=t!=="none"?c(e,t,r):undefined;return{startPt:s,endPt:a,labelPt:o,indicatorPt:m,hideStart:n,hideEnd:i}}function c(e,t,r){return r.viewport.transformWorldToViewport(t==="start"?e.start:e.end,r.camera.projectionViewMatrix)}const u=({overlay:t,viewport:r,camera:s})=>{if(t.type==="line"){return e(h,{overlay:t,viewport:r,camera:s})}else{return e(p,{overlay:t,viewport:r,camera:s})}};const h=({overlay:t,camera:r,viewport:s})=>{const{start:a,end:n}=v(t,{camera:r,viewport:s});return e("vertex-viewer-measurement-line",{class:"measurement-line",start:a,end:n})};const p=({overlay:{x:r,y:s,z:a},camera:n,viewport:i})=>{const o={camera:n,viewport:i};const{start:l,end:m}=v(r,o);const{start:d,end:c}=v(s,o);const{start:u,end:h}=v(a,o);return e(t,null,e("vertex-viewer-measurement-line",{class:"measurement-line distance-vector-x",start:l,end:m}),e("vertex-viewer-measurement-line",{class:"measurement-line distance-vector-y",start:d,end:c}),e("vertex-viewer-measurement-line",{class:"measurement-line distance-vector-z",start:u,end:h}))};const w=()=>`:host{display:block;position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none;--viewer-measurement-overlays-x-axis-color:var(--x-axis-color);--viewer-measurement-overlays-y-axis-color:var(--y-axis-color);--viewer-measurement-overlays-z-axis-color:var(--z-axis-color)}.measurement-line{position:absolute;width:100%;height:100%}.measurement-line.distance-vector-x{--viewer-measurement-line-fill:var( --viewer-measurement-overlays-x-axis-color )}.measurement-line.distance-vector-y{--viewer-measurement-line-fill:var( --viewer-measurement-overlays-y-axis-color )}.measurement-line.distance-vector-z{--viewer-measurement-line-fill:var( --viewer-measurement-overlays-z-axis-color )}`;const y=s(class t extends a{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.measurementOverlays=new i;this.overlays=[];this.updateCamera=()=>{var e,t;this.camera=(t=(e=this.viewer)===null||e===void 0?void 0:e.frame)===null||t===void 0?void 0:t.scene.camera}}handleMeasurementOverlaysChanged(){this.removeModelListeners();this.addModelListeners();this.updateOverlays()}handleViewerChanged(e,t){this.removeViewerListeners(t);this.addViewerListeners();this.updateCamera()}componentWillLoad(){this.addModelListeners();this.addViewerListeners();this.updateOverlays();this.updateCamera()}addModelListeners(){this.onOverlaysChangedListener=this.measurementOverlays.onOverlaysChanged((()=>this.updateOverlays()))}removeModelListeners(){var e;(e=this.onOverlaysChangedListener)===null||e===void 0?void 0:e.dispose();this.onOverlaysChangedListener=undefined}addViewerListeners(){var e;(e=this.viewer)===null||e===void 0?void 0:e.addEventListener("frameReceived",this.updateCamera)}removeViewerListeners(e){e===null||e===void 0?void 0:e.removeEventListener("frameReceived",this.updateCamera)}updateOverlays(){this.overlays=this.measurementOverlays.getOverlays()}render(){return e(n,{key:"fbda189899fa87c57b11615693d1319eee341fea"},this.overlays.map((t=>{if(this.camera!=null&&this.viewer!=null){return e(u,{overlay:t,viewport:this.viewer.viewport,camera:this.camera})}})))}static get watchers(){return{measurementOverlays:[{handleMeasurementOverlaysChanged:0}],viewer:[{handleViewerChanged:0}]}}static get style(){return w()}},[1,"vertex-viewer-measurement-overlays",{measurementOverlays:[16],camera:[1040],viewer:[16],overlays:[32]},undefined,{measurementOverlays:[{handleMeasurementOverlaysChanged:0}],viewer:[{handleViewerChanged:0}]}]);function f(){if(typeof customElements==="undefined"){return}const e=["vertex-viewer-measurement-overlays","vertex-viewer-measurement-line"];e.forEach((e=>{switch(e){case"vertex-viewer-measurement-overlays":if(!customElements.get(r(e))){customElements.define(r(e),y)}break;case"vertex-viewer-measurement-line":if(!customElements.get(r(e))){m()}break}}))}f();export{y as V,f as d,d as g};
|
|
5
|
+
//# sourceMappingURL=p-BvOB1WAv.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import{h as e,F as i,t,p as n,H as o}from"./p-DmsAWRoU.js";import{p as s,m as r,v as a}from"./p-Tvs4yxd5.js";import"./p-CApzdHGy.js";import"./p-Bn7QEZYW.js";import"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{h as e,F as i,t,p as n,H as o}from"./p-DmsAWRoU.js";import{p as s,m as r,v as a}from"./p-Tvs4yxd5.js";import"./p-CApzdHGy.js";import"./p-Bn7QEZYW.js";import"./p-Bmj32MLp.js";import"./p-zTYgyBoa.js";import"./p-ux1ckSDN.js";import"./p-DJFjBgT7.js";import"./p-DLV-gg65.js";import"./p-CHQ7ZKZd.js";import{V as l}from"./p-Dpyl9pSp.js";import{d,P as c,t as p}from"./p-CtymEaB-.js";import{g as h,i as v,a as u,P as m}from"./p-Ccd2Gd94.js";import{c as b}from"./p-C6gMOKYg.js";import{d as f}from"./p-x3bWmPis.js";import{d as w}from"./p-nGQgu0fu.js";import{d as x}from"./p-cA2Urxsr.js";const y=({pin:t,selected:n,occluded:o,detached:s})=>{const{primaryColor:r}=h(t);return e(i,null,u(t)&&e("div",{id:"pin-anchor",class:b("pin-anchor",{selected:n,"pin-occluded":o,"pin-detached":s}),style:{background:r}}),v(t)&&e("vertex-viewer-icon",{name:"pin-fill",size:"lg",class:b("pin",{"pin-selected":n,"pin-occluded":o,"pin-detached":s}),style:{color:r}}))};function g(e,i,t){const n={x:e.x+t.width/2,y:e.y};const o={x:e.x+t.width/2,y:e.y+t.height};const r={x:e.x+t.width,y:e.y+t.height/2};const a={x:e.x,y:e.y+t.height/2};const l=[n,o,a,r];const d=l.map((e=>s.distance(e,i)));const c=d.indexOf(Math.min(...d));return l[c]}const P=()=>`:host{--viewer-annotations-pin-primary-color:var(--blue-700);--viewer-annotations-pin-accent-color:var(--blue-200);--viewer-annotations-pin-dot-color:var(--viewer-annotations-pin-primary-color);--viewer-annotations-pin-color:var(--viewer-annotations-pin-primary-color);--viewer-annotations-pin-font-size:0.75rem;--viewer-annotations-pin-selected-stroke:var(--white);--viewer-annotations-pin-selected-border:2px solid var(--white);--viewer-annotations-pin-label-border:2px solid var(--black);--viewer-annotations-pin-selected-stroke:var(--white);font-size:var(--viewer-annotations-pin-font-size);position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden;pointer-events:none}.pin-anchor{position:absolute;border-radius:50%;transform:translate(-50%, -50%);display:block;width:9px;height:9px;box-sizing:border-box;border:var(--viewer-annotations-pin-label-border);background:var(--viewer-annotations-pin-dot-color);pointer-events:auto;cursor:pointer}.selected{width:13px;height:13px;border:var(--viewer-annotations-pin-selected-border)}.pin{color:var(--viewer-annotations-pin-color);cursor:pointer;transition:opacity 0.3s ease-in;transform:translate(0px, -12px)}.pin-selected{stroke-width:1;stroke:var(--viewer-annotations-pin-selected-stroke)}.pin-occluded{opacity:.3;transition:opacity 0.3s ease-in}.pin-detached{visibility:hidden}`;const k=n(class t extends o{constructor(e){super();if(e!==false){this.__registerHost()}this.matrix=r.makeIdentity();this.projectionViewMatrix=r.makeIdentity();this.pinModel=new m;this.selected=false;this.occluded=false;this.detached=false;this.invalidateStateCounter=0;this.invalidateState=()=>{this.invalidateStateCounter=this.invalidateStateCounter+1}}componentDidLoad(){var e;this.setLabelObserver();if(this.pinController==null){this.pinController=new c(this.pinModel)}if(this.selected){(e=this.labelEl)===null||e===void 0?void 0:e.setFocus()}}async handleOcclusionStateChanged(e){this.occluded=e.detail}async handleDetachedStateChanged(e){this.detached=e.detail}disconnectedCallback(){var e,i;(e=this.labelEl)===null||e===void 0?void 0:e.removeEventListener("labelChanged",this.invalidateState);(i=this.resizeObserver)===null||i===void 0?void 0:i.disconnect()}render(){var t;if(this.pin==null){throw new Error("Unable to draw pin")}const{pinPoint:n,labelPoint:o}=this.computePinPoints(this.pin);return e(i,{key:"b26f95c0e4b86b263eca80c5db8576ef1c787b26"},e("vertex-viewer-dom-element",{key:"9fcb9d0f55f9abb3397db4051ed59c7a05d4ae6a","data-testid":`drawn-pin-${this.pin.id}`,position:this.pin.worldPosition,onPointerDown:async()=>{var e;await((e=this.labelEl)===null||e===void 0?void 0:e.submit());this.selectPin();this.handleAnchorPointerDown()},detachedOff:false},e(y,{key:"2264652f4c83539f47af324f6937fb6581edafe1",pin:this.pin,selected:this.selected,occluded:this.occluded,detached:this.detached})),u(this.pin)&&!this.occluded&&!this.detached&&e(i,{key:"04c86f573b99fb320b0a651dc903131e6654bd9e"},e("vertex-viewer-pin-label-line",{key:"cec6ee8195fba5fadd9e1b272abd61b6b6dd05c6",id:`pin-label-line-${(t=this.pin)===null||t===void 0?void 0:t.id}`,pinPoint:n,pin:this.pin,labelPoint:o,onPointerDown:()=>this.selectPin()}),e("vertex-viewer-pin-label",{key:"556a36ac8e9046b0e40c6973c1ecf47319f28ab6",pin:this.pin,ref:e=>this.labelEl=e,elementBounds:this.elementBounds,pinController:this.pinController,onPointerDown:()=>this.selectPin()})))}setLabelObserver(){if(this.labelEl!=null){this.labelEl.addEventListener("labelChanged",this.invalidateState);this.resizeObserver=new ResizeObserver((()=>this.invalidateState()));this.resizeObserver.observe(this.labelEl)}}computePinPoints(e){if(this.elementBounds!=null&&this.pin!=null){return u(this.pin)&&this.pin.label.point!=null?this.computeTextPinPoints(this.pin,this.elementBounds):this.computeDefaultPinPoints(this.pin,this.elementBounds)}return{pinPoint:e.worldPosition}}computeDefaultPinPoints(e,i){return{pinPoint:this.getFromWorldPosition(e.worldPosition,this.projectionViewMatrix,i)}}computeTextPinPoints(e,i){var t,n,o,s;const{pinPoint:r}=this.computeDefaultPinPoints(e,i);const a=p(e.label.point,i);const l=((n=(t=this.labelEl)===null||t===void 0?void 0:t.firstElementChild)===null||n===void 0?void 0:n.clientWidth)||0;const d=((s=(o=this.labelEl)===null||o===void 0?void 0:o.firstElementChild)===null||s===void 0?void 0:s.clientHeight)||0;return{pinPoint:r,labelPoint:g(a,r,{width:l,height:d})}}handleAnchorPointerDown(){var e,i;if(this.elementBounds!=null&&((e=this.pinController)===null||e===void 0?void 0:e.getToolMode())==="edit"&&this.pin!=null){(i=this.pinController)===null||i===void 0?void 0:i.setDraggable({id:this.pin.id})}}selectPin(){var e,i;(e=this.pinController)===null||e===void 0?void 0:e.setSelectedPinId((i=this.pin)===null||i===void 0?void 0:i.id)}getFromWorldPosition(e,i,t){const n=a.transformMatrix(e,i);return l.fromDimensions(t).transformVectorToViewport(n)}static get style(){return P()}},[0,"vertex-viewer-pin-group",{pin:[16],matrix:[1040],projectionViewMatrix:[16],elementBounds:[1040],pinModel:[16],pinController:[16],selected:[4],occluded:[1540],detached:[1540],invalidateStateCounter:[32]},[[0,"occlusionStateChanged","handleOcclusionStateChanged"],[0,"detachedStateChanged","handleDetachedStateChanged"]]]);function j(){if(typeof customElements==="undefined"){return}const e=["vertex-viewer-pin-group","vertex-viewer-dom-element","vertex-viewer-icon","vertex-viewer-pin-label","vertex-viewer-pin-label-line"];e.forEach((e=>{switch(e){case"vertex-viewer-pin-group":if(!customElements.get(t(e))){customElements.define(t(e),k)}break;case"vertex-viewer-dom-element":if(!customElements.get(t(e))){f()}break;case"vertex-viewer-icon":if(!customElements.get(t(e))){w()}break;case"vertex-viewer-pin-label":if(!customElements.get(t(e))){d()}break;case"vertex-viewer-pin-label-line":if(!customElements.get(t(e))){x()}break}}))}j();export{k as V,j as d};
|
|
5
|
+
//# sourceMappingURL=p-BygjJ1WP.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import{m as t,a as s,g as i}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{m as t,a as s,g as i}from"./p-Bmj32MLp.js";import{s as n,w as e}from"./p-zTYgyBoa.js";import{r,c as o}from"./p-CjG1fMh1.js";import{v as h}from"./p-DJFjBgT7.js";import{m as a}from"./p-BZtylp5V.js";import{n as c}from"./p-DLV-gg65.js";class m{constructor(t,s,i,n){this.model=t;this.client=s;this.jwtProvider=i;this.deviceId=n;this.outcome=Promise.resolve(undefined)}addEntity(t){return this.performMeasurement((()=>this.model.addEntity(t)))}clearEntities(){return this.performMeasurement((()=>{this.model.clearEntities();this.model.clearOutcome();return true}))}removeEntity(t){return this.performMeasurement((()=>this.model.removeEntity(t)))}setEntities(t){return this.performMeasurement((()=>this.model.setEntities(t)))}performMeasurement(t){const s=this.model.getEntities();const i=t();const n=this.model.getEntities();if(i){this.measureAndUpdateModel(n);this.highlightEntities(s,n)}return this.outcome}measureAndUpdateModel(t){if(t.length>0){this.outcome=this.measureEntities(t).then((t=>{this.model.setOutcome(t);return this.model.getOutcome()}))}else{this.outcome=Promise.resolve(undefined)}}async measureEntities(s){if(s.length>0){const i=await r((async t=>{const i=await o(this.jwtProvider,this.deviceId);const e=new n.MeasureRequest;e.setEntitiesList(s.map((t=>t.toProto())));this.client.measure(e,i,t)}));return t(i.toObject())}else{return undefined}}async highlightEntities(t,i){await r((async r=>{const h=await o(this.jwtProvider,this.deviceId);const a=new Set(i);const c=t.filter((t=>!a.has(t)));const m=c.map((t=>{const i=new n.ModelEntityUpdate;i.setModelEntity(s.ModelEntity.deserializeBinary(t.modelEntity));i.setHighlight((new e.BoolValue).setValue(false));return i}));const u=i.map((t=>{const i=new n.ModelEntityUpdate;i.setModelEntity(s.ModelEntity.deserializeBinary(t.modelEntity));i.setHighlight((new e.BoolValue).setValue(true));return i}));const f=new n.UpdateModelEntitiesRequest;f.setUpdatesList([...m,...u]);this.client.updateModelEntities(f,h,r)}))}}class u{constructor(t,s){this.point=t;this.modelEntity=s}static fromHit(t){if(t.hitPoint!=null&&t.modelEntity!=null){const s=a.ifInvalidThrow(c)(t.hitPoint);const i=h.protobuf.core.ModelEntity.encode(t.modelEntity).finish();return new u(s,i)}else{throw new Error("Cannot create MeasurementEntity from Hit. Hit is missing hit point and model entity")}}toProto(){const t=new n.MeasureEntity;const e=new i.Vector3f;e.setX(this.point.x);e.setY(this.point.y);e.setZ(this.point.z);t.setPoint(e);const r=s.ModelEntity.deserializeBinary(this.modelEntity);t.setModelEntity(r);return t}}export{m as M,u as a};
|
|
5
|
+
//# sourceMappingURL=p-CGpWfqFr.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import{d as s,e as a,f as e}from"./p-zTYgyBoa.js";import{m as o}from"./p-BZtylp5V.js";import{k as t,r as i,W as n}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{d as s,e as a,f as e}from"./p-zTYgyBoa.js";import{m as o}from"./p-BZtylp5V.js";import{k as t,r as i,W as n}from"./p-DLV-gg65.js";var d=s();var m=a();const r=o.defineMapper(o.read(o.mapRequiredProp("id",t),o.getProp("displayName"),o.mapRequiredProp("partRevisionId",t)),(([s,a,e])=>({id:s,displayName:a,partRevisionId:e})));const p=o.defineMapper(o.read(o.mapProp("modelViewsList",o.mapArray(r)),o.mapProp("nextPageCursor",i)),(([s,a])=>({modelViews:s,paging:{next:a}})));const c=o.ifInvalidThrow(p);const g=o.defineMapper(o.read(o.mapProp("modelViewId",n),o.mapProp("sceneItemId",n)),(([s,a])=>({modelViewId:s,sceneItemId:a})));const l=o.ifInvalidThrow(g);const I=o.defineMapper(o.read(o.mapRequiredProp("id",t),o.getProp("displayName")),(([s,a])=>({id:s,displayName:a})));const y=o.defineMapper(o.read(o.mapProp("annotationsList",o.mapArray(I)),o.mapProp("nextPageCursor",i)),(([s,a])=>({annotations:s,paging:{next:a}})));const V=o.ifInvalidThrow(y);var v=e();export{l as a,V as b,c as m,d as p,v as r,m as u};
|
|
5
|
+
//# sourceMappingURL=p-CHQ7ZKZd.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import{h as e,t,p as n,H as s,e as i}from"./p-DmsAWRoU.js";import{m as r,v as o}from"./p-Tvs4yxd5.js";import{M as l}from"./p-Dw6chgeK.js";import"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{h as e,t,p as n,H as s,e as i}from"./p-DmsAWRoU.js";import{m as r,v as o}from"./p-Tvs4yxd5.js";import{M as l}from"./p-Dw6chgeK.js";import"./p-DLV-gg65.js";import{V as a}from"./p-Dpyl9pSp.js";function c(e){return e instanceof HTMLElement&&e.nodeName==="VERTEX-VIEWER-DOM-ELEMENT"&&e.matrix!=null}function d(e){return(e instanceof HTMLElement&&e.nodeName==="VERTEX-VIEWER-DOM-GROUP"||e instanceof HTMLElement&&e.dataset.isDomGroupElement!=null)&&e.matrix!=null}const h=(t,n)=>e("div",{class:"root-2d"},n);function u(e,t,n,s,i){const r=v(e,t,s).sort(((e,t)=>e.distanceToCamera-t.distanceToCamera));for(let e=0;e<r.length;e++){const{element:t,worldMatrix:o,worldPosition:l}=r[e];const a=i==null;const c=a||!t.occlusionOff&&(i===null||i===void 0?void 0:i.isOccluded(l,n));const d=a||!t.detachedOff&&(i===null||i===void 0?void 0:i.isDetached(l,n));const h=m(l,s.projectionViewMatrix,n);f(t,h);p(t,e,r.length);u(t,o,n,s,i);t.occluded=c!==null&&c!==void 0?c:false;t.detached=d!==null&&d!==void 0?d:false;t.classList.add("ready")}}function v(e,t,n){const s=[];for(let i=0;i<e.children.length;i++){const l=e.children[i];if(d(l)){const e=r.multiply(t,l.matrix);s.push(...v(l,e,n))}else if(c(l)){const e=r.multiply(t,l.matrix);const i=o.fromMatrixPosition(e);const a=o.distanceSquared(n.position,i);s.push({element:l,worldMatrix:e,worldPosition:i,distanceToCamera:a})}else{s.push(...v(l,t,n))}}return s}function f(e,t){e.style.transform=[`translate(-50%, -50%)`,`translate(${t.x}px, ${t.y}px)`].join(" ")}function p(e,t,n){e.style.zIndex=`${n-t}`}function m(e,t,n){const s=o.transformMatrix(e,t);return n.transformVectorToViewport(s)}const w=({camera:t,viewport:n},s)=>{const i=r.toObject(t.projectionMatrix);const o=t.isOrthographic()?t.far*2/(t.fovHeight*2)*(n.height/2):i.m22*(n.height/2);const l=[`translateZ(${o}px)`,y(t.viewMatrix),`translate(${n.width/2}px, ${n.height/2}px)`].join(" ");return e("div",{class:"root-3d",style:{perspective:`${o}px`}},e("div",{class:"camera",style:{transform:l}},s))};function E(e,t,n,s,i){for(let r=0;r<e.children.length;r++){const o=e.children[r];if(c(o)){g(o,t,n,s,i)}else if(d(o)){x(o,t,n,s,i)}else{E(o,t,n,s,i)}}}function g(e,t,n,s,i){const l=r.multiply(t,e.matrix);const a=o.fromMatrixPosition(l);const c=i==null;const d=c||!e.occlusionOff&&(i===null||i===void 0?void 0:i.isOccluded(a,n));e.occluded=d!==null&&d!==void 0?d:false;const h=c||!e.detachedOff&&(i===null||i===void 0?void 0:i.isDetached(a,n));e.detached=h!==null&&h!==void 0?h:false;e.classList.add("ready");if(e.billboardOff){e.style.transform=V(l)}else{let t=s.viewMatrix;t=r.transpose(t);t=r.position(t,l);t=r.scale(t,e.scale);t[3]=0;t[7]=0;t[11]=0;t[15]=1;e.style.transform=V(t)}E(e,l,n,s,i)}function x(e,t,n,s,i){const o=r.multiply(t,e.matrix);E(e,o,n,s,i)}function y(e){const t=[M(e[0]),M(-e[1]),M(e[2]),M(e[3]),M(e[4]),M(-e[5]),M(e[6]),M(e[7]),M(e[8]),M(-e[9]),M(e[10]),M(e[11]),M(e[12]),M(-e[13]),M(e[14]),M(e[15])].join(", ");return`matrix3d(${t})`}function V(e){const t=[M(e[0]),M(e[1]),M(e[2]),M(e[3]),M(-e[4]),M(-e[5]),M(-e[6]),M(-e[7]),M(e[8]),M(e[9]),M(e[10]),M(e[11]),M(e[12]),M(e[13]),M(e[14]),M(e[15])].join(", ");return[`translate(-50%, -50%)`,`matrix3d(${t})`].join(" ")}function M(e){return Math.abs(e)<1e-10?0:e}const C=()=>`.sc-vertex-viewer-dom-renderer-h{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden;pointer-events:none}.root-3d.sc-vertex-viewer-dom-renderer{width:100%;height:100%;pointer-events:inherit}.camera.sc-vertex-viewer-dom-renderer{transform-style:preserve-3d;pointer-events:inherit;width:100%;height:100%}`;const T=n(class t extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.drawMode="3d";this.propagateEventsToViewer=true;this.viewport=new a(0,0);this.invalidateFrameCounter=0;this.interactionDisposables=[];this.handleViewerFrameDrawn=async()=>{this.updatePropsFromViewer()}}componentWillLoad(){var e;const t=new ResizeObserver((()=>this.handleResize()));t.observe(this.hostEl);const n=new MutationObserver((()=>this.handleChildrenChange()));n.observe(this.hostEl,{childList:true});this.handleViewerChange(this.viewer,undefined);if(((e=this.viewer)===null||e===void 0?void 0:e.frame)!=null){this.handleViewerFrameDrawn()}}render(){if(this.camera!=null){if(this.drawMode==="2d"){return e(i,null,e(h,null,e("slot",null)))}else{return e(i,null,e(w,{camera:this.camera,viewport:this.viewport},e("slot",null)))}}else{return e(i,null)}}componentWillRender(){this.updateElements()}handleViewerChange(e,t){t===null||t===void 0?void 0:t.removeEventListener("frameDrawn",this.handleViewerFrameDrawn);e===null||e===void 0?void 0:e.addEventListener("frameDrawn",this.handleViewerFrameDrawn);if(this.propagateEventsToViewer&&e!=null){this.handleEventPropagationToViewer(e)}}handlePropertyChange(){this.invalidateFrame()}invalidateFrame(){this.invalidateFrameCounter=this.invalidateFrameCounter+1}handleEventPropagationToViewer(e){this.interactionDisposables.forEach((e=>{e.dispose()}));this.interactionDisposables=[];e.getInteractionHandlers().then((e=>{e.forEach((e=>{if(e instanceof l){const t=e.registerAdditionalElement(this.hostEl);this.interactionDisposables=[...this.interactionDisposables,t]}}))}))}async updateElements(){const{viewport:e,camera:t}=this;const n=r.makeIdentity();if(t!=null){if(this.drawMode==="3d"){E(this.hostEl,n,e,t,this.depthBuffer)}else{u(this.hostEl,n,e,t,this.depthBuffer)}}}handleResize(){const e=this.hostEl.getBoundingClientRect();this.viewport=new a(e.width,e.height)}handleChildrenChange(){this.invalidateFrame()}async updatePropsFromViewer(){const{frame:e}=this.viewer||{};this.depthBuffer=await(e===null||e===void 0?void 0:e.depthBuffer());this.camera=e===null||e===void 0?void 0:e.scene.camera}get hostEl(){return this}static get watchers(){return{viewer:[{handleViewerChange:0}]}}static get style(){return C()}},[262,"vertex-viewer-dom-renderer",{drawMode:[1,"draw-mode"],propagateEventsToViewer:[4,"propagate-events-to-viewer"],viewer:[16],camera:[1040],depthBuffer:[1040],viewport:[32],invalidateFrameCounter:[32],interactionDisposables:[32]},[[0,"propertyChange","handlePropertyChange"]],{viewer:[{handleViewerChange:0}]}]);function D(){if(typeof customElements==="undefined"){return}const e=["vertex-viewer-dom-renderer"];e.forEach((e=>{switch(e){case"vertex-viewer-dom-renderer":if(!customElements.get(t(e))){customElements.define(t(e),T)}break}}))}D();export{T as V,D as d};
|
|
5
|
+
//# sourceMappingURL=p-CYhNWr6k.js.map
|
|
@@ -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 I(t,e,n){this.low=t|0;this.high=e|0;this.unsigned=!!n}Object.defineProperty(I.prototype,"__isLong__",{value:true});function C(t){return(t&&t["__isLong__"])===true}function E(t){var e=Math.clz32(t&-t);return t?31-e:e}I.isLong=C;var B={};var A={};function D(t,e){var n,r,i;if(e){t>>>=0;if(i=0<=t&&t<256){r=A[t];if(r)return r}n=P(t,0,true);if(i)A[t]=n;return n}else{t|=0;if(i=-128<=t&&t<128){r=B[t];if(r)return r}n=P(t,t<0?-1:0,false);if(i)B[t]=n;return n}}I.fromInt=D;function j(t,e){if(isNaN(t))return e?H:z;if(e){if(t<0)return H;if(t>=_)return K}else{if(t<=-F)return J;if(t+1>=F)return Y}if(t<0)return j(-t,e).neg();return P(t%W|0,t/W|0,e)}I.fromNumber=j;function P(t,e,n){return new I(t,e,n)}I.fromBits=P;var V=Math.pow;function T(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?H:z;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 T(t.substring(1),e,n).neg()}var i=j(V(n,8));var s=z;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=j(V(n,a));s=s.mul(c).add(j(u))}else{s=s.mul(i);s=s.add(j(u))}}s.unsigned=e;return s}I.fromString=T;function R(t,e){if(typeof t==="number")return j(t,e);if(typeof t==="string")return T(t,e);return P(t.low,t.high,typeof e==="boolean"?e:t.unsigned)}I.fromValue=R;var k=1<<16;var O=1<<24;var W=k*k;var _=W*W;var F=_/2;var G=D(O);var z=D(0);I.ZERO=z;var H=D(0,true);I.UZERO=H;var q=D(1);I.ONE=q;var L=D(1,true);I.UONE=L;var U=D(-1);I.NEG_ONE=U;var Y=P(4294967295|0,2147483647|0,false);I.MAX_VALUE=Y;var K=P(4294967295|0,4294967295|0,true);I.MAX_UNSIGNED_VALUE=K;var J=P(0,2147483648|0,false);I.MIN_VALUE=J;var Q=I.prototype;Q.toInt=function t(){return this.unsigned?this.low>>>0:this.low};Q.toNumber=function t(){if(this.unsigned)return(this.high>>>0)*W+(this.low>>>0);return this.high*W+(this.low>>>0)};Q.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(J)){var n=j(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=j(V(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}}};Q.getHighBits=function t(){return this.high};Q.getHighBitsUnsigned=function t(){return this.high>>>0};Q.getLowBits=function t(){return this.low};Q.getLowBitsUnsigned=function t(){return this.low>>>0};Q.getNumBitsAbs=function t(){if(this.isNegative())return this.eq(J)?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};Q.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)};Q.isZero=function t(){return this.high===0&&this.low===0};Q.eqz=Q.isZero;Q.isNegative=function t(){return!this.unsigned&&this.high<0};Q.isPositive=function t(){return this.unsigned||this.high>=0};Q.isOdd=function t(){return(this.low&1)===1};Q.isEven=function t(){return(this.low&1)===0};Q.equals=function t(e){if(!C(e))e=R(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};Q.eq=Q.equals;Q.notEquals=function t(e){return!this.eq(e)};Q.neq=Q.notEquals;Q.ne=Q.notEquals;Q.lessThan=function t(e){return this.comp(e)<0};Q.lt=Q.lessThan;Q.lessThanOrEqual=function t(e){return this.comp(e)<=0};Q.lte=Q.lessThanOrEqual;Q.le=Q.lessThanOrEqual;Q.greaterThan=function t(e){return this.comp(e)>0};Q.gt=Q.greaterThan;Q.greaterThanOrEqual=function t(e){return this.comp(e)>=0};Q.gte=Q.greaterThanOrEqual;Q.ge=Q.greaterThanOrEqual;Q.compare=function t(e){if(!C(e))e=R(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};Q.comp=Q.compare;Q.negate=function t(){if(!this.unsigned&&this.eq(J))return J;return this.not().add(q)};Q.neg=Q.negate;Q.add=function t(e){if(!C(e))e=R(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 P(l<<16|v,h<<16|f,this.unsigned)};Q.subtract=function t(e){if(!C(e))e=R(e);return this.add(e.neg())};Q.sub=Q.subtract;Q.multiply=function t(e){if(this.isZero())return this;if(!C(e))e=R(e);if(S){var n=S["mul"](this.low,this.high,e.low,e.high);return P(n,S["get_high"](),this.unsigned)}if(e.isZero())return this.unsigned?H:z;if(this.eq(J))return e.isOdd()?J:z;if(e.eq(J))return this.isOdd()?J:z;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(G)&&e.lt(G))return j(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 P(v<<16|d,f<<16|l,this.unsigned)};Q.mul=Q.multiply;Q.divide=function t(e){if(!C(e))e=R(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 P(n,S["get_high"](),this.unsigned)}if(this.isZero())return this.unsigned?H:z;var r,i,s;if(!this.unsigned){if(this.eq(J)){if(e.eq(q)||e.eq(U))return J;else if(e.eq(J))return q;else{var o=this.shr(1);r=o.div(e).shl(1);if(r.eq(z)){return e.isNegative()?q:U}else{i=this.sub(e.mul(r));s=r.add(i.div(e));return s}}}else if(e.eq(J))return this.unsigned?H:z;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=z}else{if(!e.unsigned)e=e.toUnsigned();if(e.gt(this))return H;if(e.gt(this.shru(1)))return L;s=H}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:V(2,a-48),c=j(r),h=c.mul(e);while(h.isNegative()||h.gt(i)){r-=u;c=j(r,this.unsigned);h=c.mul(e)}if(c.isZero())c=q;s=s.add(c);i=i.sub(h)}return s};Q.div=Q.divide;Q.modulo=function t(e){if(!C(e))e=R(e);if(S){var n=(this.unsigned?S["rem_u"]:S["rem_s"])(this.low,this.high,e.low,e.high);return P(n,S["get_high"](),this.unsigned)}return this.sub(this.div(e).mul(e))};Q.mod=Q.modulo;Q.rem=Q.modulo;Q.not=function t(){return P(~this.low,~this.high,this.unsigned)};Q.countLeadingZeros=function t(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};Q.clz=Q.countLeadingZeros;Q.countTrailingZeros=function t(){return this.low?E(this.low):E(this.high)+32};Q.ctz=Q.countTrailingZeros;Q.and=function t(e){if(!C(e))e=R(e);return P(this.low&e.low,this.high&e.high,this.unsigned)};Q.or=function t(e){if(!C(e))e=R(e);return P(this.low|e.low,this.high|e.high,this.unsigned)};Q.xor=function t(e){if(!C(e))e=R(e);return P(this.low^e.low,this.high^e.high,this.unsigned)};Q.shiftLeft=function t(e){if(C(e))e=e.toInt();if((e&=63)===0)return this;else if(e<32)return P(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned);else return P(0,this.low<<e-32,this.unsigned)};Q.shl=Q.shiftLeft;Q.shiftRight=function t(e){if(C(e))e=e.toInt();if((e&=63)===0)return this;else if(e<32)return P(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned);else return P(this.high>>e-32,this.high>=0?0:-1,this.unsigned)};Q.shr=Q.shiftRight;Q.shiftRightUnsigned=function t(e){if(C(e))e=e.toInt();if((e&=63)===0)return this;if(e<32)return P(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned);if(e===32)return P(this.high,0,this.unsigned);return P(this.high>>>e-32,0,this.unsigned)};Q.shru=Q.shiftRightUnsigned;Q.shr_u=Q.shiftRightUnsigned;Q.rotateLeft=function t(e){var n;if(C(e))e=e.toInt();if((e&=63)===0)return this;if(e===32)return P(this.high,this.low,this.unsigned);if(e<32){n=32-e;return P(this.low<<e|this.high>>>n,this.high<<e|this.low>>>n,this.unsigned)}e-=32;n=32-e;return P(this.high<<e|this.low>>>n,this.low<<e|this.high>>>n,this.unsigned)};Q.rotl=Q.rotateLeft;Q.rotateRight=function t(e){var n;if(C(e))e=e.toInt();if((e&=63)===0)return this;if(e===32)return P(this.high,this.low,this.unsigned);if(e<32){n=32-e;return P(this.high<<n|this.low>>>e,this.low<<n|this.high>>>e,this.unsigned)}e-=32;n=32-e;return P(this.low<<n|this.high>>>e,this.high<<n|this.low>>>e,this.unsigned)};Q.rotr=Q.rotateRight;Q.toSigned=function t(){if(!this.unsigned)return this;return P(this.low,this.high,false)};Q.toUnsigned=function t(){if(this.unsigned)return this;return P(this.low,this.high,true)};Q.toBytes=function t(e){return e?this.toBytesLE():this.toBytesBE()};Q.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]};Q.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]};I.fromBytes=function t(e,n,r){return r?I.fromBytesLE(e,n):I.fromBytesBE(e,n)};I.fromBytesLE=function t(e,n){return new I(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)};I.fromBytesBE=function t(e,n){return new I(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"){I.fromBigInt=function t(e,n){var r=Number(BigInt.asIntN(32,e));var i=Number(BigInt.asIntN(32,e>>BigInt(32)));return P(r,i,n)};I.fromValue=function t(e,n){if(typeof e==="bigint")return I.fromBigInt(e,n);return R(e,n)};Q.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 Z=m.defineMapper(m.read(m.requiredProp("hex")),(([t])=>t));const $=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 X=m.defineMapper(m.compose((t=>w.toMsbLsb(t)),m.read(m.mapProp("msb",I.fromString),m.mapProp("lsb",I.fromString))),(([t,e])=>({msb:t,lsb:e})));function tt(t){"@babel/helpers - typeof";return tt="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},tt(t)}function et(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 nt(t,e){if(e.length<t){throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}}function rt(t){nt(1,arguments);var e=Object.prototype.toString.call(t);if(t instanceof Date||tt(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 it(t,e){nt(2,arguments);var n=rt(t);var r=et(e);if(isNaN(r)){return new Date(NaN)}if(!r){return n}n.setDate(n.getDate()+r);return n}function st(t,e){nt(2,arguments);var n=rt(t);var r=et(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 ot(t,e){nt(2,arguments);if(!e||tt(e)!=="object")return new Date(NaN);var n=e.years?et(e.years):0;var r=e.months?et(e.months):0;var i=e.weeks?et(e.weeks):0;var s=e.days?et(e.days):0;var o=e.hours?et(e.hours):0;var a=e.minutes?et(e.minutes):0;var u=e.seconds?et(e.seconds):0;var c=rt(t);var h=r||n?st(c,r+n*12):c;var f=s||i?it(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 at(t,e){nt(2,arguments);return rt(t).getTime()-rt(e).getTime()}function ut(t,e){nt(2,arguments);var n=rt(t);var r=rt(e);return n.getTime()>r.getTime()}function ct(t,e){nt(2,arguments);var n=et(e);return it(t,-n)}function ht(t,e){nt(2,arguments);var n=et(e);return st(t,-n)}function ft(t,e){nt(2,arguments);if(!e||tt(e)!=="object")return new Date(NaN);var n=e.years?et(e.years):0;var r=e.months?et(e.months):0;var i=e.weeks?et(e.weeks):0;var s=e.days?et(e.days):0;var o=e.hours?et(e.hours):0;var a=e.minutes?et(e.minutes):0;var u=e.seconds?et(e.seconds):0;var c=ht(t,r+n*12);var h=ct(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 lt{constructor(t,e,n){this.token=t;this.expiresIn=e;this.expiresAt=n}static create(t,e){const n=ot(new Date,{seconds:e});return new lt(t,e,n)}hasExpired(){return ut(new Date,this.expiresAt)}remainingTimeInMs(t){return at(ft(this.expiresAt,{seconds:t}),new Date)}}function vt(t){if(dt(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 dt(t){return t.position!=null&&t.fovHeight==null}function mt(t){const e=t;return e.viewVector!=null&&e.fovHeight!=null}function pt(t){if(mt(t)){return{...t,position:e.add(t.lookAt,e.negate(t.viewVector))}}else{return{...t,viewVector:e.subtract(t.lookAt,t.position)}}}function wt(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 gt(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 bt(t){if(mt(t)){return{orthographic:{viewVector:{...t.viewVector},lookAt:{...t.lookAt},up:{...t.up},fovHeight:t.fovHeight}}}else if(dt(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 yt(t,e){return mt(e)?xt(t):Mt(t,e)}function Mt(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 xt(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 Nt(t={}){return{sectionPlanes:t.sectionPlanes||[],highlightColor:t.highlightColor,lineWidth:t.lineWidth}}var St=Object.freeze({__proto__:null,create:Nt});function It(t={}){return{visibleSummary:t.visibleSummary,selectedVisibleSummary:t.selectedVisibleSummary}}function Ct(t,e){return Et(t.scene.sceneViewSummary)?t.copy({scene:t.scene.copy({sceneViewSummary:e===null||e===void 0?void 0:e.scene.sceneViewSummary})}):t}function Et(t){return t.visibleSummary==null}class Bt{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 Bt(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===Bt.MAX_DEPTH_VALUE?e!==null&&e!==void 0?e:r:r;return(i!==null&&i!==void 0?i:Bt.MAX_DEPTH_VALUE)/Bt.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}}Bt.MAX_DEPTH_VALUE=2**16-1;class At{constructor(t){this.scale=t}convertTo(t){return t*this.scale}convertFrom(t){return t/this.scale}}class Dt extends At{constructor(){super(1)}}class jt extends At{constructor(t=1){super(1/Math.pow(10,t))}}class Pt extends At{constructor(t=1){super(1/Math.pow(1e3,t))}}class Vt extends At{constructor(t=1){super(1/Math.pow(25.4,t))}}class Tt extends At{constructor(t=1){super(1/Math.pow(25.4*12,t))}}class Rt extends At{constructor(t=1){super(1/Math.pow(25.4*12*3,t))}}class kt{constructor(t){this.unitType=t;this.unit=kt.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}}}kt.units={millimeters:{name:"Millimeters",abbreviatedName:"mm",converter:new Dt},centimeters:{name:"Centimeters",abbreviatedName:"cm",converter:new jt},meters:{name:"Meters",abbreviatedName:"m",converter:new Pt},inches:{name:"Inches",abbreviatedName:"in",converter:new Vt},feet:{name:"Feet",abbreviatedName:"ft",converter:new Tt},yards:{name:"Yards",abbreviatedName:"yd",converter:new Rt}};class Ot{convertTo(e){return t.toDegrees(e)}convertFrom(e){return t.toRadians(e)}}class Wt{constructor(t){this.unitType=t;this.unit=Wt.units[t]}convertTo(t){return this.unit.converter.convertTo(t)}convertFrom(t){return this.unit.converter.convertFrom(t)}}Wt.units={radians:{name:"Radians",abbreviatedName:"rad",converter:new At(1)},degrees:{name:"Degrees",abbreviatedName:"deg",converter:new Ot}};class _t{constructor(t){this.unitType=t;this.unit=_t.units[t]}convertWorldValueToReal(t){return this.unit.converter.convertTo(t)}convertRealValueToWorld(t){return this.unit.converter.convertFrom(t)}}_t.units={millimeters:{name:"Square Millimeters",abbreviatedName:"mm²",converter:new Dt},centimeters:{name:"Square Centimeters",abbreviatedName:"cm²",converter:new jt(2)},meters:{name:"Square Meters",abbreviatedName:"m²",converter:new Pt(2)},inches:{name:"Square Inches",abbreviatedName:"in²",converter:new Vt(2)},feet:{name:"Square Feet",abbreviatedName:"ft²",converter:new Tt(2)},yards:{name:"Square Yards",abbreviatedName:"yd²",converter:new Rt(2)}};var Ft;(function(t){t[t["CROSS_SECTION"]=255]="CROSS_SECTION";t[t["PRECISE_EDGE"]=224]="PRECISE_EDGE";t[t["PRECISE_SURFACE"]=192]="PRECISE_SURFACE";t[t["IMPRECISE_EDGE"]=160]="IMPRECISE_EDGE";t[t["IMPRECISE_SURFACE"]=128]="IMPRECISE_SURFACE";t[t["GENERIC_GEOMETRY"]=96]="GENERIC_GEOMETRY";t[t["NO_GEOMETRY"]=0]="NO_GEOMETRY"})(Ft||(Ft={}));class Gt{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 Gt(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)===Ft.CROSS_SECTION){return Ft.CROSS_SECTION}else if((e===null||e===void 0?void 0:e.a)===Ft.GENERIC_GEOMETRY){return Ft.GENERIC_GEOMETRY}else if((e===null||e===void 0?void 0:e.a)===Ft.IMPRECISE_EDGE){return Ft.IMPRECISE_EDGE}else if((e===null||e===void 0?void 0:e.a)===Ft.IMPRECISE_SURFACE){return Ft.IMPRECISE_SURFACE}else if((e===null||e===void 0?void 0:e.a)===Ft.PRECISE_EDGE){return Ft.PRECISE_EDGE}else if((e===null||e===void 0?void 0:e.a)===Ft.PRECISE_SURFACE){return Ft.PRECISE_SURFACE}else{return Ft.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 zt(){return import("./p-CHr9UTNw.js")}let Ht;let qt;const Lt=1;function Ut(){if(Ht==null){console.debug(`Loading PNG worker module`);Ht=zt()}return Ht}function Yt(){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 Lt}}async function Kt(){if(qt==null){qt=Ut().then((async({spawnPool:t})=>{const e=Yt();console.debug(`Spawning PNG worker pool [size=${e}]`);return t({size:e})}))}return qt}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 Zt(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 Bt.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 Gt.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 Xt{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}=yt(e,t);if(mt(t)){const i=n.create(e);const a=Qt(t.viewVector,i);const u=Zt(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(wt(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(gt(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 Se=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 Ie=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(Se))),(([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 Ce=m.defineMapper(m.read(m.mapProp("normal",m.compose(m.required("normal"),ce)),m.requiredProp("offset")),(([t,e])=>({normal:t,offset:e})));const Ee=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 Be=m.defineMapper(m.read(m.mapProp("sectionPlanes",m.compose(m.required("sectionPlanes"),m.mapArray(Ce))),m.mapProp("highlightColor",m.ifDefined(de))),(([t,e])=>Nt({sectionPlanes:t,highlightColor:e||undefined})));const Ae=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 De=m.defineMapper(m.read(m.mapProp("visibleSummary",m.ifDefined(Ae)),m.mapProp("selectedVisibleSummary",m.ifDefined(Ae))),(([t,e])=>It({visibleSummary:t!==null&&t!==void 0?t:undefined,selectedVisibleSummary:e!==null&&e!==void 0?e:undefined})));const je=m.defineMapper(m.read(m.mapProp("imageAttributes",m.compose(m.required("imageAttributes"),Ee))),(([t])=>t));const Pe=m.defineMapper(m.read(je,m.mapProp("image",m.required("image"))),(([t,e])=>new Xt(t,e)));const Ve=m.defineMapper(m.read(m.mapRequiredProp("camera",Ie),m.mapRequiredProp("visibleBoundingBox",he),m.mapRequiredProp("crossSectioning",Be),m.requiredProp("hasChanged"),m.mapRequiredProp("displayListSummary",De),m.mapProp("modelViewId",m.ifDefined($))),(([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"),Ve))),(([t])=>t));const Re=m.defineMapper(m.read(Te,je),(([t,e])=>ee.fromBoundingBox(t.camera,t.boundingBox,c.aspectRatio(e.frameDimensions))));function ke(t){return m.defineMapper(m.read(Te,Re),(([e,n])=>new te(n,e.boundingBox,e.crossSectioning,t,e.hasChanged,e.displayListSummary,e.modelViewId)))}function Oe(t){return m.defineMapper(m.read(m.mapProp("frameCorrelationIds",(t=>t!=null?t:[])),m.requiredProp("sequenceNumber"),m.compose(je,m.getProp("frameDimensions")),ke(t),Pe,m.mapProp("depthBuffer",be),m.mapProp("featureMap",be),m.mapProp("temporalRefinementCorrelationId",(t=>t!=null?Z(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(Oe(t))}const _e=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(_e);const Fe=m.defineMapper(m.read(m.mapRequiredProp("imageAttributes",Ee),m.requiredProp("stencilBuffer"),m.mapRequiredProp("depthBuffer",m.compose(be,m.required("depthBuffer")))),(([t,e,n])=>({imageAttributes:t,stencilBuffer:e,depthBuffer:n})));const Ge=He("stencilBuffer",Fe);const ze=m.ifInvalidThrow(Ge);function He(t,e){return m.mapRequiredProp(t,e)}const qe=m.defineMapper(m.read(m.requiredProp("token"),m.requiredProp("expiresIn")),(([t,e])=>lt.create(t,e)));const Le=m.defineMapper(m.read(m.compose(m.requiredProp("startStream"),m.mapRequiredProp("streamId",Z)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("sceneId",Z)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("sceneViewId",Z)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("sessionId",Z)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("worldOrientation",_e)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("token",qe))),(([t,e,n,r,i,s])=>({streamId:t,sceneId:e,sceneViewId:n,sessionId:r,worldOrientation:i,token:s})));const Ue=m.ifInvalidThrow(Le);const Ye=m.defineMapper(m.read(m.compose(m.requiredProp("reconnect"),m.mapRequiredProp("token",qe))),(([t])=>({token:t})));const Ke=m.ifInvalidThrow(Ye);const Je=m.defineMapper(m.compose(m.requiredProp("refreshToken"),m.requiredProp("token"),qe),(t=>t));const Qe=m.ifInvalidThrow(Je);const Ze=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(Ze);const Xe=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{Wt as A,g as B,We as C,kt as D,Ft as E,ee as F,Ue as G,Ke as H,$e as I,Qe as J,Ct as K,b as L,wt as M,gt as N,ie as O,vt as P,I as Q,Qt as R,se as S,pt as T,yt as U,fe as V,X as W,$t as a,Xt as b,St as c,te as d,re as e,ne as f,_t as g,ze as h,Jt as i,Bt as j,M as k,x as l,ye as m,ce as n,y as o,oe as p,de as q,Xe as r,N as s,bt as t,Zt 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 I(t,e,n){this.low=t|0;this.high=e|0;this.unsigned=!!n}Object.defineProperty(I.prototype,"__isLong__",{value:true});function C(t){return(t&&t["__isLong__"])===true}function E(t){var e=Math.clz32(t&-t);return t?31-e:e}I.isLong=C;var B={};var A={};function D(t,e){var n,r,i;if(e){t>>>=0;if(i=0<=t&&t<256){r=A[t];if(r)return r}n=P(t,0,true);if(i)A[t]=n;return n}else{t|=0;if(i=-128<=t&&t<128){r=B[t];if(r)return r}n=P(t,t<0?-1:0,false);if(i)B[t]=n;return n}}I.fromInt=D;function j(t,e){if(isNaN(t))return e?H:z;if(e){if(t<0)return H;if(t>=_)return K}else{if(t<=-F)return J;if(t+1>=F)return Y}if(t<0)return j(-t,e).neg();return P(t%W|0,t/W|0,e)}I.fromNumber=j;function P(t,e,n){return new I(t,e,n)}I.fromBits=P;var V=Math.pow;function T(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?H:z;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 T(t.substring(1),e,n).neg()}var i=j(V(n,8));var s=z;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=j(V(n,a));s=s.mul(c).add(j(u))}else{s=s.mul(i);s=s.add(j(u))}}s.unsigned=e;return s}I.fromString=T;function R(t,e){if(typeof t==="number")return j(t,e);if(typeof t==="string")return T(t,e);return P(t.low,t.high,typeof e==="boolean"?e:t.unsigned)}I.fromValue=R;var k=1<<16;var O=1<<24;var W=k*k;var _=W*W;var F=_/2;var G=D(O);var z=D(0);I.ZERO=z;var H=D(0,true);I.UZERO=H;var q=D(1);I.ONE=q;var L=D(1,true);I.UONE=L;var U=D(-1);I.NEG_ONE=U;var Y=P(4294967295|0,2147483647|0,false);I.MAX_VALUE=Y;var K=P(4294967295|0,4294967295|0,true);I.MAX_UNSIGNED_VALUE=K;var J=P(0,2147483648|0,false);I.MIN_VALUE=J;var Q=I.prototype;Q.toInt=function t(){return this.unsigned?this.low>>>0:this.low};Q.toNumber=function t(){if(this.unsigned)return(this.high>>>0)*W+(this.low>>>0);return this.high*W+(this.low>>>0)};Q.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(J)){var n=j(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=j(V(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}}};Q.getHighBits=function t(){return this.high};Q.getHighBitsUnsigned=function t(){return this.high>>>0};Q.getLowBits=function t(){return this.low};Q.getLowBitsUnsigned=function t(){return this.low>>>0};Q.getNumBitsAbs=function t(){if(this.isNegative())return this.eq(J)?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};Q.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)};Q.isZero=function t(){return this.high===0&&this.low===0};Q.eqz=Q.isZero;Q.isNegative=function t(){return!this.unsigned&&this.high<0};Q.isPositive=function t(){return this.unsigned||this.high>=0};Q.isOdd=function t(){return(this.low&1)===1};Q.isEven=function t(){return(this.low&1)===0};Q.equals=function t(e){if(!C(e))e=R(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};Q.eq=Q.equals;Q.notEquals=function t(e){return!this.eq(e)};Q.neq=Q.notEquals;Q.ne=Q.notEquals;Q.lessThan=function t(e){return this.comp(e)<0};Q.lt=Q.lessThan;Q.lessThanOrEqual=function t(e){return this.comp(e)<=0};Q.lte=Q.lessThanOrEqual;Q.le=Q.lessThanOrEqual;Q.greaterThan=function t(e){return this.comp(e)>0};Q.gt=Q.greaterThan;Q.greaterThanOrEqual=function t(e){return this.comp(e)>=0};Q.gte=Q.greaterThanOrEqual;Q.ge=Q.greaterThanOrEqual;Q.compare=function t(e){if(!C(e))e=R(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};Q.comp=Q.compare;Q.negate=function t(){if(!this.unsigned&&this.eq(J))return J;return this.not().add(q)};Q.neg=Q.negate;Q.add=function t(e){if(!C(e))e=R(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 P(l<<16|v,h<<16|f,this.unsigned)};Q.subtract=function t(e){if(!C(e))e=R(e);return this.add(e.neg())};Q.sub=Q.subtract;Q.multiply=function t(e){if(this.isZero())return this;if(!C(e))e=R(e);if(S){var n=S["mul"](this.low,this.high,e.low,e.high);return P(n,S["get_high"](),this.unsigned)}if(e.isZero())return this.unsigned?H:z;if(this.eq(J))return e.isOdd()?J:z;if(e.eq(J))return this.isOdd()?J:z;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(G)&&e.lt(G))return j(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 P(v<<16|d,f<<16|l,this.unsigned)};Q.mul=Q.multiply;Q.divide=function t(e){if(!C(e))e=R(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 P(n,S["get_high"](),this.unsigned)}if(this.isZero())return this.unsigned?H:z;var r,i,s;if(!this.unsigned){if(this.eq(J)){if(e.eq(q)||e.eq(U))return J;else if(e.eq(J))return q;else{var o=this.shr(1);r=o.div(e).shl(1);if(r.eq(z)){return e.isNegative()?q:U}else{i=this.sub(e.mul(r));s=r.add(i.div(e));return s}}}else if(e.eq(J))return this.unsigned?H:z;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=z}else{if(!e.unsigned)e=e.toUnsigned();if(e.gt(this))return H;if(e.gt(this.shru(1)))return L;s=H}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:V(2,a-48),c=j(r),h=c.mul(e);while(h.isNegative()||h.gt(i)){r-=u;c=j(r,this.unsigned);h=c.mul(e)}if(c.isZero())c=q;s=s.add(c);i=i.sub(h)}return s};Q.div=Q.divide;Q.modulo=function t(e){if(!C(e))e=R(e);if(S){var n=(this.unsigned?S["rem_u"]:S["rem_s"])(this.low,this.high,e.low,e.high);return P(n,S["get_high"](),this.unsigned)}return this.sub(this.div(e).mul(e))};Q.mod=Q.modulo;Q.rem=Q.modulo;Q.not=function t(){return P(~this.low,~this.high,this.unsigned)};Q.countLeadingZeros=function t(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};Q.clz=Q.countLeadingZeros;Q.countTrailingZeros=function t(){return this.low?E(this.low):E(this.high)+32};Q.ctz=Q.countTrailingZeros;Q.and=function t(e){if(!C(e))e=R(e);return P(this.low&e.low,this.high&e.high,this.unsigned)};Q.or=function t(e){if(!C(e))e=R(e);return P(this.low|e.low,this.high|e.high,this.unsigned)};Q.xor=function t(e){if(!C(e))e=R(e);return P(this.low^e.low,this.high^e.high,this.unsigned)};Q.shiftLeft=function t(e){if(C(e))e=e.toInt();if((e&=63)===0)return this;else if(e<32)return P(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned);else return P(0,this.low<<e-32,this.unsigned)};Q.shl=Q.shiftLeft;Q.shiftRight=function t(e){if(C(e))e=e.toInt();if((e&=63)===0)return this;else if(e<32)return P(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned);else return P(this.high>>e-32,this.high>=0?0:-1,this.unsigned)};Q.shr=Q.shiftRight;Q.shiftRightUnsigned=function t(e){if(C(e))e=e.toInt();if((e&=63)===0)return this;if(e<32)return P(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned);if(e===32)return P(this.high,0,this.unsigned);return P(this.high>>>e-32,0,this.unsigned)};Q.shru=Q.shiftRightUnsigned;Q.shr_u=Q.shiftRightUnsigned;Q.rotateLeft=function t(e){var n;if(C(e))e=e.toInt();if((e&=63)===0)return this;if(e===32)return P(this.high,this.low,this.unsigned);if(e<32){n=32-e;return P(this.low<<e|this.high>>>n,this.high<<e|this.low>>>n,this.unsigned)}e-=32;n=32-e;return P(this.high<<e|this.low>>>n,this.low<<e|this.high>>>n,this.unsigned)};Q.rotl=Q.rotateLeft;Q.rotateRight=function t(e){var n;if(C(e))e=e.toInt();if((e&=63)===0)return this;if(e===32)return P(this.high,this.low,this.unsigned);if(e<32){n=32-e;return P(this.high<<n|this.low>>>e,this.low<<n|this.high>>>e,this.unsigned)}e-=32;n=32-e;return P(this.low<<n|this.high>>>e,this.high<<n|this.low>>>e,this.unsigned)};Q.rotr=Q.rotateRight;Q.toSigned=function t(){if(!this.unsigned)return this;return P(this.low,this.high,false)};Q.toUnsigned=function t(){if(this.unsigned)return this;return P(this.low,this.high,true)};Q.toBytes=function t(e){return e?this.toBytesLE():this.toBytesBE()};Q.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]};Q.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]};I.fromBytes=function t(e,n,r){return r?I.fromBytesLE(e,n):I.fromBytesBE(e,n)};I.fromBytesLE=function t(e,n){return new I(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,n)};I.fromBytesBE=function t(e,n){return new I(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"){I.fromBigInt=function t(e,n){var r=Number(BigInt.asIntN(32,e));var i=Number(BigInt.asIntN(32,e>>BigInt(32)));return P(r,i,n)};I.fromValue=function t(e,n){if(typeof e==="bigint")return I.fromBigInt(e,n);return R(e,n)};Q.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 Z=m.defineMapper(m.read(m.requiredProp("hex")),(([t])=>t));const $=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 X=m.defineMapper(m.compose((t=>w.toMsbLsb(t)),m.read(m.mapProp("msb",I.fromString),m.mapProp("lsb",I.fromString))),(([t,e])=>({msb:t,lsb:e})));function tt(t){"@babel/helpers - typeof";return tt="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},tt(t)}function et(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 nt(t,e){if(e.length<t){throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}}function rt(t){nt(1,arguments);var e=Object.prototype.toString.call(t);if(t instanceof Date||tt(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 it(t,e){nt(2,arguments);var n=rt(t);var r=et(e);if(isNaN(r)){return new Date(NaN)}if(!r){return n}n.setDate(n.getDate()+r);return n}function st(t,e){nt(2,arguments);var n=rt(t);var r=et(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 ot(t,e){nt(2,arguments);if(!e||tt(e)!=="object")return new Date(NaN);var n=e.years?et(e.years):0;var r=e.months?et(e.months):0;var i=e.weeks?et(e.weeks):0;var s=e.days?et(e.days):0;var o=e.hours?et(e.hours):0;var a=e.minutes?et(e.minutes):0;var u=e.seconds?et(e.seconds):0;var c=rt(t);var h=r||n?st(c,r+n*12):c;var f=s||i?it(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 at(t,e){nt(2,arguments);return rt(t).getTime()-rt(e).getTime()}function ut(t,e){nt(2,arguments);var n=rt(t);var r=rt(e);return n.getTime()>r.getTime()}function ct(t,e){nt(2,arguments);var n=et(e);return it(t,-n)}function ht(t,e){nt(2,arguments);var n=et(e);return st(t,-n)}function ft(t,e){nt(2,arguments);if(!e||tt(e)!=="object")return new Date(NaN);var n=e.years?et(e.years):0;var r=e.months?et(e.months):0;var i=e.weeks?et(e.weeks):0;var s=e.days?et(e.days):0;var o=e.hours?et(e.hours):0;var a=e.minutes?et(e.minutes):0;var u=e.seconds?et(e.seconds):0;var c=ht(t,r+n*12);var h=ct(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 lt{constructor(t,e,n){this.token=t;this.expiresIn=e;this.expiresAt=n}static create(t,e){const n=ot(new Date,{seconds:e});return new lt(t,e,n)}hasExpired(){return ut(new Date,this.expiresAt)}remainingTimeInMs(t){return at(ft(this.expiresAt,{seconds:t}),new Date)}}function vt(t){if(dt(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 dt(t){return t.position!=null&&t.fovHeight==null}function mt(t){const e=t;return e.viewVector!=null&&e.fovHeight!=null}function pt(t){if(mt(t)){return{...t,position:e.add(t.lookAt,e.negate(t.viewVector))}}else{return{...t,viewVector:e.subtract(t.lookAt,t.position)}}}function wt(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 gt(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 bt(t){if(mt(t)){return{orthographic:{viewVector:{...t.viewVector},lookAt:{...t.lookAt},up:{...t.up},fovHeight:t.fovHeight}}}else if(dt(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 yt(t,e){return mt(e)?xt(t):Mt(t,e)}function Mt(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 xt(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 Nt(t={}){return{sectionPlanes:t.sectionPlanes||[],highlightColor:t.highlightColor,lineWidth:t.lineWidth}}var St=Object.freeze({__proto__:null,create:Nt});function It(t={}){return{visibleSummary:t.visibleSummary,selectedVisibleSummary:t.selectedVisibleSummary}}function Ct(t,e){return Et(t.scene.sceneViewSummary)?t.copy({scene:t.scene.copy({sceneViewSummary:e===null||e===void 0?void 0:e.scene.sceneViewSummary})}):t}function Et(t){return t.visibleSummary==null}class Bt{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 Bt(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===Bt.MAX_DEPTH_VALUE?e!==null&&e!==void 0?e:r:r;return(i!==null&&i!==void 0?i:Bt.MAX_DEPTH_VALUE)/Bt.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}}Bt.MAX_DEPTH_VALUE=2**16-1;class At{constructor(t){this.scale=t}convertTo(t){return t*this.scale}convertFrom(t){return t/this.scale}}class Dt extends At{constructor(){super(1)}}class jt extends At{constructor(t=1){super(1/Math.pow(10,t))}}class Pt extends At{constructor(t=1){super(1/Math.pow(1e3,t))}}class Vt extends At{constructor(t=1){super(1/Math.pow(25.4,t))}}class Tt extends At{constructor(t=1){super(1/Math.pow(25.4*12,t))}}class Rt extends At{constructor(t=1){super(1/Math.pow(25.4*12*3,t))}}class kt{constructor(t){this.unitType=t;this.unit=kt.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}}}kt.units={millimeters:{name:"Millimeters",abbreviatedName:"mm",converter:new Dt},centimeters:{name:"Centimeters",abbreviatedName:"cm",converter:new jt},meters:{name:"Meters",abbreviatedName:"m",converter:new Pt},inches:{name:"Inches",abbreviatedName:"in",converter:new Vt},feet:{name:"Feet",abbreviatedName:"ft",converter:new Tt},yards:{name:"Yards",abbreviatedName:"yd",converter:new Rt}};class Ot{convertTo(e){return t.toDegrees(e)}convertFrom(e){return t.toRadians(e)}}class Wt{constructor(t){this.unitType=t;this.unit=Wt.units[t]}convertTo(t){return this.unit.converter.convertTo(t)}convertFrom(t){return this.unit.converter.convertFrom(t)}}Wt.units={radians:{name:"Radians",abbreviatedName:"rad",converter:new At(1)},degrees:{name:"Degrees",abbreviatedName:"deg",converter:new Ot}};class _t{constructor(t){this.unitType=t;this.unit=_t.units[t]}convertWorldValueToReal(t){return this.unit.converter.convertTo(t)}convertRealValueToWorld(t){return this.unit.converter.convertFrom(t)}}_t.units={millimeters:{name:"Square Millimeters",abbreviatedName:"mm²",converter:new Dt},centimeters:{name:"Square Centimeters",abbreviatedName:"cm²",converter:new jt(2)},meters:{name:"Square Meters",abbreviatedName:"m²",converter:new Pt(2)},inches:{name:"Square Inches",abbreviatedName:"in²",converter:new Vt(2)},feet:{name:"Square Feet",abbreviatedName:"ft²",converter:new Tt(2)},yards:{name:"Square Yards",abbreviatedName:"yd²",converter:new Rt(2)}};var Ft;(function(t){t[t["CROSS_SECTION"]=255]="CROSS_SECTION";t[t["PRECISE_EDGE"]=224]="PRECISE_EDGE";t[t["PRECISE_SURFACE"]=192]="PRECISE_SURFACE";t[t["IMPRECISE_EDGE"]=160]="IMPRECISE_EDGE";t[t["IMPRECISE_SURFACE"]=128]="IMPRECISE_SURFACE";t[t["GENERIC_GEOMETRY"]=96]="GENERIC_GEOMETRY";t[t["NO_GEOMETRY"]=0]="NO_GEOMETRY"})(Ft||(Ft={}));class Gt{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 Gt(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)===Ft.CROSS_SECTION){return Ft.CROSS_SECTION}else if((e===null||e===void 0?void 0:e.a)===Ft.GENERIC_GEOMETRY){return Ft.GENERIC_GEOMETRY}else if((e===null||e===void 0?void 0:e.a)===Ft.IMPRECISE_EDGE){return Ft.IMPRECISE_EDGE}else if((e===null||e===void 0?void 0:e.a)===Ft.IMPRECISE_SURFACE){return Ft.IMPRECISE_SURFACE}else if((e===null||e===void 0?void 0:e.a)===Ft.PRECISE_EDGE){return Ft.PRECISE_EDGE}else if((e===null||e===void 0?void 0:e.a)===Ft.PRECISE_SURFACE){return Ft.PRECISE_SURFACE}else{return Ft.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 zt(){return import("./p-CHr9UTNw.js")}let Ht;let qt;const Lt=1;function Ut(){if(Ht==null){console.debug(`Loading PNG worker module`);Ht=zt()}return Ht}function Yt(){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 Lt}}async function Kt(){if(qt==null){qt=Ut().then((async({spawnPool:t})=>{const e=Yt();console.debug(`Spawning PNG worker pool [size=${e}]`);return t({size:e})}))}return qt}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 Zt(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 Bt.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 Gt.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 Xt{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}=yt(e,t);if(mt(t)){const i=n.create(e);const a=Qt(t.viewVector,i);const u=Zt(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(wt(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(gt(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 Se=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 Ie=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(Se))),(([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 Ce=m.defineMapper(m.read(m.mapProp("normal",m.compose(m.required("normal"),ce)),m.requiredProp("offset")),(([t,e])=>({normal:t,offset:e})));const Ee=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 Be=m.defineMapper(m.read(m.mapProp("sectionPlanes",m.compose(m.required("sectionPlanes"),m.mapArray(Ce))),m.mapProp("highlightColor",m.ifDefined(de))),(([t,e])=>Nt({sectionPlanes:t,highlightColor:e||undefined})));const Ae=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 De=m.defineMapper(m.read(m.mapProp("visibleSummary",m.ifDefined(Ae)),m.mapProp("selectedVisibleSummary",m.ifDefined(Ae))),(([t,e])=>It({visibleSummary:t!==null&&t!==void 0?t:undefined,selectedVisibleSummary:e!==null&&e!==void 0?e:undefined})));const je=m.defineMapper(m.read(m.mapProp("imageAttributes",m.compose(m.required("imageAttributes"),Ee))),(([t])=>t));const Pe=m.defineMapper(m.read(je,m.mapProp("image",m.required("image"))),(([t,e])=>new Xt(t,e)));const Ve=m.defineMapper(m.read(m.mapRequiredProp("camera",Ie),m.mapRequiredProp("visibleBoundingBox",he),m.mapRequiredProp("crossSectioning",Be),m.requiredProp("hasChanged"),m.mapRequiredProp("displayListSummary",De),m.mapProp("modelViewId",m.ifDefined($))),(([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"),Ve))),(([t])=>t));const Re=m.defineMapper(m.read(Te,je),(([t,e])=>ee.fromBoundingBox(t.camera,t.boundingBox,c.aspectRatio(e.frameDimensions))));function ke(t){return m.defineMapper(m.read(Te,Re),(([e,n])=>new te(n,e.boundingBox,e.crossSectioning,t,e.hasChanged,e.displayListSummary,e.modelViewId)))}function Oe(t){return m.defineMapper(m.read(m.mapProp("frameCorrelationIds",(t=>t!=null?t:[])),m.requiredProp("sequenceNumber"),m.compose(je,m.getProp("frameDimensions")),ke(t),Pe,m.mapProp("depthBuffer",be),m.mapProp("featureMap",be),m.mapProp("temporalRefinementCorrelationId",(t=>t!=null?Z(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(Oe(t))}const _e=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(_e);const Fe=m.defineMapper(m.read(m.mapRequiredProp("imageAttributes",Ee),m.requiredProp("stencilBuffer"),m.mapRequiredProp("depthBuffer",m.compose(be,m.required("depthBuffer")))),(([t,e,n])=>({imageAttributes:t,stencilBuffer:e,depthBuffer:n})));const Ge=He("stencilBuffer",Fe);const ze=m.ifInvalidThrow(Ge);function He(t,e){return m.mapRequiredProp(t,e)}const qe=m.defineMapper(m.read(m.requiredProp("token"),m.requiredProp("expiresIn")),(([t,e])=>lt.create(t,e)));const Le=m.defineMapper(m.read(m.compose(m.requiredProp("startStream"),m.mapRequiredProp("streamId",Z)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("sceneId",Z)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("sceneViewId",Z)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("sessionId",Z)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("worldOrientation",_e)),m.compose(m.requiredProp("startStream"),m.mapRequiredProp("token",qe))),(([t,e,n,r,i,s])=>({streamId:t,sceneId:e,sceneViewId:n,sessionId:r,worldOrientation:i,token:s})));const Ue=m.ifInvalidThrow(Le);const Ye=m.defineMapper(m.read(m.compose(m.requiredProp("reconnect"),m.mapRequiredProp("token",qe))),(([t])=>({token:t})));const Ke=m.ifInvalidThrow(Ye);const Je=m.defineMapper(m.compose(m.requiredProp("refreshToken"),m.requiredProp("token"),qe),(t=>t));const Qe=m.ifInvalidThrow(Je);const Ze=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(Ze);const Xe=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{Wt as A,g as B,We as C,kt as D,Ft as E,ee as F,Ue as G,Ke as H,$e as I,Qe as J,Ct as K,b as L,wt as M,gt as N,ie as O,vt as P,I as Q,Qt as R,se as S,pt as T,yt as U,fe as V,X as W,$t as a,Xt as b,St as c,te as d,re as e,ne as f,_t as g,ze as h,Jt as i,Bt as j,M as k,x as l,ye as m,ce as n,y as o,oe as p,de as q,Xe as r,N as s,bt as t,Zt as u,ve as v,ge as w,he as x,fn as y,me as z};
|
|
24
|
+
//# sourceMappingURL=p-DLV-gg65.js.map
|