@arcgis/core 5.0.0-next.37 → 5.0.0-next.38
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/applications/Components/testUtils.d.ts +4 -0
- package/applications/Components/testUtils.js +5 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/2795e491f803654413d2.js +1 -0
- package/assets/esri/core/workers/chunks/2f9129003f77bfeab2f9.js +1 -0
- package/assets/esri/core/workers/chunks/50ffb22c48fadd36c748.js +1 -0
- package/assets/esri/core/workers/chunks/{ce8fc1ca229d53a4b68d.js → 7ab237d19b84d89ff483.js} +1 -1
- package/assets/esri/core/workers/chunks/{52c8687b473c9953c2f2.js → d9958654c6438f28237b.js} +1 -1
- package/chunks/GaussianSplat.glsl.js +2 -2
- package/config.js +1 -1
- package/geometry/support/buffer/BufferView.js +1 -1
- package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
- package/interfaces.d.ts +24 -0
- package/kernel.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/support/tests/meshUtils.js +5 -0
- package/support/tests/serviceMockDependencies.js +5 -0
- package/support/tests/setupServiceMocksMesh.js +5 -0
- package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/PointCloudWorker.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
- package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js +8 -8
- package/views/3d/webgl-engine/lib/CutFillColor.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +5 -0
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFields.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayoutField.js +5 -0
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBufferView.js +5 -0
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/BreakpointsOwner.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/interactive/InteractiveToolBase.js +1 -1
- package/views/interactive/ToolViewManagerManipulatorState.js +1 -1
- package/widgets/Slider.js +1 -1
- package/assets/esri/core/workers/chunks/951a3442d4342539f2ea.js +0 -1
- package/assets/esri/core/workers/chunks/c5967133f3ba34a883f8.js +0 -1
- package/assets/esri/core/workers/chunks/e0a74250d22fa1d7dc18.js +0 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/FastApproximateTrigonometry.glsl.js +0 -26
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{EventedAccessor as e}from"../../core/Evented.js";import"../../core/has.js";import"../../core/Logger.js";import{createResolver as i}from"../../core/promiseUtils.js";import{property as a,subclass as o}from"../../core/accessorSupport/decorators.js";import{ManipulatorCollection as s}from"./ManipulatorCollection.js";let n=class extends e{constructor(t){super(t),this.manipulators=new s,this.automaticManipulatorSelection=!0,this.hasGrabbedManipulators=!1,this.hasHoveredManipulators=!1,this.firstGrabbedManipulator=null,this.created=!1,this.removeIncompleteOnCancel=!0,this._editableFlags=new Map([[1,!0],[0,!0]]),this._creationFinishedResolver=i()}get active(){return null!=this.view&&this.view.activeTool===this}set visible(t){this._get("visible")!==t&&(this._set("visible",t),this._syncVisible())}get editable(){return this.getEditableFlag(0)}set editable(t){this.setEditableFlag(0,t)}get updating(){return!1}get cursor(){return null}get hasFocusedManipulators(){return this.hasGrabbedManipulators||this.hasHoveredManipulators}destroy(){this.manipulators.destroy(),this._set("view",null)}onAdd(){this._syncVisible()}activate(){null!=this.view&&(this.view.focus(),this.onActivate())}deactivate(){this.onDeactivate()}cancel(){this.emit("cancel")}handleInputEvent(t){this.onInputEvent(t)}handleInputEventAfter(t){this.onInputEventAfter(t)}setEditableFlag(t,e){this._editableFlags.set(t,e),this.manipulators.isToolEditable=this.internallyEditable,this._updateManipulatorAttachment(),0===t&&this.notifyChange("editable"),this.onEditableChange(),this.onManipulatorSelectionChanged()}getEditableFlag(t){return this._editableFlags.get(t)??!1}endDrag(){const t=this.view.inputManager.latestPointerInfo?.location;if(!t)return;let e=!1;this.manipulators.forEach(({manipulator:i})=>{i.dragging&&(e=!0,i.events.emit("drag",{action:"end",start:t,screenPoint:t}))}),e&&(this.view.toolViewManager.activeTool=null)}whenCreated(){return this._creationFinishedResolver.promise}onManipulatorSelectionChanged(){}onActivate(){}onDeactivate(){}onShow(){}onHide(){}onEditableChange(){}onInputEvent(t){}onInputEventAfter(t){}get internallyEditable(){return this.getEditableFlag(0)&&this.getEditableFlag(1)}finishToolCreation(){this.created||this._creationFinishedResolver.resolve(this),this._set("created",!0)}_syncVisible(){if(this.initialized)if(this.visible)this._show();else if(this._hide(),this.active)return void(this.view.activeTool=null)}_show(){this._updateManipulatorAttachment(),this.onShow()}_hide(){this._updateManipulatorAttachment(),this.onHide()}_updateManipulatorAttachment(){this.visible?this.manipulators.attach():this.manipulators.detach()}};t([a({constructOnly:!0})],n.prototype,"view",void 0),t([a({readOnly:!0})],n.prototype,"active",null),t([a({value:!0})],n.prototype,"visible",null),t([a({value:!0})],n.prototype,"editable",null),t([a({readOnly:!0})],n.prototype,"manipulators",void 0),t([a({readOnly:!0})],n.prototype,"updating",null),t([a()],n.prototype,"cursor",null),t([a({readOnly:!0})],n.prototype,"automaticManipulatorSelection",void 0),t([a()],n.prototype,"hasFocusedManipulators",null),t([a()],n.prototype,"hasGrabbedManipulators",void 0),t([a()],n.prototype,"hasHoveredManipulators",void 0),t([a()],n.prototype,"firstGrabbedManipulator",void 0),t([a({readOnly:!0})],n.prototype,"created",void 0),t([a({readOnly:!0})],n.prototype,"removeIncompleteOnCancel",void 0),n=t([o("esri.views.interactive.InteractiveToolBase")],n);export{n as InteractiveToolBase};
|
|
5
|
+
import{__decorate as t}from"tslib";import{EventedAccessor as e}from"../../core/Evented.js";import"../../core/has.js";import"../../core/Logger.js";import{createResolver as i}from"../../core/promiseUtils.js";import{property as a,subclass as o}from"../../core/accessorSupport/decorators.js";import{ManipulatorCollection as s}from"./ManipulatorCollection.js";let n=class extends e{constructor(t){super(t),this.manipulators=new s,this.automaticManipulatorSelection=!0,this.multiTouchEnabled=!0,this.hasGrabbedManipulators=!1,this.hasHoveredManipulators=!1,this.firstGrabbedManipulator=null,this.created=!1,this.removeIncompleteOnCancel=!0,this._editableFlags=new Map([[1,!0],[0,!0]]),this._creationFinishedResolver=i()}get active(){return null!=this.view&&this.view.activeTool===this}set visible(t){this._get("visible")!==t&&(this._set("visible",t),this._syncVisible())}get editable(){return this.getEditableFlag(0)}set editable(t){this.setEditableFlag(0,t)}get updating(){return!1}get cursor(){return null}get hasFocusedManipulators(){return this.hasGrabbedManipulators||this.hasHoveredManipulators}destroy(){this.manipulators.destroy(),this._set("view",null)}onAdd(){this._syncVisible()}activate(){null!=this.view&&(this.view.focus(),this.onActivate())}deactivate(){this.onDeactivate()}cancel(){this.emit("cancel")}handleInputEvent(t){this.onInputEvent(t)}handleInputEventAfter(t){this.onInputEventAfter(t)}setEditableFlag(t,e){this._editableFlags.set(t,e),this.manipulators.isToolEditable=this.internallyEditable,this._updateManipulatorAttachment(),0===t&&this.notifyChange("editable"),this.onEditableChange(),this.onManipulatorSelectionChanged()}getEditableFlag(t){return this._editableFlags.get(t)??!1}endDrag(){const t=this.view.inputManager.latestPointerInfo?.location;if(!t)return;let e=!1;this.manipulators.forEach(({manipulator:i})=>{i.dragging&&(e=!0,i.events.emit("drag",{action:"end",start:t,screenPoint:t}))}),e&&(this.view.toolViewManager.activeTool=null)}whenCreated(){return this._creationFinishedResolver.promise}onManipulatorSelectionChanged(){}onActivate(){}onDeactivate(){}onShow(){}onHide(){}onEditableChange(){}onInputEvent(t){}onInputEventAfter(t){}get internallyEditable(){return this.getEditableFlag(0)&&this.getEditableFlag(1)}finishToolCreation(){this.created||this._creationFinishedResolver.resolve(this),this._set("created",!0)}_syncVisible(){if(this.initialized)if(this.visible)this._show();else if(this._hide(),this.active)return void(this.view.activeTool=null)}_show(){this._updateManipulatorAttachment(),this.onShow()}_hide(){this._updateManipulatorAttachment(),this.onHide()}_updateManipulatorAttachment(){this.visible?this.manipulators.attach():this.manipulators.detach()}};t([a({constructOnly:!0})],n.prototype,"view",void 0),t([a({readOnly:!0})],n.prototype,"active",null),t([a({value:!0})],n.prototype,"visible",null),t([a({value:!0})],n.prototype,"editable",null),t([a({readOnly:!0})],n.prototype,"manipulators",void 0),t([a({readOnly:!0})],n.prototype,"updating",null),t([a()],n.prototype,"cursor",null),t([a({readOnly:!0})],n.prototype,"automaticManipulatorSelection",void 0),t([a({readOnly:!0})],n.prototype,"multiTouchEnabled",void 0),t([a()],n.prototype,"hasFocusedManipulators",null),t([a()],n.prototype,"hasGrabbedManipulators",void 0),t([a()],n.prototype,"hasHoveredManipulators",void 0),t([a()],n.prototype,"firstGrabbedManipulator",void 0),t([a({readOnly:!0})],n.prototype,"created",void 0),t([a({readOnly:!0})],n.prototype,"removeIncompleteOnCancel",void 0),n=t([o("esri.views.interactive.InteractiveToolBase")],n);export{n as InteractiveToolBase};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{find as o}from"../../core/iteratorUtils.js";import{clamp as r}from"../../core/mathUtils.js";import i from"../../core/ReactiveMap.js";import{createScreenPoint as a}from"../../core/screenUtils.js";import{property as n,subclass as s}from"../../core/accessorSupport/decorators.js";import{areToolManipulatorsEditable as l}from"./interactiveToolUtils.js";import{createScreenPointFromEvent as p}from"../support/screenUtils.js";let u=class extends e{constructor(){super(...arguments),this._pointerLocations=new Map,this._hoveredManipulators=new i,this._grabbedManipulators=new i,this._draggedManipulators=new Map,this._stopDrag=!1,this._externallyDragging=!1,this._revertToNullActiveTool=!1}get cursor(){return this._cursorFromMap(this._grabbedManipulators,"grabbing")??this._cursorFromMap(this._hoveredManipulators,"pointer")}get hasFocusedManipulators(){return this._grabbedManipulators.size>0||this._draggedManipulators.size>0}handleInputEvent(t,e){const o=()=>t.stopPropagation();switch(t.type){case"pointer-move":d(t.pointerType)&&this._pointerLocations.set(t.pointerId,{x:t.x,y:t.y,pointerType:t.pointerType});break;case"drag":this._grabbedManipulators.size>0?this._stopDrag=!0:"start"===t.action?this._externallyDragging=!0:"end"===t.action&&(this._externallyDragging=!1),this._stopDrag&&(o(),"end"===t.action&&(this._stopDrag=!1));break;case"pointer-down":{if(!g(t))break;const r=p(t),i=c(r,t.pointerType,e.tools);if(null==i)break;const a=i.manipulator,n=i.tool;null==a||null==n||!a.interactive||a.grabbable&&a.grabbableForEvent(t)||!a.grabbing||a.dragging||this._releaseManipulatorBeforeDragging(a,t,e),null!=a&&null!=n&&a.interactive&&a.grabbable&&a.grabbableForEvent(t)&&!a.grabbing&&(this._grabbedManipulators.set(t.pointerId,{manipulator:a,tool:n,start:r,pointerType:t.pointerType}),1===this._grabbedManipulators.size&&null==e.activeTool&&(this._revertToNullActiveTool=!0,e.setActiveTool(i.tool)),a.grabbing=!0,a.events.emit("grab-changed",{action:"start",pointerType:t.pointerType,screenPoint:r}),o());break}case"pointer-up":this._draggedManipulators.has(t.pointerId)||this._handlePointerEnd(t,e);break;case"pointer-drag":{if(!g(t))break;const i=this._grabbedManipulators.get(t.pointerId),a=i?.manipulator,n=i?.tool;if(null==a||null==n)break;const
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{find as o}from"../../core/iteratorUtils.js";import{clamp as r}from"../../core/mathUtils.js";import i from"../../core/ReactiveMap.js";import{createScreenPoint as a}from"../../core/screenUtils.js";import{property as n,subclass as s}from"../../core/accessorSupport/decorators.js";import{areToolManipulatorsEditable as l}from"./interactiveToolUtils.js";import{createScreenPointFromEvent as p}from"../support/screenUtils.js";let u=class extends e{constructor(){super(...arguments),this._pointerLocations=new Map,this._hoveredManipulators=new i,this._grabbedManipulators=new i,this._draggedManipulators=new Map,this._stopDrag=!1,this._externallyDragging=!1,this._revertToNullActiveTool=!1}get cursor(){return this._cursorFromMap(this._grabbedManipulators,"grabbing")??this._cursorFromMap(this._hoveredManipulators,"pointer")}get hasFocusedManipulators(){return this._grabbedManipulators.size>0||this._draggedManipulators.size>0}handleInputEvent(t,e){const o=()=>t.stopPropagation();switch(t.type){case"pointer-move":d(t.pointerType)&&this._pointerLocations.set(t.pointerId,{x:t.x,y:t.y,pointerType:t.pointerType});break;case"drag":this._grabbedManipulators.size>0?this._stopDrag=!0:"start"===t.action?this._externallyDragging=!0:"end"===t.action&&(this._externallyDragging=!1),this._stopDrag&&(o(),"end"===t.action&&(this._stopDrag=!1));break;case"pointer-down":{if(!g(t))break;const r=p(t),i=c(r,t.pointerType,e.tools);if(null==i)break;const a=i.manipulator,n=i.tool;null==a||null==n||!a.interactive||a.grabbable&&a.grabbableForEvent(t)||!a.grabbing||a.dragging||this._releaseManipulatorBeforeDragging(a,t,e),null!=a&&null!=n&&a.interactive&&a.grabbable&&a.grabbableForEvent(t)&&!a.grabbing&&(this._grabbedManipulators.set(t.pointerId,{manipulator:a,tool:n,start:r,pointerType:t.pointerType}),1===this._grabbedManipulators.size&&null==e.activeTool&&(this._revertToNullActiveTool=!0,e.setActiveTool(i.tool)),a.grabbing=!0,a.events.emit("grab-changed",{action:"start",pointerType:t.pointerType,screenPoint:r}),o());break}case"pointer-up":this._draggedManipulators.has(t.pointerId)||this._handlePointerEnd(t,e);break;case"pointer-drag":{if(!g(t))break;const i=this._grabbedManipulators.get(t.pointerId),a=i?.manipulator,n=i?.tool,{activeTool:s}=e;if(null!=s&&!s.multiTouchEnabled&&e.multiTouchActive&&0===this._draggedManipulators.size&&this._grabbedManipulators.size>0){this.clearPointers(s,e,!0);break}if(null==a||null==n)break;const l=p(t);l.x=r(l.x,0,e.view.width),l.y=r(l.y,0,e.view.height);const u=i.start,c=this._draggedManipulators.get(t.pointerId);switch(t.action){case"start":case"update":"update"!==t.action&&1!==this._grabbedManipulators.size||(a.dragging=!0,c?a.events.emit("drag",{action:"update",start:u,screenPoint:l}):a.events.emit("drag",{action:"start",start:u,screenPoint:l,pointerType:t.pointerType}),this._draggedManipulators.set(t.pointerId,{tool:n,manipulator:a,start:u}));break;case"end":a.dragging=!1,c&&a.events.emit("drag",{action:"end",start:u,screenPoint:l}),this._draggedManipulators.delete(t.pointerId),this._handlePointerEnd(t,e)}o();break}case"immediate-click":{const r=p(t),i=c(r,t.pointerType,e.tools);if(!h(t))for(const t of e.tools)if((null==i||i.tool!==t||t.automaticManipulatorSelection)&&t.manipulators){let e=!1;t.manipulators.forEach(({manipulator:t})=>{t.selected&&(t.selected=!1,e=!0)}),e&&t.onManipulatorSelectionChanged&&t.onManipulatorSelectionChanged()}if(null==i)break;const{manipulator:a,tool:n}=i;if(!a.interactive)break;a.selectable&&n.automaticManipulatorSelection&&(a.selected=!a.selected,n.onManipulatorSelectionChanged&&n.onManipulatorSelectionChanged());const s=t.native.shiftKey;a.events.emit("immediate-click",{screenPoint:r,button:t.button,pointerType:t.pointerType,shiftKey:s,stopPropagation:o}),b(a,o);break}case"click":{const r=p(t),i=c(r,t.pointerType,e.tools),a=i?.manipulator;if(null==a||!a.interactive)break;const n=t.native.shiftKey;a.events.emit(t.type,{screenPoint:r,button:t.button,pointerType:t.pointerType,shiftKey:n}),o();break}case"double-click":{const r=p(t),i=c(r,t.pointerType,e.tools),a=null!=i?i.manipulator:null;if(null==a||!a.interactive)break;const n=t.native.shiftKey;a.events.emit("double-click",{screenPoint:r,button:t.button,pointerType:t.pointerType,shiftKey:n,stopPropagation:o}),b(a,o);break}case"immediate-double-click":{const r=p(t),i=c(r,t.pointerType,e.tools),a=null!=i?i.manipulator:null;if(null==a||!a.interactive)break;const n=t.native.shiftKey;a.events.emit("immediate-double-click",{screenPoint:r,button:t.button,pointerType:t.pointerType,shiftKey:n,stopPropagation:o}),"mouse"===t.pointerType&&b(a,o);break}}this._onFocusChange(e.tools)}_releaseManipulatorBeforeDragging(t,e,o){t.grabbing=!1,t.events.emit("grab-changed",{action:"end",pointerType:e.pointerType,screenPoint:p(e)}),this._grabbedManipulators.forEach(({manipulator:e},o)=>{e===t&&this._grabbedManipulators.delete(o)}),this._afterManipulatorRelease(o.setActiveTool)}_handlePointerEnd(t,e){const o=this._grabbedManipulators.get(t.pointerId)?.manipulator;null!=o&&o.grabbing&&(o.grabbing=!1,o.events.emit("grab-changed",{action:"end",pointerType:t.pointerType,screenPoint:p(t)}),this._grabbedManipulators.delete(t.pointerId),this._afterManipulatorRelease(e.setActiveTool))}_onFocusChange(t){this._updateFocusedManipulatorTools(t)}_updateFocusedManipulatorTools(t){const e=new Set,r=new Set;this._grabbedManipulators.forEach(({tool:t})=>e.add(t)),this._hoveredManipulators.forEach(({tool:t})=>r.add(t));for(const i of t){i.hasGrabbedManipulators=e.has(i),i.hasHoveredManipulators=r.has(i);const t=this._grabbedManipulators.values(),a=o(t,({tool:t})=>t===i);i.firstGrabbedManipulator=null!=a?a.manipulator:null}}clearPointers(t,{tools:e,setActiveTool:o},r=!0,i){const a=(e,o)=>!(null!=t&&e!==t||null!=i&&i!==o);this._grabbedManipulators.forEach(({tool:t,manipulator:e,pointerType:o},r)=>{a(t,e)&&(this._grabbedManipulators.delete(r),e.grabbing=!1,e.events.emit("grab-changed",{action:"end",screenPoint:null,pointerType:o}))}),this._draggedManipulators.forEach(({tool:t,manipulator:e},o)=>{a(t,e)&&(this._draggedManipulators.delete(o),e.dragging=!1,e.events.emit("drag",{action:"cancel"}))}),r&&this._hoveredManipulators.forEach(({tool:t,manipulator:e},o)=>{a(t,e)&&(this._hoveredManipulators.delete(o),e.hovering=!1)}),this._afterManipulatorRelease(o),this._onFocusChange(e)}updateHoveredStateFromKnownPointers(t){this._pointerLocations.forEach((e,o)=>{this._updateHoveredStateForPointerAtScreenPosition(a(e.x,e.y),o,e.pointerType,t)})}handleHoverEvent(t,e){const o=t.type;"pointer-up"!==o&&"immediate-click"!==o&&"pointer-move"!==o||!d(t.pointerType)||("pointer-up"!==o&&this._externallyDragging?this._clearHoveredManipulatorStates(t.pointerId):this._updateHoveredStateForPointerAtScreenPosition(p(t),t.pointerId,t.pointerType,e))}_updateHoveredStateForPointerAtScreenPosition(t,e,o,r){let i=c(t,o,r);const a=this._hoveredManipulators.get(e)?.manipulator;null==i||i.manipulator.interactive||(i=null),null!=i&&a===i.manipulator||(null!=a&&(a.hovering=!1),null!=i?(i.manipulator.hovering=!0,this._hoveredManipulators.set(e,i)):this._hoveredManipulators.delete(e),this._onFocusChange(r))}_afterManipulatorRelease(t){0===this._grabbedManipulators.size&&this._revertToNullActiveTool&&(t(null),this._revertToNullActiveTool=!1)}_clearHoveredManipulatorStates(t){this._hoveredManipulators.forEach(({manipulator:e},o)=>{t===o&&(this._hoveredManipulators.delete(t),e.hovering=!1)})}_cursorFromMap(t,e){if(!t?.size)return null;for(const{manipulator:o}of t.values())if(o?.interactive){if(o.grabbing&&o.grabCursor)return o.grabCursor;if(o.cursor)return o.cursor}return e}};function c(t,e,o){for(const r of o){if(null==r.manipulators||!l(r))continue;const o=r.manipulators.intersect(t,e);if(null!=o)return{tool:r,manipulator:o}}return null}function d(t){return"mouse"===t}function g(t){return"mouse"!==t.pointerType||0===t.button}function h(t){return!!t.native.shiftKey}function b(t,e){t?.consumesClicks&&e()}t([n()],u.prototype,"cursor",null),u=t([s("esri.views.interactive.ToolViewManagerManipulatorState")],u);export{u as ToolViewManagerManipulatorState};
|
package/widgets/Slider.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import i from"../core/Collection.js";import{assertIsSome as n}from"../core/maybe.js";import{property as s,cast as o,subclass as r}from"../core/accessorSupport/decorators.js";import a from"./Widget.js";import{css as l}from"./Slider/css.js";import h from"./Slider/SliderViewModel.js";import{globalCss as u}from"./support/globalCss.js";import{messageBundle as d,tsx as c}from"./support/widget.js";import{onResize as m}from"./support/widgetUtils.js";const _={showInput:"Enter",hideInput1:"Enter",hideInput2:"Escape",hideInput3:"Tab",moveAnchorUp:"ArrowUp",moveAnchorDown:"ArrowDown",moveAnchorLeft:"ArrowLeft",moveAnchorRight:"ArrowRight",moveAnchorToMax:"End",moveAnchorToMin:"Home"},p={labels:!1,rangeLabels:!1};let v=class extends a{constructor(e,t){super(e,t),this._activeLabelInputIndex=null,this._anchorElements=[],this._dragged=!1,this._dragStartInfo=null,this._focusedAnchorIndex=null,this._isMinInputActive=!1,this._isMaxInputActive=!1,this._lastMovedHandleIndex=null,this._positionPrecision=5,this._segmentDragStartInfo=null,this._trackHeight=null,this._trackWidth=null,this._zIndices=[],this._zIndexOffset=3,this.disabled=!1,this.draggableSegmentsEnabled=!0,this.effectiveSegmentElements=new i,this.extraNodes=[],this.inputCreatedFunction=null,this.labelElements=new i,this.labelInputsEnabled=!1,this.maxLabelElement=null,this.messages=null,this.minLabelElement=null,this.rangeLabelInputsEnabled=!1,this.segmentElements=new i,this.snapOnClickEnabled=!0,this.steps=null,this.syncedSegmentsEnabled=!1,this.thumbCreatedFunction=null,this.thumbElements=new i,this.tickElements=new i,this.trackElement=null,this.viewModel=new h,this.visibleElements={...p},this._onAnchorPointerDown=this._onAnchorPointerDown.bind(this),this._onAnchorPointerMove=this._onAnchorPointerMove.bind(this),this._onAnchorPointerUp=this._onAnchorPointerUp.bind(this),this._onLabelPointerDown=this._onLabelPointerDown.bind(this),this._onLabelPointerUp=this._onLabelPointerUp.bind(this),this._onSegmentPointerDown=this._onSegmentPointerDown.bind(this),this._onSegmentPointerMove=this._onSegmentPointerMove.bind(this),this._onSegmentPointerUp=this._onSegmentPointerUp.bind(this),this._onTrackPointerDown=this._onTrackPointerDown.bind(this),this._onTrackPointerMove=this._onTrackPointerMove.bind(this),this._onTrackPointerUp=this._onTrackPointerUp.bind(this)}destroy(){document.removeEventListener("pointerup",this._onLabelPointerUp),document.removeEventListener("pointermove",this._onLabelPointerMove),document.removeEventListener("pointerup",this._onAnchorPointerUp),document.removeEventListener("pointermove",this._onAnchorPointerMove),this.labelElements.removeAll(),this.labelElements.destroy(),this.segmentElements.removeAll(),this.segmentElements.destroy(),this.effectiveSegmentElements.removeAll(),this.effectiveSegmentElements.destroy(),this.thumbElements.removeAll(),this.thumbElements.destroy(),this.tickElements.removeAll(),this.tickElements.destroy()}get _isDisabled(){return this.disabled||"disabled"===this.state}get effectiveMax(){return this.viewModel.effectiveMax}set effectiveMax(e){this.viewModel.effectiveMax=e}get effectiveMin(){return this.viewModel.effectiveMin}set effectiveMin(e){this.viewModel.effectiveMin=e}get inputFormatFunction(){return this.viewModel.inputFormatFunction}set inputFormatFunction(e){this.viewModel.inputFormatFunction=e}get inputParseFunction(){return this.viewModel.inputParseFunction}set inputParseFunction(e){this.viewModel.inputParseFunction=e}get icon(){return"caret-double-horizontal"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get labelFormatFunction(){return this.viewModel.labelFormatFunction}set labelFormatFunction(e){this.viewModel.labelFormatFunction=e}get labels(){return this.viewModel.labels}set layout(e){["vertical","vertical-reversed","horizontal","horizontal-reversed"].includes(e)||(e="horizontal"),this._set("layout",e)}get max(){return this.viewModel.max}set max(e){this.viewModel.max=e}get min(){return this.viewModel.min}set min(e){this.viewModel.min=e}get precision(){return this.viewModel.precision}set precision(e){this.viewModel.precision=e}get state(){const{_activeLabelInputIndex:e,_isMaxInputActive:t,_isMinInputActive:i,_dragStartInfo:n,_segmentDragStartInfo:s,disabled:o,viewModel:r}=this;return o?"disabled":!(null===e&&!t&&!i)?"editing":null!=n||null!=s?"dragging":r.state}get thumbsConstrained(){return this.viewModel.thumbsConstrained}set thumbsConstrained(e){this.viewModel.thumbsConstrained=e}set tickConfigs(e){this._set("tickConfigs",e),this.scheduleRender()}get values(){return this.viewModel.values}set values(e){this.viewModel.values=e}castVisibleElements(e){return{...p,...e}}render(){const{label:e}=this,t=this.classes(l.base,u.widget,this._isHorizontalLayout()?l.horizontalLayout:l.verticalLayout,this._isReversedLayout()?l.reversed:null,this._isDisabled?u.disabled:null);return this._storeTrackDimensions(),c("div",{afterCreate:this._afterContainerCreate,"aria-label":e,bind:this,class:t,"touch-action":"none"},this._renderContent())}toNextStep(e){this._toStep(e,1)}toPreviousStep(e){this._toStep(e,-1)}getCurrentPosition(){return this._positionFromValue(this.values?.[0]??0)}_renderContent(){const{max:e,min:t}=this;if(!(null==t||null==e||t>=e))return[this._renderMin(),this._renderSliderContainer(),this._renderMax()]}_renderSliderContainer(){return c("div",{bind:this,class:l.contentElement,key:"slider-container"},this._renderTrackElement(),this._renderTicksContainer(),this._renderExtraContentElements())}_renderTrackElement(){return c("div",{afterCreate:this._afterTrackCreate,afterRemoved:this._afterTrackRemoved,bind:this,class:l.trackElement,"touch-action":"none"},this._renderEffectiveSegmentElements(),this._renderSegmentElements(),this._renderAnchorElements())}_renderEffectiveSegmentElements(){if(!this.trackElement||!this.values?.length)return;const e=null!=this.effectiveMax,t=null!=this.effectiveMin;if(!e&&!t)return;const{max:i,min:n,viewModel:s}=this,o=s.getBounds(),r=[];return t&&r.push(this._renderEffectiveSegmentElement(n,o.min,!0)),e&&r.push(this._renderEffectiveSegmentElement(o.max,i,!1)),r}_renderSegmentElements(){if(!this.trackElement||!this.values?.length)return;const e=this.values.length,t=[];for(let i=0;i<=e;i++)t.push(this._renderSegmentElement(i));return t}_renderSegmentElement(e){const{_trackHeight:t,_trackWidth:i,draggableSegmentsEnabled:n,id:s,state:o}=this,r=this.values,a=this._isHorizontalLayout(),h=a?i:t,u=this.viewModel.getBounds(),d=this._positionFromValue(u.max),m=this._positionFromValue(u.min),_=e===r?.length?null:e,p=0===e?null:e-1,v=null!=_,g=null!=p;let f,b;const E=[...r].sort((e,t)=>e-t);this._isReversedLayout()?(f=g?this._positionFromValue(E[p]):m,b=v?this._positionFromValue(E[_]):d):(f=v?this._positionFromValue(E[_]):d,b=g?this._positionFromValue(E[p]):m);const x=this._applyPrecisionToPosition(100*b/h),y=(f-b)/h,P=a?`transform: translate(${x}%, 0px) scale(${y}, 1);`:`transform: translate(0px, ${x}%) scale(1, ${y});`,k=this.classes(l.segmentElement,l.segmentElementIndexPrefix+e,n&&v&&g&&"disabled"!==o?l.segmentElementInteractive:null);return c("div",{afterCreate:this._afterSegmentCreate,afterRemoved:this._afterSegmentRemoved,bind:this,class:k,"data-max-thumb-index":_,"data-min-thumb-index":p,"data-segment-index":e,key:`${s}-segment-${e}`,style:P,"touch-action":"none"})}_renderEffectiveSegmentElement(e,t,i){const{_trackHeight:n,_trackWidth:s,layout:o}=this,r=this._positionFromValue(e),a=this._positionFromValue(t),h=this._isHorizontalLayout(),u=h?s:n,d=this._applyPrecisionToPosition(100*r/u);let m=null;if("horizontal"===o){const e=i?u-a:a,t=r===u?0:d;m=`clip-path: inset(0% ${a===u?0:this._applyPrecisionToPosition(e/u*100)}% 0% ${t}%);`}else{const e=(a-r)/u;m=h?`transform: translate(${d}%, 0px) scale(${e}, 1);`:`transform: translate(0px, ${d}%) scale(1, ${e});`}const _=i?l.effectiveMinSegmentElement:l.effectiveMaxSegmentElement,p=this.classes(l.segmentElement,l.effectiveSegmentElement,_);return c("div",{afterCreate:this._afterEffectiveSegmentCreate,afterRemoved:this._afterEffectiveSegmentRemoved,bind:this,class:p,style:m,"touch-action":"none"})}_renderAnchorElements(){const{trackElement:e,values:t}=this;if(t?.length)return this._zIndices=t.map((e,i)=>{const n=this._positionFromValue(e),s=this._positionToPercent(n),o=(this._isHorizontalLayout()?s>50:s<50)?-1:1;return this._zIndexOffset+(t.length+o*i)}),e&&t&&t.length?t.map((e,t)=>this._renderAnchorElement(e,t)):null}_renderAnchorElement(e,i){const n=this._positionFromValue(e),s=this._valueFromPosition(n);if(null==s||isNaN(s))return;const{_dragStartInfo:o,_lastMovedHandleIndex:r,id:a,layout:h,visibleElements:{labels:u}}=this,d=this.values,m=o?.index===i,_=r===i,p=this.classes(l.anchorElement,l.anchorElementIndexPrefix+i,m?l.movingAnchorElement:null,_?l.lastMovedAnchorElement:null),v=this.labels.values[i],g=this._getStyleForAnchor(e,i,m||_),{min:f,max:b}=this.viewModel.getBoundsForValueAtIndex(i),{disabled:E,messages:x}=this,y=2===d.length?t(0===i?x.rangeMinimum:x.rangeMaximum,{value:e}):v,P=1===d.length?null:0===i?`${a}-handle-${i+1}`:i===d.length-1?`${a}-handle-${i-1}`:`${a}-handle-${i-1} ${a}-handle-${i+1}`;return c("div",{afterCreate:this._afterAnchorCreate,afterRemoved:this._afterAnchorRemoved,afterUpdate:this._afterAnchorUpdate,"aria-controls":P,"aria-label":x.sliderValue,"aria-labelledby":u?`${a}-label-${i}`:null,"aria-orientation":h,"aria-valuemax":b?.toString(),"aria-valuemin":f?.toString(),"aria-valuenow":e.toString(),"aria-valuetext":y,bind:this,class:p,"data-thumb-index":i,"data-value":e,id:`${a}-handle-${i}`,key:`${a}-handle-${i}`,onkeydown:this._onAnchorKeyDown,role:"slider",style:g,tabIndex:E?-1:0,"touch-action":"none"},c("span",{afterCreate:this._afterThumbCreate,afterRemoved:this._afterThumbRemoved,bind:this,class:l.thumbElement,"data-thumb-index":i,"touch-action":"none"}),this.renderThumbLabel(i))}renderThumbLabel(e){const{id:t,labels:i,labelInputsEnabled:n,state:s}=this,o=this.visibleElements.labels,r=i.values[e],a=this.classes(l.labelElement,o?null:u.hidden,n&&"disabled"!==s?l.labelElementInteractive:null);return c("span",{afterCreate:this._afterLabelCreate,afterRemoved:this._afterLabelRemoved,"aria-hidden":(!o).toString(),bind:this,class:a,"data-thumb-index":e,id:`${t}-label-${e}`,key:`${t}-label-${e}`,role:n?"button":void 0,"touch-action":"none"},this._activeLabelInputIndex===e?this._renderValueInput(e):r)}_renderValueInput(e){const{disabled:t,values:i}=this;if(null==i)return;const n=i[e];return c("input",{afterCreate:this._afterInputCreate,"aria-label":this.messages.sliderValue,bind:this,class:l.labelInput,"data-input-index":e,"data-input-type":"thumb",key:`value-input-${e}`,onblur:this._onLabelInputBlur,onkeydown:this._onInputKeyDown,required:!0,tabIndex:t?-1:0,type:"text",value:this._formatInputValue(n,"value",e)})}_renderMax(){const{_isMaxInputActive:e,labels:t,rangeLabelInputsEnabled:i,state:n}=this,s=this.visibleElements.rangeLabels,o=this.classes(l.maxElement,{[u.hidden]:!s,[l.maxElementInteractive]:i&&"disabled"!==n,[l.rangeElementActive]:e});return c("div",{afterCreate:this._afterMaxLabelCreate,"aria-hidden":(!s).toString(),bind:this,class:o,onclick:this._onMaxLabelClick,onkeydown:this._onMaxLabelKeyDown,role:i?"button":void 0,tabIndex:!this.disabled&&i?0:-1},e?this._renderMaxInput():t.max)}_renderMin(){const{_isMinInputActive:e,labels:t,rangeLabelInputsEnabled:i,state:n}=this,s=this.visibleElements.rangeLabels,o=this.classes(l.minElement,{[u.hidden]:!s,[l.minElementInteractive]:i&&"disabled"!==n,[l.rangeElementActive]:e});return c("div",{afterCreate:this._afterMinLabelCreate,"aria-hidden":(!s).toString(),bind:this,class:o,onclick:this._onMinLabelClick,onkeydown:this._onMinLabelKeyDown,role:i?"button":void 0,tabIndex:!this.disabled&&i?0:-1},e?this._renderMinInput():t.min)}_renderMaxInput(){return c("input",{afterCreate:this._afterInputCreate,"aria-label":this.messages.maximumValue,bind:this,class:l.rangeInput,"data-input-type":"max",onblur:this._onMaxInputBlur,onkeydown:this._onInputKeyDown,required:!0,tabIndex:this.disabled?-1:0,type:"text",value:this._formatInputValue(this.max,"max")})}_renderMinInput(){return c("input",{afterCreate:this._afterInputCreate,"aria-label":this.messages.minimumValue,bind:this,class:l.rangeInput,"data-input-type":"min",onblur:this._onMinInputBlur,onkeydown:this._onInputKeyDown,required:!0,tabIndex:this.disabled?-1:0,type:"text",value:this._formatInputValue(this.min,"min")})}_renderExtraContentElements(){return c("div",{bind:this,class:l.extraContentElement},this.extraNodes)}_renderTicksContainer(){if(this.tickConfigs&&this.trackElement&&(0!==this._trackHeight||0!==this._trackWidth))return this.tickConfigs.map((e,t)=>c("div",{class:this.classes(l.ticksContainerElement),key:"ticks-container"},this._renderTicks(e,t)))}_renderTicks(e,t){const{mode:n,values:s}=e;if(this.tickElements.at(t)||this.tickElements.add(new i,t),"position"===n){const i=Array.isArray(s)?s:[s];return this._calculateTickPositions(i).map((i,n)=>this._renderTickGroup(e,n,t,i))}if("percent"===n&&Array.isArray(s)){const i=this.min??0,n=(this.max??0)-i,o=s.map(e=>this._applyPrecisionToPosition(e/100*n+i));return this._calculateTickPositions(o).map((i,n)=>this._renderTickGroup(e,n,t,i))}const o=Array.isArray(s)&&s.length?s[0]:isNaN(s)?null:s,r=this._getTickCounts(o,e);return this._calculateEquidistantTickPositions(r).map((i,n)=>this._renderTickGroup(e,n,t,i))}_renderTickGroup(e,t,i,n){const s="position"===e.mode?Array.isArray(e.values)?e.values[t]:e.values:this._valueFromPosition(n);if(null!=s&&!isNaN(s))return c("div",{afterCreate:this._afterTickGroupCreate,afterRemoved:this._afterTickGroupRemoved,bind:this,"data-config":e,"data-position":n,"data-tick-config-index":i,"data-tick-group-index":t,"data-value":s,key:`tick-group-${t}`,onclick:this._onTickGroupClick},this._renderTickLine(e,t,i,s),e.labelsVisible?this._renderTickLabel(e,t,i,s):null)}_renderTickLine(e,t,i,n){return c("div",{afterCreate:this._afterTickLineCreate,"aria-valuenow":n.toString(),bind:this,class:l.tickElement,"data-config":e,"data-tick-config-index":i,"data-tick-group-index":t,"data-value":n,key:`tick-label-${t}`,style:this._getPositionStyleForElement(n)})}_renderTickLabel(e,t,i,n){const s=e.labelFormatFunction?e.labelFormatFunction(n,"tick",t):this.viewModel.getLabelForValue(n,"tick",t);return c("div",{afterCreate:this._afterTickLabelCreate,"aria-label":s,"aria-valuenow":n.toString(),"aria-valuetext":s,bind:this,class:l.tickLabelElement,"data-config":e,"data-tick-config-index":i,"data-tick-group-index":t,"data-value":n,key:`tick-label-${t}`,style:`transform: translate(-50%); ${this._getPositionStyleForElement(n)}`},s)}_afterContainerCreate(e){this.addHandles(m(e,()=>this.scheduleRender()))}_afterTrackCreate(e){this._set("trackElement",e),e.addEventListener("pointerdown",this._onTrackPointerDown),this.scheduleRender()}_afterTrackRemoved(e){e.removeEventListener("pointerdown",this._onTrackPointerDown),document.removeEventListener("pointermove",this._onTrackPointerMove),document.removeEventListener("pointerup",this._onTrackPointerUp)}_afterSegmentCreate(e){this.segmentElements.add(e),e.addEventListener("pointerdown",this._onSegmentPointerDown)}_afterSegmentRemoved(e){this.segmentElements.remove(e),e.removeEventListener("pointerdown",this._onSegmentPointerDown)}_afterEffectiveSegmentCreate(e){this.effectiveSegmentElements.add(e)}_afterEffectiveSegmentRemoved(e){this.effectiveSegmentElements.remove(e)}_afterAnchorCreate(e){if(this._anchorElements.push(e),e.addEventListener("pointerdown",this._onAnchorPointerDown),this.thumbCreatedFunction){const t=g(e),i=y(e),n=this.thumbElements.at(t),s=this.labelElements.at(t)||null;this.thumbCreatedFunction(t,i,n,s)}}_afterAnchorUpdate(e){if(null!=this._focusedAnchorIndex){g(e)===this._focusedAnchorIndex&&(e.focus(),this._focusedAnchorIndex=null)}}_afterAnchorRemoved(e){const t=this._anchorElements.indexOf(e,0);t>-1&&this._anchorElements.splice(t,1),e.removeEventListener("pointerdown",this._onAnchorPointerDown)}_afterThumbCreate(e){this.thumbElements.add(e)}_afterThumbRemoved(e){this.thumbElements.remove(e)}_afterLabelCreate(e){this.labelElements.add(e),e.addEventListener("pointerdown",this._onLabelPointerDown),e.addEventListener("pointerup",this._onLabelPointerUp)}_afterLabelRemoved(e){this.labelElements.remove(e),e.removeEventListener("pointerdown",this._onLabelPointerDown),e.removeEventListener("pointerup",this._onLabelPointerUp)}_afterInputCreate(e){if(e.focus(),e.select(),this.inputCreatedFunction){const t=e.getAttribute("data-input-type"),i="thumb"===t?f(e):null;this.inputCreatedFunction(e,t,i)}}_afterTickLineCreate(e){const t=P(e),i=k(e),n=this.tickElements.at(t),s=n.at(i);s?s.tickElement=e:n.add({groupElement:null,tickElement:e,labelElement:null},i)}_afterTickLabelCreate(e){const t=P(e),i=k(e),n=this.tickElements.at(t),s=n.at(i);s?s.labelElement=e:n.add({groupElement:null,labelElement:e,tickElement:null},i)}_afterTickGroupRemoved(e){const t=P(e),i=this.tickElements.items[t],n=i?.find(t=>t.groupElement===e);n&&i.remove(n)}_afterTickGroupCreate(e){const t=I(e);if(t?.tickCreatedFunction){const i=P(e),n=k(e),s=y(e),o=this.tickElements?.at(i)?.at(n);if(o){o.groupElement=e;const i=o.tickElement||null,n=o.labelElement||null;t.tickCreatedFunction(s,i,n)}}}_afterMaxLabelCreate(e){this._set("maxLabelElement",e)}_afterMinLabelCreate(e){this._set("minLabelElement",e)}_onAnchorKeyDown(e){if(this._isDisabled||"editing"===this.state)return;const{key:t,target:i}=e,n=this.values,s=g(i),o=this._anchorElements[s],r=n[s],a=[_.moveAnchorUp,_.moveAnchorDown,_.moveAnchorLeft,_.moveAnchorRight];if(t===_.showInput&&this.labelInputsEnabled)this._activeLabelInputIndex=s;else if(a.includes(t)){e.preventDefault();const{steps:i}=this,n=t===_.moveAnchorUp||t===_.moveAnchorRight?1:-1;if(null!=i)this._toStep(s,this._isReversedLayout()?-1*n:n);else{const{precision:e}=this,t=this._getPositionOfElement(o),i=this._valueFromPosition(t),r=this._isHorizontalLayout()?n:-1*n;let a;a=0===e?this._positionFromValue(i+r):1===e?this._positionFromValue(i+.1*r):t+r,this._toPosition(s,a)}const a=this.values[s];r!==a&&this._emitThumbChangeEvent({index:s,oldValue:r,value:a})}else if(t===_.moveAnchorToMax||t===_.moveAnchorToMin){e.preventDefault();const{min:i,max:n}=this._getAnchorBoundsInPixels(s),o=this._isPositionInverted()?t===_.moveAnchorToMax?i:n:t===_.moveAnchorToMin?i:n;this._toPosition(s,o);const a=this.values[s];r!==a&&this._emitThumbChangeEvent({index:s,oldValue:r,value:a})}}_onAnchorPointerDown(e){if(this._isDisabled)return;const{target:t,clientX:i,clientY:n}=e,s=g(t);null!=s&&(e.preventDefault(),this._anchorElements[s]&&this._anchorElements[s].focus(),this._storeTrackDimensions(),this._dragStartInfo={clientX:i,clientY:n,index:s,position:this._getPositionOfElement(this._anchorElements[s])},document.addEventListener("pointerup",this._onAnchorPointerUp),document.addEventListener("pointermove",this._onAnchorPointerMove))}_onAnchorPointerMove(e){if("editing"===this.state||!this._dragStartInfo)return;e.preventDefault();const{values:t,_anchorElements:i,_dragged:n,_dragStartInfo:s,_dragStartInfo:{index:o,position:r}}=this,{clientX:a,clientY:l}=e,h=n?"drag":"start",u=i[o],d=this._getPositionOfElement(u),c=this._applyPrecisionToPosition(this._isHorizontalLayout()?r+a-s.clientX:r+l-s.clientY);if(d===c)return;const m=t[o];this._dragged=!0,this._toPosition(o,c);const _=this.values[o];n?m!==_&&this._emitThumbDragEvent({index:o,state:h,value:_}):this._emitThumbDragEvent({index:o,state:h,value:m})}_onAnchorPointerUp(e){if(document.removeEventListener("pointerup",this._onAnchorPointerUp),document.removeEventListener("pointermove",this._onAnchorPointerMove),!this._dragStartInfo)return;e.preventDefault();const{index:t}=this._dragStartInfo,i=this._dragged,n=this.values[t];this._dragged=!1,this._dragStartInfo=null,this._lastMovedHandleIndex=t,i?this._emitThumbDragEvent({index:t,state:"stop",value:n}):(this.scheduleRender(),"editing"!==this.state&&this._emitThumbClickEvent({index:t,value:n}))}_onTrackPointerDown(e){const{_dragStartInfo:t,snapOnClickEnabled:i,state:n,values:s}=this;if(this._isDisabled||"editing"===n||t)return;if(document.addEventListener("pointermove",this._onTrackPointerMove),document.addEventListener("pointerup",this._onTrackPointerUp),!i||!s?.length)return;const{steps:o}=this,{clientX:r,clientY:a}=e,l=this._getCursorPositionFromEvent(e),h=this._valueFromPosition(l),u=this._getIndexOfNearestValue(h),d=s[u],c=s.some((e,t)=>e===d&&t!==u)&&h>d?s.lastIndexOf(d):u;if(null==c)return;const m=s[c],_=null!=o?this._calculateNearestStepPosition(l):l;this._toPosition(c,_),this._dragged=!0,this._dragStartInfo={clientX:r,clientY:a,index:c,position:_},this._focusedAnchorIndex=c,this._emitThumbDragEvent({index:c,state:"start",value:m});const p=this.values[c];m!==p&&this._emitThumbDragEvent({index:c,state:"drag",value:p}),document.addEventListener("pointerup",this._onAnchorPointerUp),document.addEventListener("pointermove",this._onAnchorPointerMove)}_onTrackPointerMove(e){e.preventDefault(),this._dragged=!0}_onTrackPointerUp(e){if(e.preventDefault(),document.removeEventListener("pointermove",this._onTrackPointerMove),document.removeEventListener("pointerup",this._onTrackPointerUp),this.snapOnClickEnabled||(this._dragged=!1),!this._dragged){const t=this._getCursorPositionFromEvent(e),i=this._valueFromPosition(t);this._emitTrackClickEvent({value:i})}}_onSegmentPointerDown(e){e.preventDefault();const t=e.target,i=b(t),n=E(t),s=x(t);if(this._isDisabled||null==n||null==s)return;e.stopPropagation(),this._storeTrackDimensions(),document.addEventListener("pointerup",this._onSegmentPointerUp);const o=this._getAnchorDetails(n),r=this._getAnchorDetails(s);this.syncedSegmentsEnabled?(this.segmentElements.forEach(e=>e.classList.add(l.segmentElementActive)),this._anchorElements.forEach(e=>e.classList.add(l.anchorElementActive))):(this.segmentElements.at(i).classList.add(l.segmentElementActive),this._anchorElements[o.index]?.classList.add(l.anchorElementActive),this._anchorElements[r.index]?.classList.add(l.anchorElementActive)),this._segmentDragStartInfo={cursorPosition:this._getCursorPositionFromEvent(e),index:i,details:this._normalizeSegmentDetails({min:o,max:r})},this.draggableSegmentsEnabled&&(document.addEventListener("pointermove",this._onSegmentPointerMove),this._emitSegmentDragEvent({index:i,state:"start",thumbIndices:[n,s]}))}_onSegmentPointerMove(e){if(!this._segmentDragStartInfo)return;e.preventDefault();const{_trackHeight:t,_trackWidth:i,_segmentDragStartInfo:{index:n,cursorPosition:s,details:{min:o,max:r}}}=this,{index:a,position:l,value:h}=o,{index:u,position:d,value:c}=r;this._dragged=!0;const m=this._getCursorPositionFromEvent(e);if(m===s)return;const _=this._positionToPercent(s),p=this._positionToPercent(m)-_,v=this._positionToPercent(l)+p,g=this._positionToPercent(d)+p,{min:f}=this._getAnchorBoundsAsPercents(a),{max:b}=this._getAnchorBoundsAsPercents(u);let E=!1,x=!1;if(v<f?E=!0:g>b&&(x=!0),E){const{min:e,max:t}=this.viewModel.getBoundsForValueAtIndex(a),i=this._isPositionInverted()?t:e,n=i,s=c+(i-h),o=s-this.values[u];return void(this.syncedSegmentsEnabled?this._updateAnchorValuesByDifference(o):this._updateAnchorValues([a,u],[n,s]))}if(x){const{min:e,max:t}=this.viewModel.getBoundsForValueAtIndex(u),i=this._isPositionInverted()?e:t,n=i,s=h+(i-c),o=s-this.values[a];return void(this.syncedSegmentsEnabled?this._updateAnchorValuesByDifference(o):this._updateAnchorValues([a,u],[s,n]))}const y=this._isHorizontalLayout()?i:t,P=g/100*y,k=v/100*y,I=this.values,A=[I[a],I[u]],M=this._getValueForAnchorAtPosition(a,k),L=this._getValueForAnchorAtPosition(u,P);this.syncedSegmentsEnabled?this._updateAnchorValuesByDifference(M-A[0]):this._updateAnchorValues([a,u],[M,L]);[this.values[a],this.values[u]].every((e,t)=>e===A[t])||this._emitSegmentDragEvent({index:n,state:"drag",thumbIndices:[a,u]})}_onSegmentPointerUp(e){if(e.preventDefault(),document.removeEventListener("pointerup",this._onSegmentPointerUp),document.removeEventListener("pointermove",this._onSegmentPointerMove),!this._segmentDragStartInfo)return;const{_dragged:t}=this,i=this.min,n=this.max,s=this.values,{index:o,details:{min:{index:r},max:{index:a}}}=this._segmentDragStartInfo;if(this.segmentElements.forEach(e=>e.classList.remove(l.segmentElementActive)),this._anchorElements.forEach(e=>e.classList.remove(l.anchorElementActive)),this.draggableSegmentsEnabled){const e=n-i,t=s[r],l=s[a];this._lastMovedHandleIndex=t===l?t>e/2?r:a:null,this._dragged=!1,this._segmentDragStartInfo=null,this._emitSegmentDragEvent({index:o,state:"stop",thumbIndices:[r,a]})}if(!t){const t=this._getCursorPositionFromEvent(e),i=this._valueFromPosition(t);this._emitSegmentClickEvent({index:o,value:i,thumbIndices:[r,a]})}}_onTickGroupClick(e){const t=e.target;if(I(t)){const e=P(t),i=k(t),n=y(t);this._emitTickClickEvent({configIndex:e,groupIndex:i,value:n})}}_storeTrackDimensions(){if(this.trackElement){const e=this._getDimensions(this.trackElement);this._trackHeight=this._applyPrecisionToPosition(e.height),this._trackWidth=this._applyPrecisionToPosition(e.width)}}_onLabelPointerDown(){this._isDisabled||(this._dragged=!1,document.addEventListener("pointerup",this._onAnchorPointerUp),document.addEventListener("pointermove",this._onAnchorPointerMove))}_onLabelPointerMove(){this._isDisabled||(this._dragged=!0)}_onLabelPointerUp(e){if(this._isDisabled)return;const t=g(e.target);this.labelInputsEnabled&&!this._dragged&&null!=t&&(this._activeLabelInputIndex=t),this._dragged=!1,document.removeEventListener("pointerup",this._onLabelPointerUp),document.removeEventListener("pointermove",this._onLabelPointerMove)}_onLabelInputBlur(e){const{_activeLabelInputIndex:t,values:i,viewModel:n}=this,s=e.target.value;if(this._activeLabelInputIndex=null,!s||null==t||null==i)return;const o=this._parseInputValue(s,"value",t),r=i[t],{min:a,max:l}=this.viewModel.getBoundsForValueAtIndex(t);if(o<a||o>l)return;n.setValue(t,o);const h=this.values[t];r!==h&&this._emitThumbChangeEvent({index:t,oldValue:r,value:h})}_onInputKeyDown(e){if(this._isDisabled)return;const{key:t,target:i}=e,{hideInput1:n,hideInput2:s,hideInput3:o}=_,{_activeLabelInputIndex:r,_anchorElements:a}=this,l=i;if(t===n||t===s||t===o){e.stopPropagation();const t=r;l.blur(),null!=t?a[t].focus():l.parentElement?.focus()}}_onMaxLabelClick(){this._isDisabled||(this._emitMaxRangeLabelClickEvent({type:"max-click",value:this.max}),this.rangeLabelInputsEnabled&&(this._isMaxInputActive=!0))}_onMaxLabelKeyDown({key:e}){this._isDisabled||e!==_.showInput||(this._isMaxInputActive=!0)}_onMaxInputBlur(e){const t=e.target.value;if(this._isMaxInputActive=!1,!t)return;const i=this.max,n=this._parseInputValue(t,"max");n<=this.min||(this.viewModel.set("max",n),this.max!==i&&this._emitMaxChangeEvent({oldValue:i,value:this.max}))}_onMinLabelClick(){this._isDisabled||(this._emitMinRangeLabelClickEvent({type:"min-click",value:this.min}),this.rangeLabelInputsEnabled&&(this._isMinInputActive=!0))}_onMinLabelKeyDown({key:e}){this._isDisabled||e!==_.showInput||(this._isMinInputActive=!0)}_onMinInputBlur(e){const t=e.target.value;if(this._isMinInputActive=!1,!t)return;const i=this.min,n=this._parseInputValue(t,"min");n>=this.max||(this.viewModel.set("min",n),this.min!==i&&this._emitMinChangeEvent({oldValue:i,value:this.min}))}_positionFromValue(e){const{_trackHeight:t,_trackWidth:i}=this,n=this.min??0,s=this.max??0,o=s-n;if(0===o||null==e)return 0;const r=this._isHorizontalLayout();let a=r?this._applyPrecisionToPosition(i*(e-n)/o):this._applyPrecisionToPosition(t*(s-e)/o);return this._isReversedLayout()&&(a=r?i-a:t-a),a}_valueFromPosition(e){const{_trackHeight:t,_trackWidth:i,precision:n}=this,s=this.min??0,o=this.max??0,r=o-s;let a=this._isHorizontalLayout()?e*r/i+s:r*(1e3-e/t*1e3)/1e3+s;return this._isReversedLayout()&&(a=o+s-a),parseFloat(a.toFixed(n))}_positionToPercent(e){const{_trackHeight:t,_trackWidth:i}=this,n=100*e/(this._isHorizontalLayout()?i:t);return this._applyPrecisionToPosition(n)}_applyPrecisionToPosition(e){return parseFloat(e.toFixed(this._positionPrecision))}_isPositionInverted(){const{layout:e}=this;return"horizontal-reversed"===e||"vertical"===e}_isHorizontalLayout(){return this.layout.includes("horizontal")}_isReversedLayout(){return this.layout.includes("reversed")}_normalizeSegmentDetails(e){if(this._isPositionInverted()){const{min:t,max:i}=e;return{min:i,max:t}}return e}_parseInputValue(e,t,i){return this.inputParseFunction?this.inputParseFunction(e,t,i):this.viewModel.defaultInputParseFunction(e)}_formatInputValue(e,t,i){return this.inputFormatFunction?this.inputFormatFunction(e,t,i):this.viewModel.defaultInputFormatFunction(e)}_getAnchorDetails(e){const t=this.values,i=[...t].sort((e,t)=>e-t)[e],n=t.indexOf(i);return{index:n,position:this._getPositionOfElement(this._anchorElements[n]),value:i}}_updateAnchorStyle(e,t){const i=this._anchorElements[e];i&&(this._isHorizontalLayout()?i.style.left=`${t}`:i.style.top=`${t}`)}_getStyleForAnchor(e,t,i){const n=this._getPositionStyleForElement(e);if(1===this.values?.length)return`${n}`;const s=this._zIndices[t];return`${n}; z-index: ${i?this._zIndexOffset+s:s}`}_getPositionStyleForElement(e){const t=this._positionFromValue(e),i=this._positionToPercent(t);return`${this._isHorizontalLayout()?"left":"top"}: ${i}%`}_getPositionOfElement(e){const t=this._getDimensions(e.offsetParent),i=this._getDimensions(e);return this._isHorizontalLayout()?this._applyPrecisionToPosition(i.left-t.left):this._applyPrecisionToPosition(i.top-t.top)}_updateAnchorValues(e,t){e.forEach((e,i)=>this._toValue(e,t[i]))}_updateAnchorValuesByDifference(e){const{min:t,max:i,values:n}=this;n?.forEach((n,s)=>this._toValue(s,Math.max(Math.min(n+e,i),t)))}_toValue(e,t){if(null!=this.steps){t=this._getStepValues()[this._getIndexOfNearestStepValue(t)]}this._updateAnchorStyle(e,this._getPositionStyleForElement(t)),this.viewModel.setValue(e,t)}_toPosition(e,t){const i=null!=this.steps?this._getStepValueForAnchorAtPosition(e,t):this._getValueForAnchorAtPosition(e,t);this._updateAnchorStyle(e,this._getPositionStyleForElement(i)),this.viewModel.setValue(e,i)}_getValueForAnchorAtPosition(e,t){const{min:i,max:n}=this._getAnchorBoundsInPixels(e),{min:s,max:o}=this.viewModel.getBoundsForValueAtIndex(e);let r,a,l=null;return this._isPositionInverted()?(r=s,a=o):(r=o,a=s),l=t>n?r:t<i?a:this._valueFromPosition(t),l>o?l=o:l<s&&(l=s),l}_getStepValueForAnchorAtPosition(e,t){const i=this._getStepValues(),n=this._calculateNearestStepPosition(t),s=this._getValueForAnchorAtPosition(e,n);return i[this._getIndexOfNearestStepValue(s)]}_getAnchorBoundsAsPercents(e){const{min:t,max:i}=this._getAnchorBoundsInPixels(e);return{min:this._positionToPercent(t),max:this._positionToPercent(i)}}_getAnchorBoundsInPixels(e){const{_anchorElements:t,_trackHeight:i,_trackWidth:n,effectiveMax:s,effectiveMin:o,thumbsConstrained:r}=this,a=t[e-1],l=t[e+1],h=this._isHorizontalLayout()?n:i;let u,d;return this._isPositionInverted()?(u=null!=o?this._positionFromValue(o):h,d=null!=s?this._positionFromValue(s):0):(u=null!=s?this._positionFromValue(s):h,d=null!=o?this._positionFromValue(o):0),r?this._isPositionInverted()?{max:a?this._getPositionOfElement(a):u,min:l?this._getPositionOfElement(l):d}:{max:l?this._getPositionOfElement(l):u,min:a?this._getPositionOfElement(a):d}:{max:u,min:d}}_getIndexOfNearestValue(e){const t=this.values;return t.indexOf(t.reduce((t,i)=>Math.abs(i-e)<Math.abs(t-e)?i:t))}_getCursorPositionFromEvent(e){const t=this._getDimensions(this.trackElement);return this._isHorizontalLayout()?this._applyPrecisionToPosition(e.clientX-t.left):this._applyPrecisionToPosition(e.clientY-t.top)}_getStepValues(){const{steps:e}=this;if(Array.isArray(e))return e;const{max:t,min:i}=this;if(null==i||null==t||null==e)return[];const n=Math.ceil((t-i)/e),s=[];for(let o=0;o<=n;o++){const n=i+e*o;s.push(n>t?t:n)}return s}_toStep(e,t){const i=this.values[e],n=this._getStepValues(),s=n.indexOf(i);let o=null;if(s>-1){let i=n[s+t];isNaN(i)&&(i=n[s]);const r=this._positionFromValue(i);o=this._getStepValueForAnchorAtPosition(e,r)}else{o=n[this._getIndexOfNearestStepValue(i)+t]}this.viewModel.setValue(e,o)}_getIndexOfNearestStepValue(e){const{steps:t}=this;if(null==t)return null;const i=this._getStepValues(),n=i.reduce((t,i)=>Math.abs(i-e)<Math.abs(t-e)?i:t);return i.indexOf(n)}_calculateNearestStepPosition(e){const t=this._valueFromPosition(e),i=this._getIndexOfNearestStepValue(t),n=this._getStepValues();return this._positionFromValue(n[i])}_getTickCounts(e,t){const{mode:i}=t;return"count"===i||"position"===i?e||0:"percent"===i&&100/e||0}_calculateTickPositions(e){return e.map(e=>this._positionFromValue(e))}_calculateEquidistantTickPositions(e){const{_trackWidth:t,_trackHeight:i}=this,n=this._isHorizontalLayout()?t:i,s=n/(e-1),o=[];if(1===e)return[n/2];for(let r=0;r<e;r++){const e=r*s;e<=n&&o.push(e)}return o}_getDimensions(e){try{return n(e),e.getBoundingClientRect()}catch(t){if("object"==typeof t&&null!==t)return new DOMRect(0,0,0,0);throw t}}_emitTrackClickEvent(e){this.emit("track-click",{...e,type:"track-click"})}_emitTickClickEvent(e){this.emit("tick-click",{...e,type:"tick-click"})}_emitMaxChangeEvent(e){this.emit("max-change",{...e,type:"max-change"})}_emitMinChangeEvent(e){this.emit("min-change",{...e,type:"min-change"})}_emitThumbChangeEvent(e){this.emit("thumb-change",{...e,type:"thumb-change"})}_emitThumbClickEvent(e){this.emit("thumb-click",{...e,type:"thumb-click"})}_emitThumbDragEvent(e){this.emit("thumb-drag",{...e,type:"thumb-drag"})}_emitSegmentClickEvent(e){this.emit("segment-click",{...e,type:"segment-click"})}_emitSegmentDragEvent(e){this.emit("segment-drag",{...e,type:"segment-drag"})}_emitMinRangeLabelClickEvent(e){this.emit("min-click",e)}_emitMaxRangeLabelClickEvent(e){this.emit("min-click",e)}};function g(e){return e?.["data-thumb-index"]}function f(e){return e?.["data-input-index"]}function b(e){return e?.["data-segment-index"]}function E(e){return e?.["data-min-thumb-index"]}function x(e){return e?.["data-max-thumb-index"]}function y(e){return e?.["data-value"]}function P(e){return e?.["data-tick-config-index"]}function k(e){return e?.["data-tick-group-index"]}function I(e){return e?.["data-config"]}e([s()],v.prototype,"_activeLabelInputIndex",void 0),e([s()],v.prototype,"_dragStartInfo",void 0),e([s()],v.prototype,"_isMinInputActive",void 0),e([s()],v.prototype,"_isMaxInputActive",void 0),e([s()],v.prototype,"_segmentDragStartInfo",void 0),e([s({readOnly:!0})],v.prototype,"_isDisabled",null),e([s()],v.prototype,"disabled",void 0),e([s()],v.prototype,"draggableSegmentsEnabled",void 0),e([s()],v.prototype,"effectiveMax",null),e([s()],v.prototype,"effectiveMin",null),e([s({readOnly:!0})],v.prototype,"effectiveSegmentElements",void 0),e([s()],v.prototype,"extraNodes",void 0),e([s()],v.prototype,"inputCreatedFunction",void 0),e([s()],v.prototype,"inputFormatFunction",null),e([s()],v.prototype,"inputParseFunction",null),e([s()],v.prototype,"icon",null),e([s()],v.prototype,"label",null),e([s({readOnly:!0})],v.prototype,"labelElements",void 0),e([s()],v.prototype,"labelInputsEnabled",void 0),e([s()],v.prototype,"labelFormatFunction",null),e([s({readOnly:!0})],v.prototype,"labels",null),e([s({value:"horizontal"})],v.prototype,"layout",null),e([s()],v.prototype,"max",null),e([s({readOnly:!0})],v.prototype,"maxLabelElement",void 0),e([s(),d("esri/widgets/Slider/t9n/Slider")],v.prototype,"messages",void 0),e([s()],v.prototype,"min",null),e([s({readOnly:!0})],v.prototype,"minLabelElement",void 0),e([s()],v.prototype,"precision",null),e([s()],v.prototype,"rangeLabelInputsEnabled",void 0),e([s({readOnly:!0})],v.prototype,"segmentElements",void 0),e([s()],v.prototype,"snapOnClickEnabled",void 0),e([s({readOnly:!0})],v.prototype,"state",null),e([s()],v.prototype,"steps",void 0),e([s()],v.prototype,"syncedSegmentsEnabled",void 0),e([s()],v.prototype,"thumbsConstrained",null),e([s()],v.prototype,"thumbCreatedFunction",void 0),e([s({readOnly:!0})],v.prototype,"thumbElements",void 0),e([s()],v.prototype,"tickConfigs",null),e([s({readOnly:!0})],v.prototype,"tickElements",void 0),e([s({readOnly:!0})],v.prototype,"trackElement",void 0),e([s()],v.prototype,"values",null),e([s({type:h})],v.prototype,"viewModel",void 0),e([s()],v.prototype,"visibleElements",void 0),e([o("visibleElements")],v.prototype,"castVisibleElements",null),v=e([r("esri.widgets.Slider")],v);const A=v;export{A as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import i from"../core/Collection.js";import{assertIsSome as n}from"../core/maybe.js";import{property as s,cast as o,subclass as r}from"../core/accessorSupport/decorators.js";import a from"./Widget.js";import{css as l}from"./Slider/css.js";import h from"./Slider/SliderViewModel.js";import{globalCss as u}from"./support/globalCss.js";import{messageBundle as d,tsx as c}from"./support/widget.js";import{onResize as m}from"./support/widgetUtils.js";const _={showInput:"Enter",hideInput1:"Enter",hideInput2:"Escape",hideInput3:"Tab",moveAnchorUp:"ArrowUp",moveAnchorDown:"ArrowDown",moveAnchorLeft:"ArrowLeft",moveAnchorRight:"ArrowRight",moveAnchorToMax:"End",moveAnchorToMin:"Home"},p={labels:!1,rangeLabels:!1};let v=class extends a{constructor(e,t){super(e,t),this._activeLabelInputIndex=null,this._anchorElements=[],this._dragged=!1,this._dragStartInfo=null,this._focusedAnchorIndex=null,this._isMinInputActive=!1,this._isMaxInputActive=!1,this._lastMovedHandleIndex=null,this._positionPrecision=5,this._segmentDragStartInfo=null,this._trackHeight=null,this._trackWidth=null,this._zIndices=[],this._zIndexOffset=3,this.disabled=!1,this.draggableSegmentsEnabled=!0,this.effectiveSegmentElements=new i,this.extraNodes=[],this.inputCreatedFunction=null,this.labelElements=new i,this.labelInputsEnabled=!1,this.maxLabelElement=null,this.messages=null,this.minLabelElement=null,this.rangeLabelInputsEnabled=!1,this.segmentElements=new i,this.snapOnClickEnabled=!0,this.steps=null,this.syncedSegmentsEnabled=!1,this.thumbCreatedFunction=null,this.thumbElements=new i,this.tickElements=new i,this.trackElement=null,this.viewModel=new h,this.visibleElements={...p},this._onAnchorPointerDown=this._onAnchorPointerDown.bind(this),this._onAnchorPointerMove=this._onAnchorPointerMove.bind(this),this._onAnchorPointerUp=this._onAnchorPointerUp.bind(this),this._onLabelPointerDown=this._onLabelPointerDown.bind(this),this._onLabelPointerUp=this._onLabelPointerUp.bind(this),this._onSegmentPointerDown=this._onSegmentPointerDown.bind(this),this._onSegmentPointerMove=this._onSegmentPointerMove.bind(this),this._onSegmentPointerUp=this._onSegmentPointerUp.bind(this),this._onTrackPointerDown=this._onTrackPointerDown.bind(this),this._onTrackPointerMove=this._onTrackPointerMove.bind(this),this._onTrackPointerUp=this._onTrackPointerUp.bind(this)}destroy(){document.removeEventListener("pointerup",this._onLabelPointerUp),document.removeEventListener("pointermove",this._onLabelPointerMove),document.removeEventListener("pointerup",this._onAnchorPointerUp),document.removeEventListener("pointermove",this._onAnchorPointerMove),this.labelElements.removeAll(),this.labelElements.destroy(),this.segmentElements.removeAll(),this.segmentElements.destroy(),this.effectiveSegmentElements.removeAll(),this.effectiveSegmentElements.destroy(),this.thumbElements.removeAll(),this.thumbElements.destroy(),this.tickElements.removeAll(),this.tickElements.destroy()}get _isDisabled(){return this.disabled||"disabled"===this.state}get effectiveMax(){return this.viewModel.effectiveMax}set effectiveMax(e){this.viewModel.effectiveMax=e}get effectiveMin(){return this.viewModel.effectiveMin}set effectiveMin(e){this.viewModel.effectiveMin=e}get inputFormatFunction(){return this.viewModel.inputFormatFunction}set inputFormatFunction(e){this.viewModel.inputFormatFunction=e}get inputParseFunction(){return this.viewModel.inputParseFunction}set inputParseFunction(e){this.viewModel.inputParseFunction=e}get icon(){return"caret-double-horizontal"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get labelFormatFunction(){return this.viewModel.labelFormatFunction}set labelFormatFunction(e){this.viewModel.labelFormatFunction=e}get labels(){return this.viewModel.labels}set layout(e){["vertical","vertical-reversed","horizontal","horizontal-reversed"].includes(e)||(e="horizontal"),this._set("layout",e)}get max(){return this.viewModel.max}set max(e){this.viewModel.max=e}get min(){return this.viewModel.min}set min(e){this.viewModel.min=e}get precision(){return this.viewModel.precision}set precision(e){this.viewModel.precision=e}get state(){const{_activeLabelInputIndex:e,_isMaxInputActive:t,_isMinInputActive:i,_dragStartInfo:n,_segmentDragStartInfo:s,disabled:o,viewModel:r}=this;return o?"disabled":!(null===e&&!t&&!i)?"editing":null!=n||null!=s?"dragging":r.state}get thumbsConstrained(){return this.viewModel.thumbsConstrained}set thumbsConstrained(e){this.viewModel.thumbsConstrained=e}set tickConfigs(e){this._set("tickConfigs",e),this.scheduleRender()}get values(){return this.viewModel.values}set values(e){this.viewModel.values=e}castVisibleElements(e){return{...p,...e}}render(){const{label:e}=this,t=this.classes(l.base,u.widget,this._isHorizontalLayout()?l.horizontalLayout:l.verticalLayout,this._isReversedLayout()?l.reversed:null,this._isDisabled?u.disabled:null);return this._storeTrackDimensions(),c("div",{afterCreate:this._afterContainerCreate,"aria-label":e,bind:this,class:t,"touch-action":"none"},this._renderContent())}toNextStep(e){this._toStep(e,1)}toPreviousStep(e){this._toStep(e,-1)}getCurrentPosition(){return this._positionFromValue(this.values?.[0]??0)}_renderContent(){const{max:e,min:t}=this;if(!(null==t||null==e||t>=e))return[this._renderMin(),this._renderSliderContainer(),this._renderMax()]}_renderSliderContainer(){return c("div",{bind:this,class:l.contentElement,key:"slider-container"},this._renderTrackElement(),this._renderTicksContainer(),this._renderExtraContentElements())}_renderTrackElement(){return c("div",{afterCreate:this._afterTrackCreate,afterRemoved:this._afterTrackRemoved,bind:this,class:l.trackElement,"touch-action":"none"},this._renderEffectiveSegmentElements(),this._renderSegmentElements(),this._renderAnchorElements())}_renderEffectiveSegmentElements(){if(!this.trackElement||!this.values?.length)return;const e=null!=this.effectiveMax,t=null!=this.effectiveMin;if(!e&&!t)return;const{max:i,min:n,viewModel:s}=this,o=s.getBounds(),r=[];return t&&r.push(this._renderEffectiveSegmentElement(n,o.min,!0)),e&&r.push(this._renderEffectiveSegmentElement(o.max,i,!1)),r}_renderSegmentElements(){if(!this.trackElement||!this.values?.length)return;const e=this.values.length,t=[];for(let i=0;i<=e;i++)t.push(this._renderSegmentElement(i));return t}_renderSegmentElement(e){const{_trackHeight:t,_trackWidth:i,draggableSegmentsEnabled:n,id:s,state:o}=this,r=this.values,a=this._isHorizontalLayout(),h=a?i:t,u=this.viewModel.getBounds(),d=this._positionFromValue(u.max),m=this._positionFromValue(u.min),_=e===r?.length?null:e,p=0===e?null:e-1,v=null!=_,g=null!=p;let f,b;const E=[...r].sort((e,t)=>e-t);this._isReversedLayout()?(f=g?this._positionFromValue(E[p]):m,b=v?this._positionFromValue(E[_]):d):(f=v?this._positionFromValue(E[_]):d,b=g?this._positionFromValue(E[p]):m);const x=this._applyPrecisionToPosition(100*b/h),y=(f-b)/h,P=a?`transform: translate(${x}%, 0px) scale(${y}, 1);`:`transform: translate(0px, ${x}%) scale(1, ${y});`,k=this.classes(l.segmentElement,l.segmentElementIndexPrefix+e,n&&v&&g&&"disabled"!==o?l.segmentElementInteractive:null);return c("div",{afterCreate:this._afterSegmentCreate,afterRemoved:this._afterSegmentRemoved,bind:this,class:k,"data-max-thumb-index":_,"data-min-thumb-index":p,"data-segment-index":e,key:`${s}-segment-${e}`,style:P,"touch-action":"none"})}_renderEffectiveSegmentElement(e,t,i){const{_trackHeight:n,_trackWidth:s,layout:o}=this,r=this._positionFromValue(e),a=this._positionFromValue(t),h=this._isHorizontalLayout(),u=h?s:n,d=this._applyPrecisionToPosition(100*r/u);let m=null;if("horizontal"===o){const e=i?u-a:a,t=r===u?0:d;m=`clip-path: inset(0% ${a===u?0:this._applyPrecisionToPosition(e/u*100)}% 0% ${t}%);`}else{const e=(a-r)/u;m=h?`transform: translate(${d}%, 0px) scale(${e}, 1);`:`transform: translate(0px, ${d}%) scale(1, ${e});`}const _=i?l.effectiveMinSegmentElement:l.effectiveMaxSegmentElement,p=this.classes(l.segmentElement,l.effectiveSegmentElement,_);return c("div",{afterCreate:this._afterEffectiveSegmentCreate,afterRemoved:this._afterEffectiveSegmentRemoved,bind:this,class:p,style:m,"touch-action":"none"})}_renderAnchorElements(){const{trackElement:e,values:t}=this;if(t?.length)return this._zIndices=t.map((e,i)=>{const n=this._positionFromValue(e),s=this._positionToPercent(n),o=(this._isHorizontalLayout()?s>50:s<50)?-1:1;return this._zIndexOffset+(t.length+o*i)}),e&&t&&t.length?t.map((e,t)=>this._renderAnchorElement(e,t)):null}_renderAnchorElement(e,i){const n=this._positionFromValue(e),s=this._valueFromPosition(n);if(null==s||isNaN(s))return;const{_dragStartInfo:o,_lastMovedHandleIndex:r,id:a,layout:h,visibleElements:{labels:u}}=this,d=this.values,m=o?.index===i,_=r===i,p=this.classes(l.anchorElement,l.anchorElementIndexPrefix+i,m?l.movingAnchorElement:null,_?l.lastMovedAnchorElement:null),v=this.labels.values[i],g=this._getStyleForAnchor(e,i,m||_),{min:f,max:b}=this.viewModel.getBoundsForValueAtIndex(i),{disabled:E,messages:x}=this,y=2===d.length?t(0===i?x.rangeMinimum:x.rangeMaximum,{value:e}):v,P=1===d.length?null:0===i?`${a}-handle-${i+1}`:i===d.length-1?`${a}-handle-${i-1}`:`${a}-handle-${i-1} ${a}-handle-${i+1}`;return c("div",{afterCreate:this._afterAnchorCreate,afterRemoved:this._afterAnchorRemoved,afterUpdate:this._afterAnchorUpdate,"aria-controls":P,"aria-label":x.sliderValue,"aria-labelledby":u?`${a}-label-${i}`:null,"aria-orientation":h,"aria-valuemax":b?.toString(),"aria-valuemin":f?.toString(),"aria-valuenow":e.toString(),"aria-valuetext":y,bind:this,class:p,"data-thumb-index":i,"data-value":e,id:`${a}-handle-${i}`,key:`${a}-handle-${i}`,onkeydown:this._onAnchorKeyDown,role:"slider",style:g,tabIndex:E?-1:0,"touch-action":"none"},c("span",{afterCreate:this._afterThumbCreate,afterRemoved:this._afterThumbRemoved,bind:this,class:l.thumbElement,"data-thumb-index":i,"touch-action":"none"}),this.renderThumbLabel(i))}renderThumbLabel(e){const{id:t,labels:i,labelInputsEnabled:n,state:s}=this,o=this.visibleElements.labels,r=i.values[e],a=this.classes(l.labelElement,o?null:u.hidden,n&&"disabled"!==s?l.labelElementInteractive:null);return c("span",{afterCreate:this._afterLabelCreate,afterRemoved:this._afterLabelRemoved,"aria-hidden":(!o).toString(),bind:this,class:a,"data-thumb-index":e,id:`${t}-label-${e}`,key:`${t}-label-${e}`,role:n?"button":void 0,"touch-action":"none"},this._activeLabelInputIndex===e?this._renderValueInput(e):r)}_renderValueInput(e){const{disabled:t,values:i}=this;if(null==i)return;const n=i[e];return c("input",{afterCreate:this._afterInputCreate,"aria-label":this.messages.sliderValue,bind:this,class:l.labelInput,"data-input-index":e,"data-input-type":"thumb",key:`value-input-${e}`,onblur:this._onLabelInputBlur,onkeydown:this._onInputKeyDown,required:!0,tabIndex:t?-1:0,type:"text",value:this._formatInputValue(n,"value",e)})}_renderMax(){const{_isMaxInputActive:e,labels:t,rangeLabelInputsEnabled:i,state:n}=this,s=this.visibleElements.rangeLabels,o=this.classes(l.maxElement,{[u.hidden]:!s,[l.maxElementInteractive]:i&&"disabled"!==n,[l.rangeElementActive]:e});return c("div",{afterCreate:this._afterMaxLabelCreate,"aria-hidden":(!s).toString(),bind:this,class:o,onclick:this._onMaxLabelClick,onkeydown:this._onMaxLabelKeyDown,role:i?"button":void 0,tabIndex:!this.disabled&&i?0:-1},e?this._renderMaxInput():t.max)}_renderMin(){const{_isMinInputActive:e,labels:t,rangeLabelInputsEnabled:i,state:n}=this,s=this.visibleElements.rangeLabels,o=this.classes(l.minElement,{[u.hidden]:!s,[l.minElementInteractive]:i&&"disabled"!==n,[l.rangeElementActive]:e});return c("div",{afterCreate:this._afterMinLabelCreate,"aria-hidden":(!s).toString(),bind:this,class:o,onclick:this._onMinLabelClick,onkeydown:this._onMinLabelKeyDown,role:i?"button":void 0,tabIndex:!this.disabled&&i?0:-1},e?this._renderMinInput():t.min)}_renderMaxInput(){return c("input",{afterCreate:this._afterInputCreate,"aria-label":this.messages.maximumValue,bind:this,class:l.rangeInput,"data-input-type":"max",onblur:this._onMaxInputBlur,onkeydown:this._onInputKeyDown,required:!0,tabIndex:this.disabled?-1:0,type:"text",value:this._formatInputValue(this.max,"max")})}_renderMinInput(){return c("input",{afterCreate:this._afterInputCreate,"aria-label":this.messages.minimumValue,bind:this,class:l.rangeInput,"data-input-type":"min",onblur:this._onMinInputBlur,onkeydown:this._onInputKeyDown,required:!0,tabIndex:this.disabled?-1:0,type:"text",value:this._formatInputValue(this.min,"min")})}_renderExtraContentElements(){return c("div",{bind:this,class:l.extraContentElement},this.extraNodes)}_renderTicksContainer(){if(this.tickConfigs&&this.trackElement&&(0!==this._trackHeight||0!==this._trackWidth))return this.tickConfigs.map((e,t)=>c("div",{class:this.classes(l.ticksContainerElement),key:"ticks-container"},this._renderTicks(e,t)))}_renderTicks(e,t){const{mode:n,values:s}=e;if(this.tickElements.at(t)||this.tickElements.add(new i,t),"position"===n){const i=Array.isArray(s)?s:[s];return this._calculateTickPositions(i).map((i,n)=>this._renderTickGroup(e,n,t,i))}if("percent"===n&&Array.isArray(s)){const i=this.min??0,n=(this.max??0)-i,o=s.map(e=>this._applyPrecisionToPosition(e/100*n+i));return this._calculateTickPositions(o).map((i,n)=>this._renderTickGroup(e,n,t,i))}const o=Array.isArray(s)&&s.length?s[0]:isNaN(s)?null:s,r=this._getTickCounts(o,e);return this._calculateEquidistantTickPositions(r).map((i,n)=>this._renderTickGroup(e,n,t,i))}_renderTickGroup(e,t,i,n){const s="position"===e.mode?Array.isArray(e.values)?e.values[t]:e.values:this._valueFromPosition(n);if(null!=s&&!isNaN(s))return c("div",{afterCreate:this._afterTickGroupCreate,afterRemoved:this._afterTickGroupRemoved,bind:this,"data-config":e,"data-position":n,"data-tick-config-index":i,"data-tick-group-index":t,"data-value":s,key:`tick-group-${t}`,onclick:this._onTickGroupClick},this._renderTickLine(e,t,i,s),e.labelsVisible?this._renderTickLabel(e,t,i,s):null)}_renderTickLine(e,t,i,n){return c("div",{afterCreate:this._afterTickLineCreate,"aria-valuenow":n.toString(),bind:this,class:l.tickElement,"data-config":e,"data-tick-config-index":i,"data-tick-group-index":t,"data-value":n,key:`tick-label-${t}`,style:this._getPositionStyleForElement(n)})}_renderTickLabel(e,t,i,n){const s=e.labelFormatFunction?e.labelFormatFunction(n,"tick",t):this.viewModel.getLabelForValue(n,"tick",t);return c("div",{afterCreate:this._afterTickLabelCreate,"aria-label":s,"aria-valuenow":n.toString(),"aria-valuetext":s,bind:this,class:l.tickLabelElement,"data-config":e,"data-tick-config-index":i,"data-tick-group-index":t,"data-value":n,key:`tick-label-${t}`,style:`transform: translate(-50%); ${this._getPositionStyleForElement(n)}`},s)}_afterContainerCreate(e){this.addHandles(m(e,()=>this.scheduleRender()))}_afterTrackCreate(e){this._set("trackElement",e),e.addEventListener("pointerdown",this._onTrackPointerDown),this.scheduleRender()}_afterTrackRemoved(e){e.removeEventListener("pointerdown",this._onTrackPointerDown),document.removeEventListener("pointermove",this._onTrackPointerMove),document.removeEventListener("pointerup",this._onTrackPointerUp)}_afterSegmentCreate(e){this.segmentElements.add(e),e.addEventListener("pointerdown",this._onSegmentPointerDown)}_afterSegmentRemoved(e){this.segmentElements.remove(e),e.removeEventListener("pointerdown",this._onSegmentPointerDown)}_afterEffectiveSegmentCreate(e){this.effectiveSegmentElements.add(e)}_afterEffectiveSegmentRemoved(e){this.effectiveSegmentElements.remove(e)}_afterAnchorCreate(e){if(this._anchorElements.push(e),e.addEventListener("pointerdown",this._onAnchorPointerDown),this.thumbCreatedFunction){const t=g(e),i=y(e),n=this.thumbElements.at(t),s=this.labelElements.at(t)||null;this.thumbCreatedFunction(t,i,n,s)}}_afterAnchorUpdate(e){if(null!=this._focusedAnchorIndex){g(e)===this._focusedAnchorIndex&&(e.focus(),this._focusedAnchorIndex=null)}}_afterAnchorRemoved(e){const t=this._anchorElements.indexOf(e,0);t>-1&&this._anchorElements.splice(t,1),e.removeEventListener("pointerdown",this._onAnchorPointerDown)}_afterThumbCreate(e){this.thumbElements.add(e)}_afterThumbRemoved(e){this.thumbElements.remove(e)}_afterLabelCreate(e){this.labelElements.add(e),e.addEventListener("pointerdown",this._onLabelPointerDown),e.addEventListener("pointerup",this._onLabelPointerUp)}_afterLabelRemoved(e){this.labelElements.remove(e),e.removeEventListener("pointerdown",this._onLabelPointerDown),e.removeEventListener("pointerup",this._onLabelPointerUp)}_afterInputCreate(e){if(e.focus(),e.select(),this.inputCreatedFunction){const t=e.getAttribute("data-input-type"),i="thumb"===t?f(e):null;this.inputCreatedFunction(e,t,i)}}_afterTickLineCreate(e){const t=P(e),i=k(e),n=this.tickElements.at(t),s=n.at(i);s?s.tickElement=e:n.add({groupElement:null,tickElement:e,labelElement:null},i)}_afterTickLabelCreate(e){const t=P(e),i=k(e),n=this.tickElements.at(t),s=n.at(i);s?s.labelElement=e:n.add({groupElement:null,labelElement:e,tickElement:null},i)}_afterTickGroupRemoved(e){const t=P(e),i=this.tickElements.items[t],n=i?.find(t=>t.groupElement===e);n&&i.remove(n)}_afterTickGroupCreate(e){const t=I(e);if(t?.tickCreatedFunction){const i=P(e),n=k(e),s=y(e),o=this.tickElements?.at(i)?.at(n);if(o){o.groupElement=e;const i=o.tickElement||null,n=o.labelElement||null;t.tickCreatedFunction(s,i,n)}}}_afterMaxLabelCreate(e){this._set("maxLabelElement",e)}_afterMinLabelCreate(e){this._set("minLabelElement",e)}_onAnchorKeyDown(e){if(this._isDisabled||"editing"===this.state)return;const{key:t,target:i}=e,n=this.values,s=g(i),o=this._anchorElements[s],r=n[s],a=[_.moveAnchorUp,_.moveAnchorDown,_.moveAnchorLeft,_.moveAnchorRight];if(t===_.showInput&&this.labelInputsEnabled)this._activeLabelInputIndex=s;else if(a.includes(t)){e.preventDefault();const{steps:i}=this,n=t===_.moveAnchorUp||t===_.moveAnchorRight?1:-1;if(null!=i)this._toStep(s,this._isReversedLayout()?-1*n:n);else{const{precision:e}=this,t=this._getPositionOfElement(o),i=this._valueFromPosition(t),r=this._isHorizontalLayout()?n:-1*n;let a;a=0===e?this._positionFromValue(i+r):1===e?this._positionFromValue(i+.1*r):t+r,this._toPosition(s,a)}const a=this.values[s];r!==a&&this._emitThumbChangeEvent({index:s,oldValue:r,value:a})}else if(t===_.moveAnchorToMax||t===_.moveAnchorToMin){e.preventDefault();const{min:i,max:n}=this._getAnchorBoundsInPixels(s),o=this._isPositionInverted()?t===_.moveAnchorToMax?i:n:t===_.moveAnchorToMin?i:n;this._toPosition(s,o);const a=this.values[s];r!==a&&this._emitThumbChangeEvent({index:s,oldValue:r,value:a})}}_onAnchorPointerDown(e){if(this._isDisabled)return;const{target:t,clientX:i,clientY:n}=e,s=g(t);null!=s&&(e.preventDefault(),this._anchorElements[s]&&this._anchorElements[s].focus(),this._storeTrackDimensions(),this._dragStartInfo={clientX:i,clientY:n,index:s,position:this._getPositionOfElement(this._anchorElements[s])},document.addEventListener("pointerup",this._onAnchorPointerUp),document.addEventListener("pointermove",this._onAnchorPointerMove))}_onAnchorPointerMove(e){if("editing"===this.state||!this._dragStartInfo)return;e.preventDefault();const{values:t,_anchorElements:i,_dragged:n,_dragStartInfo:s,_dragStartInfo:{index:o,position:r}}=this,{clientX:a,clientY:l}=e,h=n?"drag":"start",u=i[o],d=this._getPositionOfElement(u),c=this._applyPrecisionToPosition(this._isHorizontalLayout()?r+a-s.clientX:r+l-s.clientY);if(d===c)return;const m=t[o];this._dragged=!0,this._toPosition(o,c);const _=this.values[o];n?m!==_&&this._emitThumbDragEvent({index:o,state:h,value:_}):this._emitThumbDragEvent({index:o,state:h,value:m})}_onAnchorPointerUp(e){if(document.removeEventListener("pointerup",this._onAnchorPointerUp),document.removeEventListener("pointermove",this._onAnchorPointerMove),!this._dragStartInfo)return;e.preventDefault();const{index:t}=this._dragStartInfo,i=this._dragged,n=this.values[t];this._dragged=!1,this._dragStartInfo=null,this._lastMovedHandleIndex=t,i?this._emitThumbDragEvent({index:t,state:"stop",value:n}):(this.scheduleRender(),"editing"!==this.state&&this._emitThumbClickEvent({index:t,value:n}))}_onTrackPointerDown(e){const{_dragStartInfo:t,snapOnClickEnabled:i,state:n,values:s}=this;if(this._isDisabled||"editing"===n||t)return;if(document.addEventListener("pointermove",this._onTrackPointerMove),document.addEventListener("pointerup",this._onTrackPointerUp),!i||!s?.length)return;const{steps:o}=this,{clientX:r,clientY:a}=e,l=this._getCursorPositionFromEvent(e),h=this._valueFromPosition(l),u=this._getIndexOfNearestValue(h),d=s[u],c=s.some((e,t)=>e===d&&t!==u)&&h>d?s.lastIndexOf(d):u;if(null==c)return;const m=s[c],_=null!=o?this._calculateNearestStepPosition(l):l;this._toPosition(c,_),this._dragged=!0,this._dragStartInfo={clientX:r,clientY:a,index:c,position:_},this._focusedAnchorIndex=c,this._emitThumbDragEvent({index:c,state:"start",value:m});const p=this.values[c];m!==p&&this._emitThumbDragEvent({index:c,state:"drag",value:p}),document.addEventListener("pointerup",this._onAnchorPointerUp),document.addEventListener("pointermove",this._onAnchorPointerMove)}_onTrackPointerMove(e){e.preventDefault(),this._dragged=!0}_onTrackPointerUp(e){if(e.preventDefault(),document.removeEventListener("pointermove",this._onTrackPointerMove),document.removeEventListener("pointerup",this._onTrackPointerUp),this.snapOnClickEnabled||(this._dragged=!1),!this._dragged){const t=this._getCursorPositionFromEvent(e),i=this._valueFromPosition(t);this._emitTrackClickEvent({value:i})}}_onSegmentPointerDown(e){e.preventDefault();const t=e.target,i=b(t),n=E(t),s=x(t);if(this._isDisabled||null==n||null==s)return;e.stopPropagation(),this._storeTrackDimensions(),document.addEventListener("pointerup",this._onSegmentPointerUp);const o=this._getAnchorDetails(n),r=this._getAnchorDetails(s);this.syncedSegmentsEnabled?(this.segmentElements.forEach(e=>e.classList.add(l.segmentElementActive)),this._anchorElements.forEach(e=>e.classList.add(l.anchorElementActive))):(this.segmentElements.at(i).classList.add(l.segmentElementActive),this._anchorElements[o.index]?.classList.add(l.anchorElementActive),this._anchorElements[r.index]?.classList.add(l.anchorElementActive)),this._segmentDragStartInfo={cursorPosition:this._getCursorPositionFromEvent(e),index:i,details:this._normalizeSegmentDetails({min:o,max:r})},this.draggableSegmentsEnabled&&(document.addEventListener("pointermove",this._onSegmentPointerMove),this._emitSegmentDragEvent({index:i,state:"start",thumbIndices:[n,s]}))}_onSegmentPointerMove(e){if(!this._segmentDragStartInfo)return;e.preventDefault();const{_trackHeight:t,_trackWidth:i,_segmentDragStartInfo:{index:n,cursorPosition:s,details:{min:o,max:r}}}=this,{index:a,position:l,value:h}=o,{index:u,position:d,value:c}=r;this._dragged=!0;const m=this._getCursorPositionFromEvent(e);if(m===s)return;const _=this._positionToPercent(s),p=this._positionToPercent(m)-_,v=this._positionToPercent(l)+p,g=this._positionToPercent(d)+p,{min:f}=this._getAnchorBoundsAsPercents(a),{max:b}=this._getAnchorBoundsAsPercents(u);let E=!1,x=!1;if(v<f?E=!0:g>b&&(x=!0),E){const{min:e,max:t}=this.viewModel.getBoundsForValueAtIndex(a),i=this._isPositionInverted()?t:e,n=i,s=c+(i-h),o=s-this.values[u];return void(this.syncedSegmentsEnabled?this._updateAnchorValuesByDifference(o):this._updateAnchorValues([a,u],[n,s]))}if(x){const{min:e,max:t}=this.viewModel.getBoundsForValueAtIndex(u),i=this._isPositionInverted()?e:t,n=i,s=h+(i-c),o=s-this.values[a];return void(this.syncedSegmentsEnabled?this._updateAnchorValuesByDifference(o):this._updateAnchorValues([a,u],[s,n]))}const y=this._isHorizontalLayout()?i:t,P=g/100*y,k=v/100*y,I=this.values,A=[I[a],I[u]],M=this._getValueForAnchorAtPosition(a,k),L=this._getValueForAnchorAtPosition(u,P);this.syncedSegmentsEnabled?this._updateAnchorValuesByDifference(M-A[0]):this._updateAnchorValues([a,u],[M,L]);[this.values[a],this.values[u]].every((e,t)=>e===A[t])||this._emitSegmentDragEvent({index:n,state:"drag",thumbIndices:[a,u]})}_onSegmentPointerUp(e){if(e.preventDefault(),document.removeEventListener("pointerup",this._onSegmentPointerUp),document.removeEventListener("pointermove",this._onSegmentPointerMove),!this._segmentDragStartInfo)return;const{_dragged:t}=this,i=this.min,n=this.max,s=this.values,{index:o,details:{min:{index:r},max:{index:a}}}=this._segmentDragStartInfo;if(this.segmentElements.forEach(e=>e.classList.remove(l.segmentElementActive)),this._anchorElements.forEach(e=>e.classList.remove(l.anchorElementActive)),this.draggableSegmentsEnabled){const e=n-i,t=s[r],l=s[a];this._lastMovedHandleIndex=t===l?t>e/2?r:a:null,this._dragged=!1,this._segmentDragStartInfo=null,this._emitSegmentDragEvent({index:o,state:"stop",thumbIndices:[r,a]})}if(!t){const t=this._getCursorPositionFromEvent(e),i=this._valueFromPosition(t);this._emitSegmentClickEvent({index:o,value:i,thumbIndices:[r,a]})}}_onTickGroupClick(e){const t=e.target;if(I(t)){const e=P(t),i=k(t),n=y(t);this._emitTickClickEvent({configIndex:e,groupIndex:i,value:n})}}_storeTrackDimensions(){if(this.trackElement){const e=this._getDimensions(this.trackElement);this._trackHeight=this._applyPrecisionToPosition(e.height),this._trackWidth=this._applyPrecisionToPosition(e.width)}}_onLabelPointerDown(){this._isDisabled||(this._dragged=!1,document.addEventListener("pointerup",this._onAnchorPointerUp),document.addEventListener("pointermove",this._onAnchorPointerMove))}_onLabelPointerMove(){this._isDisabled||(this._dragged=!0)}_onLabelPointerUp(e){if(this._isDisabled)return;const t=g(e.target);this.labelInputsEnabled&&!this._dragged&&null!=t&&(this._activeLabelInputIndex=t),this._dragged=!1,document.removeEventListener("pointerup",this._onLabelPointerUp),document.removeEventListener("pointermove",this._onLabelPointerMove)}_onLabelInputBlur(e){const{_activeLabelInputIndex:t,values:i,viewModel:n}=this,s=e.target.value;if(this._activeLabelInputIndex=null,!s||null==t||null==i)return;const o=this._parseInputValue(s,"value",t),r=i[t],{min:a,max:l}=this.viewModel.getBoundsForValueAtIndex(t);if(o<a||o>l)return;n.setValue(t,o);const h=this.values[t];r!==h&&this._emitThumbChangeEvent({index:t,oldValue:r,value:h})}_onInputKeyDown(e){if(this._isDisabled)return;const{key:t,target:i}=e,{hideInput1:n,hideInput2:s,hideInput3:o}=_,{_activeLabelInputIndex:r,_anchorElements:a}=this,l=i;if(t===n||t===s||t===o){e.stopPropagation();const t=r;l.blur(),null!=t?a[t].focus():l.parentElement?.focus()}}_onMaxLabelClick(){this._isDisabled||(this._emitMaxRangeLabelClickEvent({type:"max-click",value:this.max}),this.rangeLabelInputsEnabled&&(this._isMaxInputActive=!0))}_onMaxLabelKeyDown({key:e}){this._isDisabled||e!==_.showInput||(this._isMaxInputActive=!0)}_onMaxInputBlur(e){const t=e.target.value;if(this._isMaxInputActive=!1,!t)return;const i=this.max,n=this._parseInputValue(t,"max");n<=this.min||(this.viewModel.set("max",n),this.max!==i&&this._emitMaxChangeEvent({oldValue:i,value:this.max}))}_onMinLabelClick(){this._isDisabled||(this._emitMinRangeLabelClickEvent({type:"min-click",value:this.min}),this.rangeLabelInputsEnabled&&(this._isMinInputActive=!0))}_onMinLabelKeyDown({key:e}){this._isDisabled||e!==_.showInput||(this._isMinInputActive=!0)}_onMinInputBlur(e){const t=e.target.value;if(this._isMinInputActive=!1,!t)return;const i=this.min,n=this._parseInputValue(t,"min");n>=this.max||(this.viewModel.set("min",n),this.min!==i&&this._emitMinChangeEvent({oldValue:i,value:this.min}))}_positionFromValue(e){const{_trackHeight:t,_trackWidth:i}=this,n=this.min??0,s=this.max??0,o=s-n;if(0===o||null==e)return 0;const r=this._isHorizontalLayout();let a=r?this._applyPrecisionToPosition(i*(e-n)/o):this._applyPrecisionToPosition(t*(s-e)/o);return this._isReversedLayout()&&(a=r?i-a:t-a),a}_valueFromPosition(e){const{_trackHeight:t,_trackWidth:i,precision:n}=this,s=this.min??0,o=this.max??0,r=o-s;let a=this._isHorizontalLayout()?e*r/i+s:r*(1e3-e/t*1e3)/1e3+s;return this._isReversedLayout()&&(a=o+s-a),parseFloat(a.toFixed(n))}_positionToPercent(e){const{_trackHeight:t,_trackWidth:i}=this,n=100*e/(this._isHorizontalLayout()?i:t);return this._applyPrecisionToPosition(n)}_applyPrecisionToPosition(e){return parseFloat(e.toFixed(this._positionPrecision))}_isPositionInverted(){const{layout:e}=this;return"horizontal-reversed"===e||"vertical"===e}_isHorizontalLayout(){return this.layout.includes("horizontal")}_isReversedLayout(){return this.layout.includes("reversed")}_normalizeSegmentDetails(e){if(this._isPositionInverted()){const{min:t,max:i}=e;return{min:i,max:t}}return e}_parseInputValue(e,t,i){return this.inputParseFunction?this.inputParseFunction(e,t,i):this.viewModel.defaultInputParseFunction(e)}_formatInputValue(e,t,i){return this.inputFormatFunction?this.inputFormatFunction(e,t,i):this.viewModel.defaultInputFormatFunction(e)}_getAnchorDetails(e){const t=this.values,i=[...t].sort((e,t)=>e-t)[e],n=t.indexOf(i);return{index:n,position:this._getPositionOfElement(this._anchorElements[n]),value:i}}_updateAnchorStyle(e,t){const i=this._anchorElements[e];i&&(this._isHorizontalLayout()?i.style.left=`${t}`:i.style.top=`${t}`)}_getStyleForAnchor(e,t,i){const n=this._getPositionStyleForElement(e);if(1===this.values?.length)return`${n}`;const s=this._zIndices[t];return`${n}; z-index: ${i?this._zIndexOffset+s:s}`}_getPositionStyleForElement(e){const t=this._positionFromValue(e),i=this._positionToPercent(t);return`${this._isHorizontalLayout()?"left":"top"}: ${i}%`}_getPositionOfElement(e){const t=this._getDimensions(e.offsetParent),i=this._getDimensions(e);return this._isHorizontalLayout()?this._applyPrecisionToPosition(i.left-t.left):this._applyPrecisionToPosition(i.top-t.top)}_updateAnchorValues(e,t){e.forEach((e,i)=>this._toValue(e,t[i]))}_updateAnchorValuesByDifference(e){const{min:t,max:i,values:n}=this;n?.forEach((n,s)=>this._toValue(s,Math.max(Math.min(n+e,i),t)))}_toValue(e,t){if(null!=this.steps){t=this._getStepValues()[this._getIndexOfNearestStepValue(t)]}this._updateAnchorStyle(e,this._getPositionStyleForElement(t)),this.viewModel.setValue(e,t)}_toPosition(e,t){const i=null!=this.steps?this._getStepValueForAnchorAtPosition(e,t):this._getValueForAnchorAtPosition(e,t);this._updateAnchorStyle(e,this._getPositionStyleForElement(i)),this.viewModel.setValue(e,i)}_getValueForAnchorAtPosition(e,t){const{min:i,max:n}=this._getAnchorBoundsInPixels(e),{min:s,max:o}=this.viewModel.getBoundsForValueAtIndex(e);let r,a,l=null;return this._isPositionInverted()?(r=s,a=o):(r=o,a=s),l=t>n?r:t<i?a:this._valueFromPosition(t),l>o?l=o:l<s&&(l=s),l}_getStepValueForAnchorAtPosition(e,t){const i=this._getStepValues(),n=this._calculateNearestStepPosition(t),s=this._getValueForAnchorAtPosition(e,n);return i[this._getIndexOfNearestStepValue(s)]}_getAnchorBoundsAsPercents(e){const{min:t,max:i}=this._getAnchorBoundsInPixels(e);return{min:this._positionToPercent(t),max:this._positionToPercent(i)}}_getAnchorBoundsInPixels(e){const{_anchorElements:t,_trackHeight:i,_trackWidth:n,effectiveMax:s,effectiveMin:o,thumbsConstrained:r}=this,a=t[e-1],l=t[e+1],h=this._isHorizontalLayout()?n:i;let u,d;return this._isPositionInverted()?(u=null!=o?this._positionFromValue(o):h,d=null!=s?this._positionFromValue(s):0):(u=null!=s?this._positionFromValue(s):h,d=null!=o?this._positionFromValue(o):0),r?this._isPositionInverted()?{max:a?this._getPositionOfElement(a):u,min:l?this._getPositionOfElement(l):d}:{max:l?this._getPositionOfElement(l):u,min:a?this._getPositionOfElement(a):d}:{max:u,min:d}}_getIndexOfNearestValue(e){const t=this.values;return t.indexOf(t.reduce((t,i)=>Math.abs(i-e)<Math.abs(t-e)?i:t))}_getCursorPositionFromEvent(e){const t=this._getDimensions(this.trackElement);return this._isHorizontalLayout()?this._applyPrecisionToPosition(e.clientX-t.left):this._applyPrecisionToPosition(e.clientY-t.top)}_getStepValues(){const{steps:e}=this;if(Array.isArray(e))return e;const{max:t,min:i}=this;if(null==i||null==t||null==e)return[];const n=Math.ceil((t-i)/e),s=[];for(let o=0;o<=n;o++){const n=i+e*o;s.push(n>t?t:n)}return s}_toStep(e,t){const i=this.values[e],n=this._getStepValues(),s=n.indexOf(i);let o=null;if(s>-1){let i=n[s+t];isNaN(i)&&(i=n[s]);const r=this._positionFromValue(i);o=this._getStepValueForAnchorAtPosition(e,r)}else{o=n[this._getIndexOfNearestStepValue(i)+t]}this.viewModel.setValue(e,o)}_getIndexOfNearestStepValue(e){const{steps:t}=this;if(null==t)return null;const i=this._getStepValues(),n=i.reduce((t,i)=>Math.abs(i-e)<Math.abs(t-e)?i:t);return i.indexOf(n)}_calculateNearestStepPosition(e){const t=this._valueFromPosition(e),i=this._getIndexOfNearestStepValue(t),n=this._getStepValues();return this._positionFromValue(n[i])}_getTickCounts(e,t){const{mode:i}=t;return"count"===i||"position"===i?e||0:"percent"===i&&100/e||0}_calculateTickPositions(e){return e.map(e=>this._positionFromValue(e))}_calculateEquidistantTickPositions(e){const{_trackWidth:t,_trackHeight:i}=this,n=this._isHorizontalLayout()?t:i,s=n/(e-1),o=[];if(1===e)return[n/2];for(let r=0;r<e;r++){const e=r*s;e<=n&&o.push(e)}return o}_getDimensions(e){return n(e),e.getBoundingClientRect()}_emitTrackClickEvent(e){this.emit("track-click",{...e,type:"track-click"})}_emitTickClickEvent(e){this.emit("tick-click",{...e,type:"tick-click"})}_emitMaxChangeEvent(e){this.emit("max-change",{...e,type:"max-change"})}_emitMinChangeEvent(e){this.emit("min-change",{...e,type:"min-change"})}_emitThumbChangeEvent(e){this.emit("thumb-change",{...e,type:"thumb-change"})}_emitThumbClickEvent(e){this.emit("thumb-click",{...e,type:"thumb-click"})}_emitThumbDragEvent(e){this.emit("thumb-drag",{...e,type:"thumb-drag"})}_emitSegmentClickEvent(e){this.emit("segment-click",{...e,type:"segment-click"})}_emitSegmentDragEvent(e){this.emit("segment-drag",{...e,type:"segment-drag"})}_emitMinRangeLabelClickEvent(e){this.emit("min-click",e)}_emitMaxRangeLabelClickEvent(e){this.emit("min-click",e)}};function g(e){return e?.["data-thumb-index"]}function f(e){return e?.["data-input-index"]}function b(e){return e?.["data-segment-index"]}function E(e){return e?.["data-min-thumb-index"]}function x(e){return e?.["data-max-thumb-index"]}function y(e){return e?.["data-value"]}function P(e){return e?.["data-tick-config-index"]}function k(e){return e?.["data-tick-group-index"]}function I(e){return e?.["data-config"]}e([s()],v.prototype,"_activeLabelInputIndex",void 0),e([s()],v.prototype,"_dragStartInfo",void 0),e([s()],v.prototype,"_isMinInputActive",void 0),e([s()],v.prototype,"_isMaxInputActive",void 0),e([s()],v.prototype,"_segmentDragStartInfo",void 0),e([s({readOnly:!0})],v.prototype,"_isDisabled",null),e([s()],v.prototype,"disabled",void 0),e([s()],v.prototype,"draggableSegmentsEnabled",void 0),e([s()],v.prototype,"effectiveMax",null),e([s()],v.prototype,"effectiveMin",null),e([s({readOnly:!0})],v.prototype,"effectiveSegmentElements",void 0),e([s()],v.prototype,"extraNodes",void 0),e([s()],v.prototype,"inputCreatedFunction",void 0),e([s()],v.prototype,"inputFormatFunction",null),e([s()],v.prototype,"inputParseFunction",null),e([s()],v.prototype,"icon",null),e([s()],v.prototype,"label",null),e([s({readOnly:!0})],v.prototype,"labelElements",void 0),e([s()],v.prototype,"labelInputsEnabled",void 0),e([s()],v.prototype,"labelFormatFunction",null),e([s({readOnly:!0})],v.prototype,"labels",null),e([s({value:"horizontal"})],v.prototype,"layout",null),e([s()],v.prototype,"max",null),e([s({readOnly:!0})],v.prototype,"maxLabelElement",void 0),e([s(),d("esri/widgets/Slider/t9n/Slider")],v.prototype,"messages",void 0),e([s()],v.prototype,"min",null),e([s({readOnly:!0})],v.prototype,"minLabelElement",void 0),e([s()],v.prototype,"precision",null),e([s()],v.prototype,"rangeLabelInputsEnabled",void 0),e([s({readOnly:!0})],v.prototype,"segmentElements",void 0),e([s()],v.prototype,"snapOnClickEnabled",void 0),e([s({readOnly:!0})],v.prototype,"state",null),e([s()],v.prototype,"steps",void 0),e([s()],v.prototype,"syncedSegmentsEnabled",void 0),e([s()],v.prototype,"thumbsConstrained",null),e([s()],v.prototype,"thumbCreatedFunction",void 0),e([s({readOnly:!0})],v.prototype,"thumbElements",void 0),e([s()],v.prototype,"tickConfigs",null),e([s({readOnly:!0})],v.prototype,"tickElements",void 0),e([s({readOnly:!0})],v.prototype,"trackElement",void 0),e([s()],v.prototype,"values",null),e([s({type:h})],v.prototype,"viewModel",void 0),e([s()],v.prototype,"visibleElements",void 0),e([o("visibleElements")],v.prototype,"castVisibleElements",null),v=e([r("esri.widgets.Slider")],v);const A=v;export{A as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8487],{620:(t,e,s)=>{s.d(e,{O_:()=>f,vA:()=>i}),s(48163),s(87317),(0,s(91829).vt)();class r{constructor(t){this.message=t}toString(){return`AssertException: ${this.message}`}}function i(t,e="Assertion"){if(!t){const t=new Error(e).stack;throw new r(`${e} at ${t}`)}}function f(t,e,s,r){let i,f=(s[0]-t[0])/e[0],u=(r[0]-t[0])/e[0];f>u&&(i=f,f=u,u=i);let n=(s[1]-t[1])/e[1],c=(r[1]-t[1])/e[1];if(n>c&&(i=n,n=c,c=i),f>c||n>u)return!1;n>f&&(f=n),c<u&&(u=c);let h=(s[2]-t[2])/e[2],y=(r[2]-t[2])/e[2];return h>y&&(i=h,h=y,y=i),!(f>y||h>u||(y<u&&(u=y),u<0))}},13030:(t,e,s)=>{s.d(e,{Y$:()=>a,XW:()=>B,qB:()=>L,Qt:()=>Z,My:()=>Q,bf:()=>k,jZ:()=>_,j0:()=>g,Sx:()=>x,E$:()=>M,h:()=>F,P:()=>X,SL:()=>P,gH:()=>T,ZD:()=>E,si:()=>C,mJ:()=>G,UL:()=>W,D6:()=>z,Yi:()=>O,An:()=>I,LC:()=>Y,xs:()=>S,EC:()=>m,Xm:()=>w,Vp:()=>H,zD:()=>K,m8:()=>q,nS:()=>U,H$:()=>j,eI:()=>N,Eq:()=>b,jz:()=>A,Aj:()=>R,E7:()=>J,Y4:()=>tt,TX:()=>D,Uz:()=>V,ml:()=>$,XP:()=>v}),s(34727);var r=s(87317),i=s(91829),f=s(20498);class u{static{this.ElementCount=9}constructor(t,e,s=0,r,i){this.TypedArrayConstructor=t,this.elementCount=9;const f=this.TypedArrayConstructor;void 0===r&&(r=9*f.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:s;this.typedBuffer=null==i?new f(e,u):new f(e,u,(i-s)/f.BYTES_PER_ELEMENT),this.typedBufferStride=r/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,s=this.count-e){const r=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,r,this.stride,r+s*this.stride)}getMat(t,e){let s=t*this.typedBufferStride;for(let t=0;t<9;t++)e[t]=this.typedBuffer[s++];return e}setMat(t,e){let s=t*this.typedBufferStride;for(let t=0;t<9;t++)this.typedBuffer[s++]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,s){this.typedBuffer[t*this.typedBufferStride+e]=s}copyFrom(t,e,s){const r=this.typedBuffer,i=e.typedBuffer;let f=t*this.typedBufferStride,u=s*e.typedBufferStride;for(let t=0;t<9;++t)r[f++]=i[u++]}get buffer(){return this.typedBuffer.buffer}}class n{static{this.ElementCount=16}constructor(t,e,s=0,r,i){this.TypedArrayConstructor=t,this.elementCount=16;const f=this.TypedArrayConstructor;void 0===r&&(r=16*f.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:s;this.typedBuffer=null==i?new f(e,u):new f(e,u,(i-s)/f.BYTES_PER_ELEMENT),this.typedBufferStride=r/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,s=this.count-e){const r=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,r,this.stride,r+s*this.stride)}getMat(t,e){let s=t*this.typedBufferStride;for(let t=0;t<16;t++)e[t]=this.typedBuffer[s++];return e}setMat(t,e){let s=t*this.typedBufferStride;for(let t=0;t<16;t++)this.typedBuffer[s++]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,s){this.typedBuffer[t*this.typedBufferStride+e]=s}copyFrom(t,e,s){this.copyFromTypedBuffer(t,e.typedBuffer,s*e.typedBufferStride)}copyFromTypedBuffer(t,e,s){const r=this.typedBuffer;let i=t*this.typedBufferStride;for(let t=0;t<16;++t)r[i++]=e[s++]}get buffer(){return this.typedBuffer.buffer}}class c{static{this.ElementCount=1}constructor(t,e,s=0,r,i){this.TypedArrayConstructor=t,this.elementCount=1;const f=this.TypedArrayConstructor;void 0===r&&(r=f.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:s;this.typedBuffer=null==i?new f(e,u):new f(e,u,(i-s)/f.BYTES_PER_ELEMENT),this.stride=r,this.typedBufferStride=r/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride)}sliceBuffer(t,e,s=this.count-e){const r=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,r,this.stride,r+s*this.stride)}get(t){return this.typedBuffer[t*this.typedBufferStride]}set(t,e){this.typedBuffer[t*this.typedBufferStride]=e}get buffer(){return this.typedBuffer.buffer}}var h=s(37585);class y{static{this.ElementCount=2}constructor(t,e,s=0,r,i){this.TypedArrayConstructor=t,this.start=s,this.elementCount=2;const f=this.TypedArrayConstructor;void 0===r&&(r=2*f.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:s;this.typedBuffer=null==i?new f(e,u):new f(e,u,(i-s)/f.BYTES_PER_ELEMENT),this.typedBufferStride=r/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,s=this.count-e){const r=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,r,this.stride,r+s*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,h.hZ)(e,this.typedBuffer[t],this.typedBuffer[t+1])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t]=e[1]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,s){this.typedBuffer[t*this.typedBufferStride+e]=s}setValues(t,e,s){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t]=s}copyFrom(t,e,s){const r=this.typedBuffer,i=e.typedBuffer;let f=t*this.typedBufferStride,u=s*e.typedBufferStride;r[f++]=i[u++],r[f]=i[u]}get buffer(){return this.typedBuffer.buffer}}var l=s(38954);class d{static{this.ElementCount=3}constructor(t,e,s=0,r,i){this.TypedArrayConstructor=t,this.elementCount=3;const f=this.TypedArrayConstructor;void 0===r&&(r=3*f.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:s;this.typedBuffer=null==i?new f(e,u):new f(e,u,(i-s)/f.BYTES_PER_ELEMENT),this.typedBufferStride=r/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,s=this.count-e){const r=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,r,this.stride,r+s*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,l.h)(e,this.typedBuffer[t],this.typedBuffer[t+1],this.typedBuffer[t+2])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t++]=e[1],this.typedBuffer[t]=e[2]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,s){this.typedBuffer[t*this.typedBufferStride+e]=s}setValues(t,e,s,r){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t++]=s,this.typedBuffer[t]=r}copyFrom(t,e,s){const r=this.typedBuffer,i=e.typedBuffer;let f=t*this.typedBufferStride,u=s*e.typedBufferStride;r[f++]=i[u++],r[f++]=i[u++],r[f]=i[u]}get buffer(){return this.typedBuffer.buffer}}class p{static{this.ElementCount=4}constructor(t,e,s=0,r,i){this.TypedArrayConstructor=t,this.start=s,this.elementCount=4;const f=this.TypedArrayConstructor;void 0===r&&(r=4*f.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:s;this.typedBuffer=null==i?new f(e,u):new f(e,u,(i-s)/f.BYTES_PER_ELEMENT),this.typedBufferStride=r/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,s=this.count-e){const r=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,r,this.stride,r+s*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,r.c)(e,this.typedBuffer[t++],this.typedBuffer[t++],this.typedBuffer[t++],this.typedBuffer[t])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t++]=e[1],this.typedBuffer[t++]=e[2],this.typedBuffer[t]=e[3]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,s){this.typedBuffer[t*this.typedBufferStride+e]=s}setValues(t,e,s,r,i){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t++]=s,this.typedBuffer[t++]=r,this.typedBuffer[t]=i}copyFrom(t,e,s){const r=this.typedBuffer,i=e.typedBuffer;let f=t*this.typedBufferStride,u=s*e.typedBufferStride;r[f++]=i[u++],r[f++]=i[u++],r[f++]=i[u++],r[f]=i[u]}get buffer(){return this.typedBuffer.buffer}}var o=s(620);class B extends c{constructor(t,e=0,s,r){(0,o.vA)(f.SX),super((0,f.pX)(),t,e,s,r),this.elementType="f16"}static{this.ElementType="f16"}}class a extends c{constructor(t,e=0,s,r){super(Float32Array,t,e,s,r),this.elementType="f32"}static{this.ElementType="f32"}}class E extends y{constructor(t,e=0,s,r){(0,o.vA)(f.SX),super((0,f.pX)(),t,e,s,r),this.elementType="f16"}slice(t,e){return this.sliceBuffer(E,t,e)}static{this.ElementType="f16"}}class T extends y{constructor(t,e=0,s,r){super(Float32Array,t,e,s,r),this.elementType="f32"}slice(t,e){return this.sliceBuffer(T,t,e)}static{this.ElementType="f32"}}class m extends d{constructor(t,e=0,s,r){(0,o.vA)(f.SX),super((0,f.pX)(),t,e,s,r),this.elementType="f16"}slice(t,e){return this.sliceBuffer(m,t,e)}static{this.ElementType="f16"}}class S extends d{constructor(t,e=0,s,r){super(Float32Array,t,e,s,r),this.elementType="f32"}slice(t,e){return this.sliceBuffer(S,t,e)}static fromTypedArray(t,e){return new S(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="f32"}}class A extends p{constructor(t,e=0,s,r){(0,o.vA)(f.SX),super((0,f.pX)(),t,e,s,r),this.elementType="f16"}slice(t,e){return this.sliceBuffer(A,t,e)}static{this.ElementType="f16"}}class b extends p{constructor(t,e=0,s,r){super(Float32Array,t,e,s,r),this.elementType="f32"}slice(t,e){return this.sliceBuffer(b,t,e)}static{this.ElementType="f32"}}class _ extends u{constructor(t,e=0,s,r){super(Float32Array,t,e,s,r),this.elementType="f32"}slice(t,e){return this.sliceBuffer(_,t,e)}static{this.ElementType="f32"}}class g extends u{constructor(t,e=0,s,r){super(Float64Array,t,e,s,r),this.elementType="f64"}slice(t,e){return this.sliceBuffer(g,t,e)}static{this.ElementType="f64"}}class x extends n{constructor(t,e=0,s,r){super(Float32Array,t,e,s,r),this.elementType="f32"}slice(t,e){return this.sliceBuffer(x,t,e)}static{this.ElementType="f32"}}class M extends n{constructor(t,e=0,s,r){super(Float64Array,t,e,s,r),this.elementType="f64"}slice(t,e){return this.sliceBuffer(M,t,e)}static{this.ElementType="f64"}}class L extends c{constructor(t,e=0,s,r){super(Float64Array,t,e,s,r),this.elementType="f64"}slice(t,e){return this.sliceBuffer(L,t,e)}static{this.ElementType="f64"}}class C extends y{constructor(t,e=0,s,r){super(Float64Array,t,e,s,r),this.elementType="f64"}slice(t,e){return this.sliceBuffer(C,t,e)}static{this.ElementType="f64"}}class w extends d{constructor(t,e=0,s,r){super(Float64Array,t,e,s,r),this.elementType="f64"}slice(t,e){return this.sliceBuffer(w,t,e)}static fromTypedArray(t,e){return new w(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="f64"}}class R extends p{constructor(t,e=0,s,r){super(Float64Array,t,e,s,r),this.elementType="f64"}slice(t,e){return this.sliceBuffer(R,t,e)}static{this.ElementType="f64"}}class P extends c{constructor(t,e=0,s,r){super(Uint8Array,t,e,s,r),this.elementType="u8"}slice(t,e){return this.sliceBuffer(P,t,e)}static{this.ElementType="u8"}}class Y extends y{constructor(t,e=0,s,r){super(Uint8Array,t,e,s,r),this.elementType="u8"}slice(t,e){return this.sliceBuffer(Y,t,e)}static{this.ElementType="u8"}}class N extends d{constructor(t,e=0,s,r){super(Uint8Array,t,e,s,r),this.elementType="u8"}slice(t,e){return this.sliceBuffer(N,t,e)}static fromTypedArray(t,e){return new N(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="u8"}}class v extends p{constructor(t,e=0,s,r){super(Uint8Array,t,e,s,r),this.elementType="u8"}slice(t,e){return this.sliceBuffer(v,t,e)}static{this.ElementType="u8"}}class F extends c{constructor(t,e=0,s,r){super(Uint16Array,t,e,s,r),this.elementType="u16"}slice(t,e){return this.sliceBuffer(F,t,e)}static{this.ElementType="u16"}}class O extends y{constructor(t,e=0,s,r){super(Uint16Array,t,e,s,r),this.elementType="u16"}slice(t,e){return this.sliceBuffer(O,t,e)}static{this.ElementType="u16"}}class U extends d{constructor(t,e=0,s,r){super(Uint16Array,t,e,s,r),this.elementType="u16"}slice(t,e){return this.sliceBuffer(U,t,e)}static{this.ElementType="u16"}}class V extends p{constructor(t,e=0,s,r){super(Uint16Array,t,e,s,r),this.elementType="u16"}slice(t,e){return this.sliceBuffer(V,t,e)}static{this.ElementType="u16"}}class X extends c{constructor(t,e=0,s,r){super(Uint32Array,t,e,s,r),this.elementType="u32"}slice(t,e){return this.sliceBuffer(X,t,e)}static{this.ElementType="u32"}}class I extends y{constructor(t,e=0,s,r){super(Uint32Array,t,e,s,r),this.elementType="u32"}slice(t,e){return this.sliceBuffer(I,t,e)}static{this.ElementType="u32"}}class j extends d{constructor(t,e=0,s,r){super(Uint32Array,t,e,s,r),this.elementType="u32"}slice(t,e){return this.sliceBuffer(j,t,e)}static{this.ElementType="u32"}}class $ extends p{constructor(t,e=0,s,r){super(Uint32Array,t,e,s,r),this.elementType="u32"}slice(t,e){return this.sliceBuffer($,t,e)}static{this.ElementType="u32"}}class k extends c{constructor(t,e=0,s,r){super(Int8Array,t,e,s,r),this.elementType="i8"}slice(t,e){return this.sliceBuffer(k,t,e)}static{this.ElementType="i8"}}class z extends y{constructor(t,e=0,s,r){super(Int8Array,t,e,s,r),this.elementType="i8"}slice(t,e){return this.sliceBuffer(z,t,e)}static{this.ElementType="i8"}}class q extends d{constructor(t,e=0,s,r){super(Int8Array,t,e,s,r),this.elementType="i8"}slice(t,e){return this.sliceBuffer(q,t,e)}static{this.ElementType="i8"}}class D extends p{constructor(t,e=0,s,r){super(Int8Array,t,e,s,r),this.elementType="i8"}slice(t,e){return this.sliceBuffer(D,t,e)}static{this.ElementType="i8"}}class Z extends c{constructor(t,e=0,s,r){super(Int16Array,t,e,s,r),this.elementType="i16"}slice(t,e){return this.sliceBuffer(Z,t,e)}static{this.ElementType="i16"}}class G extends y{constructor(t,e=0,s,r){super(Int16Array,t,e,s,r),this.elementType="i16"}slice(t,e){return this.sliceBuffer(G,t,e)}static{this.ElementType="i16"}}class H extends d{constructor(t,e=0,s,r){super(Int16Array,t,e,s,r),this.elementType="i16"}slice(t,e){return this.sliceBuffer(H,t,e)}static{this.ElementType="i16"}}class J extends p{constructor(t,e=0,s,r){super(Int16Array,t,e,s,r),this.elementType="i16"}slice(t,e){return this.sliceBuffer(J,t,e)}static{this.ElementType="i16"}}class Q extends c{constructor(t,e=0,s,r){super(Int32Array,t,e,s,r),this.elementType="i32"}slice(t,e){return this.sliceBuffer(Q,t,e)}static{this.ElementType="i32"}}class W extends y{constructor(t,e=0,s,r){super(Int32Array,t,e,s,r),this.elementType="i32"}slice(t,e){return this.sliceBuffer(W,t,e)}static{this.ElementType="i32"}}class K extends d{constructor(t,e=0,s,r){super(Int32Array,t,e,s,r),this.elementType="i32"}slice(t,e){return this.sliceBuffer(K,t,e)}static{this.ElementType="i32"}}class tt extends p{constructor(t,e=0,s,r){super(Int32Array,t,e,s,r),this.elementType="i32"}slice(t,e){return this.sliceBuffer(tt,t,e)}static{this.ElementType="i32"}}(0,i.vt)()},20498:(t,e,s)=>{s.d(e,{SX:()=>f,pX:()=>i});let r=globalThis.Float16Array;function i(){return r}let f=!!r},65686:(t,e,s)=>{s.d(e,{a:()=>f,b:()=>y,l:()=>h,n:()=>n,t:()=>u});var r=s(40876),i=(s(44208),s(53966));function f(t,e,s){u(t.typedBuffer,e.typedBuffer,s,t.typedBufferStride,e.typedBufferStride)}function u(t,e,s,r=4,i=r){if(t.length/r!==e.length/i)return;const f=t.length/r,u=s[0],n=s[1],c=s[2],h=s[3],y=s[4],l=s[5],d=s[6],p=s[7],o=s[8];let B=0,a=0;for(let s=0;s<f;s++){const s=e[B],f=e[B+1],E=e[B+2],T=e[B+3];t[a]=u*s+h*f+d*E,t[a+1]=n*s+y*f+p*E,t[a+2]=c*s+l*f+o*E,t[a+3]=T,B+=i,a+=r}}function n(t,e){const s=Math.min(t.count,e.count),r=t.typedBuffer,i=t.typedBufferStride,f=e.typedBuffer,u=e.typedBufferStride;for(let t=0;t<s;t++){const e=t*i,s=t*u,n=f[s],c=f[s+1],h=f[s+2],y=n*n+c*c+h*h;if(y>0){const t=1/Math.sqrt(y);r[e]=t*n,r[e+1]=t*c,r[e+2]=t*h}}}function c(t,e,s,r=4){const i=Math.min(t.length/r,e.count),f=e.typedBuffer,u=e.typedBufferStride;let n=0,c=0;for(let e=0;e<i;e++)t[c]=s*f[n],t[c+1]=s*f[n+1],t[c+2]=s*f[n+2],t[c+3]=s*f[n+3],n+=u,c+=r}function h(t,e,s,r){y(t.typedBuffer,e,s,r,t.typedBufferStride)}function y(t,e,s,i,f=4){const u=Math.min(t.length/f,e.count),n=e.typedBuffer,c=e.typedBufferStride;let h=0,y=0;const l=1/r.Tf;for(let e=0;e<u;e++)t[y]=i*(s*n[h])**l,t[y+1]=i*(s*n[h+1])**l,t[y+2]=i*(s*n[h+2])**l,t[y+3]=i*s*n[h+3],h+=c,y+=f}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:y,linearToSRGBView:h,normalize:n,scale:c,scaleView:function(t,e,s){c(t.typedBuffer,e,s,t.typedBufferStride)},transformMat3:u,transformMat3View:f,transformMat4:function(t,e,s,r=4,f=r){if(t.length/r!==e.length/f)return void i.A.getLogger("esri.views.3d.support.buffer.math").error("source and destination buffers need to have the same number of elements");const u=t.length/r,n=s[0],c=s[1],h=s[2],y=s[3],l=s[4],d=s[5],p=s[6],o=s[7],B=s[8],a=s[9],E=s[10],T=s[11],m=s[12],S=s[13],A=s[14],b=s[15];let _=0,g=0;for(let s=0;s<u;s++){const s=e[_],i=e[_+1],u=e[_+2],x=e[_+3];t[g]=n*s+l*i+B*u+m*x,t[g+1]=c*s+d*i+a*u+S*x,t[g+2]=h*s+p*i+E*u+A*x,t[g+3]=y*s+o*i+T*u+b*x,_+=f,g+=r}},transformMat4View:function(t,e,s){if(t.count!==e.count)return;const r=t.count,i=s[0],f=s[1],u=s[2],n=s[3],c=s[4],h=s[5],y=s[6],l=s[7],d=s[8],p=s[9],o=s[10],B=s[11],a=s[12],E=s[13],T=s[14],m=s[15],S=t.typedBuffer,A=t.typedBufferStride,b=e.typedBuffer,_=e.typedBufferStride;for(let t=0;t<r;t++){const e=t*A,s=t*_,r=b[s],g=b[s+1],x=b[s+2],M=b[s+3];S[e]=i*r+c*g+d*x+a*M,S[e+1]=f*r+h*g+p*x+E*M,S[e+2]=u*r+y*g+o*x+T*M,S[e+3]=n*r+l*g+B*x+m*M}}},Symbol.toStringTag,{value:"Module"}))}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[431],{431:(t,e,r)=>{r.d(e,{o6:()=>_,HY:()=>N,hx:()=>A,Jb:()=>C});var n=r(9318);function s(t,e,r){const n=e/3,s=new Uint32Array(r+1),i=new Uint32Array(r+1),u=(t,e)=>{t<e?s[t+1]++:i[e+1]++};for(let e=0;e<n;e++){const r=t[3*e],n=t[3*e+1],s=t[3*e+2];u(r,n),u(n,s),u(s,r)}let o=0,f=0;for(let t=0;t<r;t++){const e=s[t+1],r=i[t+1];s[t+1]=o,i[t+1]=f,o+=e,f+=r}const c=new Uint32Array(6*n),a=s[r],h=(t,e,r)=>{if(t<e){const n=s[t+1]++;c[2*n]=e,c[2*n+1]=r}else{const n=i[e+1]++;c[2*a+2*n]=t,c[2*a+2*n+1]=r}};for(let e=0;e<n;e++){const r=t[3*e],n=t[3*e+1],s=t[3*e+2];h(r,n,e),h(n,s,e),h(s,r,e)}const l=(t,e)=>{const r=2*t,n=e-t;for(let t=1;t<n;t++){const e=c[r+2*t],n=c[r+2*t+1];let s=t-1;for(;s>=0&&c[r+2*s]>e;s--)c[r+2*s+2]=c[r+2*s],c[r+2*s+3]=c[r+2*s+1];c[r+2*s+2]=e,c[r+2*s+3]=n}};for(let t=0;t<r;t++)l(s[t],s[t+1]),l(a+i[t],a+i[t+1]);const d=new Int32Array(3*n),y=(e,r)=>e===t[3*r]?0:e===t[3*r+1]?1:e===t[3*r+2]?2:-1,p=(t,e)=>{const r=y(t,e);d[3*e+r]=-1},m=(t,e,r,n)=>{const s=y(t,e);d[3*e+s]=n;const i=y(r,n);d[3*n+i]=e};for(let t=0;t<r;t++){let e=s[t];const r=s[t+1];let n=i[t];const u=i[t+1];for(;e<r&&n<u;){const r=c[2*e],s=c[2*a+2*n];r===s?(m(t,c[2*e+1],s,c[2*a+2*n+1]),e++,n++):r<s?(p(t,c[2*e+1]),e++):(p(s,c[2*a+2*n+1]),n++)}for(;e<r;)p(t,c[2*e+1]),e++;for(;n<u;)p(c[2*a+2*n],c[2*a+2*n+1]),n++}return d}var i=r(1843),u=r(13182),o=r(87811),f=r(38954),c=r(51850),a=r(34727);function h(t,e,r,n,s,i=2){const u=1/(Math.abs(r)+Math.abs(n)+Math.abs(s)),o=r*u,f=n*u,c=s<=0?(o>=0?1:-1)*(1-Math.abs(f)):o,a=s<=0?(f>=0?1:-1)*(1-Math.abs(o)):f,h=e*i;t[h]=l(c),t[h+1]=l(a)}function l(t){return(0,a.qE)(Math.round(32767*t),-32767,32767)}r(11868),r(34275);class d{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?E:B}write(t,e,r){g.seed=this._edgeHashFunction(r);const n=g.getIntRange(0,255),s=g.getIntRange(0,this.settings.variants-1),i=g.getFloat(),u=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(e,r.position0),t.position1.setVec(e,r.position1),t.componentIndex.set(e,r.componentIndex),t.variantOffset.set(e,n),t.variantStroke.set(e,s),t.variantExtension.set(e,u)}}const y=new Float32Array(6),p=new Uint32Array(y.buffer),m=new Uint32Array(1);function B(t){return y[0]=t.position0[0],y[1]=t.position0[1],y[2]=t.position0[2],y[3]=t.position1[0],y[4]=t.position1[1],y[5]=t.position1[2],m[0]=31*(31*(31*(31*(31*(166811+p[0])+p[1])+p[2])+p[3])+p[4])+p[5],m[0]}function E(t){const e=y;e[0]=b(t.position0[0]),e[1]=b(t.position0[1]),e[2]=b(t.position0[2]),e[3]=b(t.position1[0]),e[4]=b(t.position1[1]),e[5]=b(t.position1[2]),m[0]=5381;for(let t=0;t<p.length;t++)m[0]=31*m[0]+p[t];return m[0]}const M=1e4;function b(t){return Math.round(t*M)/M}const T=(0,c.vt)(),g=new o.A;var S=r(93406);function _(t){const e=A(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return x.updateSettings(t.writerSettings),v.updateSettings(t.writerSettings),(0,S.K)(e,x,v)}function A(t,e,r,i){if(e){const e=s(r,i,t.count);return new w(r,i,e,t)}const o=(0,n.b)(t.buffer,t.stride/4,{originalIndices:r}),f=s(o.indices,i,o.uniqueCount);return{faces:o.indices,facesLength:o.indices.length,neighbors:f,vertices:u.I$.createView(o.buffer)}}class w{constructor(t,e,r,n){this.faces=t,this.facesLength=e,this.neighbors=r,this.vertices=n}}const x=new class{constructor(){this._commonWriter=new d}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return u.gr.createBuffer(t)}write(t,e,r){this._commonWriter.write(t,e,r),(0,f.i)(T,r.faceNormal0,r.faceNormal1),(0,f.n)(T,T);const{typedBuffer:n,typedBufferStride:s}=t.normalCompressed;h(n,e,T[0],T[1],T[2],s)}},v=new class{constructor(){this._commonWriter=new d}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return u.In.createBuffer(t)}write(t,e,r){this._commonWriter.write(t,e,r);{const{typedBuffer:n,typedBufferStride:s}=t.normalCompressed;h(n,e,r.faceNormal0[0],r.faceNormal0[1],r.faceNormal0[2],s)}{const{typedBuffer:n,typedBufferStride:s}=t.normal2Compressed;h(n,e,r.faceNormal1[0],r.faceNormal1[1],r.faceNormal1[2],s)}}},C=(0,i.BP)().vec3f("position0").vec3f("position1"),N=(0,i.BP)().vec3f("position0").vec3f("position1").u16("componentIndex")},620:(t,e,r)=>{r.d(e,{O_:()=>i,vA:()=>s}),r(48163),r(87317),(0,r(91829).vt)();class n{constructor(t){this.message=t}toString(){return`AssertException: ${this.message}`}}function s(t,e="Assertion"){if(!t){const t=new Error(e).stack;throw new n(`${e} at ${t}`)}}function i(t,e,r,n){let s,i=(r[0]-t[0])/e[0],u=(n[0]-t[0])/e[0];i>u&&(s=i,i=u,u=s);let o=(r[1]-t[1])/e[1],f=(n[1]-t[1])/e[1];if(o>f&&(s=o,o=f,f=s),i>f||o>u)return!1;o>i&&(i=o),f<u&&(u=f);let c=(r[2]-t[2])/e[2],a=(n[2]-t[2])/e[2];return c>a&&(s=c,c=a,a=s),!(i>a||c>u||(a<u&&(u=a),u<0))}},9318:(t,e,r)=>{r.d(e,{b:()=>i});var n=r(34727),s=r(97146);function i(t,e,r){const i=Array.isArray(t),a=i?t.length/e:t.byteLength/(4*e),h=i?t:new Uint32Array(t,0,a*e),l=r?.minReduction??0,d=r?.originalIndices||null,y=d?d.length:0,p=r?.componentOffsets||null;let m=0;if(p)for(let t=0;t<p.length-1;t++){const e=p[t+1]-p[t];e>m&&(m=e)}else m=a;const B=Math.floor(1.1*m)+1;(null==c||c.length<2*B)&&(c=new Uint32Array((0,n.cU)(2*B)));for(let t=0;t<2*B;t++)c[t]=0;let E=0;const M=!!p&&!!d,b=M?y:a;let T=(0,s.my)(a);const g=new Uint32Array(y),S=1.96;let _=0!==l?Math.ceil(4*S*S/(l*l)*l*(1-l)):b,A=1,w=p?p[1]:b;for(let t=0;t<b;t++){if(t===_){const e=1-E/t;if(e+S*Math.sqrt(e*(1-e)/t)<l)return null;_*=2}if(t===w){for(let t=0;t<2*B;t++)c[t]=0;if(d)for(let t=p[A-1];t<p[A];t++)g[t]=T[d[t]];w=p[++A]}const r=M?d[t]:t,n=r*e,s=f(h,n,e);let i=s%B,o=E;for(;0!==c[2*i+1];){if(c[2*i]===s){const t=c[2*i+1]-1;if(u(h,n,t*e,e)){o=T[t];break}}i++,i>=B&&(i-=B)}o===E&&(c[2*i]=s,c[2*i+1]=r+1,E++),T[r]=o}if(0!==l&&1-E/a<l)return null;if(M){for(let t=p[A-1];t<g.length;t++)g[t]=T[d[t]];T=(0,s.uW)(g)}const x=i?new Array(E):new Uint32Array(E*e);E=0;for(let t=0;t<b;t++)T[t]===E&&(o(h,(M?d[t]:t)*e,x,E*e,e),E++);if(d&&!M){const t=new Uint32Array(y);for(let e=0;e<t.length;e++)t[e]=T[d[e]];T=(0,s.uW)(t)}return{buffer:Array.isArray(x)?x:x.buffer,indices:T,uniqueCount:E}}function u(t,e,r,n){for(let s=0;s<n;s++)if(t[e+s]!==t[r+s])return!1;return!0}function o(t,e,r,n,s){for(let i=0;i<s;i++)r[n+i]=t[e+i]}function f(t,e,r){let n=0;for(let s=0;s<r;s++)n=t[e+s]+n|0,n=n+(n<<11)+(n>>>2)|0;return n>>>0}let c=null},13030:(t,e,r)=>{r.d(e,{Y$:()=>m,XW:()=>p,qB:()=>x,Qt:()=>W,My:()=>G,bf:()=>X,jZ:()=>S,j0:()=>_,Sx:()=>A,E$:()=>w,h:()=>L,P:()=>z,SL:()=>I,gH:()=>E,ZD:()=>B,si:()=>v,mJ:()=>Z,UL:()=>K,D6:()=>k,Yi:()=>O,An:()=>q,LC:()=>V,xs:()=>b,EC:()=>M,Xm:()=>C,Vp:()=>H,zD:()=>Q,m8:()=>j,nS:()=>U,H$:()=>D,eI:()=>P,Eq:()=>g,jz:()=>T,Aj:()=>N,E7:()=>J,Y4:()=>tt,TX:()=>$,Uz:()=>Y,ml:()=>R,XP:()=>F}),r(34727);var n=r(87317),s=r(91829),i=r(20498);class u{static{this.ElementCount=9}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=9;const i=this.TypedArrayConstructor;void 0===n&&(n=9*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<9;t++)e[t]=this.typedBuffer[r++];return e}setMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<9;t++)this.typedBuffer[r++]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;for(let t=0;t<9;++t)n[i++]=s[u++]}get buffer(){return this.typedBuffer.buffer}}class o{static{this.ElementCount=16}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=16;const i=this.TypedArrayConstructor;void 0===n&&(n=16*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<16;t++)e[t]=this.typedBuffer[r++];return e}setMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<16;t++)this.typedBuffer[r++]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}copyFrom(t,e,r){this.copyFromTypedBuffer(t,e.typedBuffer,r*e.typedBufferStride)}copyFromTypedBuffer(t,e,r){const n=this.typedBuffer;let s=t*this.typedBufferStride;for(let t=0;t<16;++t)n[s++]=e[r++]}get buffer(){return this.typedBuffer.buffer}}class f{static{this.ElementCount=1}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=1;const i=this.TypedArrayConstructor;void 0===n&&(n=i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.stride=n,this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride)}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}get(t){return this.typedBuffer[t*this.typedBufferStride]}set(t,e){this.typedBuffer[t*this.typedBufferStride]=e}get buffer(){return this.typedBuffer.buffer}}var c=r(37585);class a{static{this.ElementCount=2}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.start=r,this.elementCount=2;const i=this.TypedArrayConstructor;void 0===n&&(n=2*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,c.hZ)(e,this.typedBuffer[t],this.typedBuffer[t+1])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t]=e[1]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t]=r}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;n[i++]=s[u++],n[i]=s[u]}get buffer(){return this.typedBuffer.buffer}}var h=r(38954);class l{static{this.ElementCount=3}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=3;const i=this.TypedArrayConstructor;void 0===n&&(n=3*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,h.h)(e,this.typedBuffer[t],this.typedBuffer[t+1],this.typedBuffer[t+2])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t++]=e[1],this.typedBuffer[t]=e[2]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r,n){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t++]=r,this.typedBuffer[t]=n}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;n[i++]=s[u++],n[i++]=s[u++],n[i]=s[u]}get buffer(){return this.typedBuffer.buffer}}class d{static{this.ElementCount=4}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.start=r,this.elementCount=4;const i=this.TypedArrayConstructor;void 0===n&&(n=4*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,n.c)(e,this.typedBuffer[t++],this.typedBuffer[t++],this.typedBuffer[t++],this.typedBuffer[t])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t++]=e[1],this.typedBuffer[t++]=e[2],this.typedBuffer[t]=e[3]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r,n,s){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t++]=r,this.typedBuffer[t++]=n,this.typedBuffer[t]=s}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;n[i++]=s[u++],n[i++]=s[u++],n[i++]=s[u++],n[i]=s[u]}get buffer(){return this.typedBuffer.buffer}}var y=r(620);class p extends f{constructor(t,e=0,r,n){(0,y.vA)(i.SX),super((0,i.pX)(),t,e,r,n),this.elementType="f16"}static{this.ElementType="f16"}}class m extends f{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}static{this.ElementType="f32"}}class B extends a{constructor(t,e=0,r,n){(0,y.vA)(i.SX),super((0,i.pX)(),t,e,r,n),this.elementType="f16"}slice(t,e){return this.sliceBuffer(B,t,e)}static{this.ElementType="f16"}}class E extends a{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(E,t,e)}static{this.ElementType="f32"}}class M extends l{constructor(t,e=0,r,n){(0,y.vA)(i.SX),super((0,i.pX)(),t,e,r,n),this.elementType="f16"}slice(t,e){return this.sliceBuffer(M,t,e)}static{this.ElementType="f16"}}class b extends l{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(b,t,e)}static fromTypedArray(t,e){return new b(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="f32"}}class T extends d{constructor(t,e=0,r,n){(0,y.vA)(i.SX),super((0,i.pX)(),t,e,r,n),this.elementType="f16"}slice(t,e){return this.sliceBuffer(T,t,e)}static{this.ElementType="f16"}}class g extends d{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(g,t,e)}static{this.ElementType="f32"}}class S extends u{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(S,t,e)}static{this.ElementType="f32"}}class _ extends u{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(_,t,e)}static{this.ElementType="f64"}}class A extends o{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(A,t,e)}static{this.ElementType="f32"}}class w extends o{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(w,t,e)}static{this.ElementType="f64"}}class x extends f{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(x,t,e)}static{this.ElementType="f64"}}class v extends a{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(v,t,e)}static{this.ElementType="f64"}}class C extends l{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(C,t,e)}static fromTypedArray(t,e){return new C(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="f64"}}class N extends d{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(N,t,e)}static{this.ElementType="f64"}}class I extends f{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(I,t,e)}static{this.ElementType="u8"}}class V extends a{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(V,t,e)}static{this.ElementType="u8"}}class P extends l{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(P,t,e)}static fromTypedArray(t,e){return new P(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="u8"}}class F extends d{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(F,t,e)}static{this.ElementType="u8"}}class L extends f{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(L,t,e)}static{this.ElementType="u16"}}class O extends a{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(O,t,e)}static{this.ElementType="u16"}}class U extends l{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(U,t,e)}static{this.ElementType="u16"}}class Y extends d{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(Y,t,e)}static{this.ElementType="u16"}}class z extends f{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(z,t,e)}static{this.ElementType="u32"}}class q extends a{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(q,t,e)}static{this.ElementType="u32"}}class D extends l{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(D,t,e)}static{this.ElementType="u32"}}class R extends d{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(R,t,e)}static{this.ElementType="u32"}}class X extends f{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(X,t,e)}static{this.ElementType="i8"}}class k extends a{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(k,t,e)}static{this.ElementType="i8"}}class j extends l{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(j,t,e)}static{this.ElementType="i8"}}class $ extends d{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer($,t,e)}static{this.ElementType="i8"}}class W extends f{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(W,t,e)}static{this.ElementType="i16"}}class Z extends a{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(Z,t,e)}static{this.ElementType="i16"}}class H extends l{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(H,t,e)}static{this.ElementType="i16"}}class J extends d{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(J,t,e)}static{this.ElementType="i16"}}class G extends f{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(G,t,e)}static{this.ElementType="i32"}}class K extends a{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(K,t,e)}static{this.ElementType="i32"}}class Q extends l{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(Q,t,e)}static{this.ElementType="i32"}}class tt extends d{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(tt,t,e)}static{this.ElementType="i32"}}(0,s.vt)()},13182:(t,e,r)=>{r.d(e,{I$:()=>M,gr:()=>g,In:()=>S});var n=r(4431),s=r(1843),i=r(20498),u=r(13030),o=r(90239);class f{constructor(t,e,r,n){this.name=t,this.byteOffset=e,this.byteStride=r,this.makeDirty=n}}class c extends f{constructor(t,e,r,n){super(t,e,r,n),this.elementCount=1}}class a extends c{constructor(t,e,r,n,s){super(t,r,n,s),this._bufferViewConstructor=e}updateBuffer(t){const{byteOffset:e,byteStride:r,_bufferViewConstructor:n}=this;this._bufferView=new n(t,e,r),this.makeDirty()}set(t,e){this._bufferView.set(t,e),this.makeDirty()}}class h extends c{constructor(t,e,r,n,s){super(t,r,n,s),this._bufferViewConstructor=e}updateBuffer(t){const{byteOffset:e,byteStride:r,_bufferViewConstructor:n}=this;this._bufferView=new n(t,e,r),this.makeDirty()}set(t,e){this._bufferView.set(t,255*e),this.makeDirty()}}class l extends f{constructor(t,e,r,n){super(t,e,r,n),this.elementCount=4}}class d extends l{constructor(t,e,r,n,s){super(t,r,n,s),this._bufferViewConstructor=e}updateBuffer(t){const{byteOffset:e,byteStride:r,_bufferViewConstructor:n}=this;this._bufferView=new n(t,e,r),this.makeDirty()}setValues(t,e,r,n,s){this._bufferView.set(t,0,e),this._bufferView.set(t,1,r),this._bufferView.set(t,2,n),this._bufferView.set(t,3,s),this.makeDirty()}setElement(t,e,r){this._bufferView.set(t,e,r),this.makeDirty()}getElement(t,e){return this._bufferView.get(t,e)}setArray(t,e){this.setValues(t,e[0],e[1],e[2],e[3])}}class y extends l{constructor(t,e,r,n,s){super(t,r,n,s),this._bufferViewConstructor=e}updateBuffer(t){const{byteOffset:e,byteStride:r,_bufferViewConstructor:n}=this;this._bufferView=new n(t,e,r),this.makeDirty()}setValues(t,e,r,n,s){this._bufferView.set(t,0,255*e),this._bufferView.set(t,1,255*r),this._bufferView.set(t,2,255*n),this._bufferView.set(t,3,255*s),this.makeDirty()}setElement(t,e,r){this._bufferView.set(t,e,255*r),this.makeDirty()}getElement(t,e){return this._bufferView.get(t,e)/255}setArray(t,e){this.setValues(t,e[0],e[1],e[2],e[3])}}function p(t){return(0,o.GJ)(t.ElementType)*t.ElementCount}const m={u8:{elementCount:1,elementType:"uint",byteSize:p(u.SL),createField:(t,e,r,n)=>new a(t.name,u.SL,e,r,n)},vec4u8:{elementCount:4,elementType:"uint",byteSize:p(u.XP),createField:(t,e,r,n)=>new d(t.name,u.XP,e,r,n)},unorm8:{elementCount:1,elementType:"float",byteSize:p(u.SL),createField:(t,e,r,n)=>new h(t.name,u.SL,e,r,n)},vec4unorm8:{elementCount:4,elementType:"float",byteSize:p(u.XP),createField:(t,e,r,n)=>new y(t.name,u.XP,e,r,n)},f16:{elementCount:1,elementType:"float",byteSize:p(i.SX?u.XW:u.Y$),createField:(t,e,r,n)=>new a(t.name,i.SX?u.XW:u.Y$,e,r,n)},f32:{elementCount:1,elementType:"float",byteSize:p(u.Y$),createField:(t,e,r,n)=>new a(t.name,u.Y$,e,r,n)}};class B{constructor(t,e,r,n){this._declaration=t,this._byteOffset=e,this._byteStride=r,this._creationInfo=n,this._startTexel=Math.floor(e/4);const s=this.byteSize;this._numTexels=Math.ceil((e+s)/4)-this._startTexel;let i=this._startTexel,u=e%4;const o=[],f=["x","y","z","w"];for(let t=0;t<s;++t){const t=`texel${i}.${f[u]}`;o.push(t),++u,u>=4&&(u=0,++i)}this._glslDecodeArgumentString=o.join(", ")}get name(){return this._declaration.name}get declaration(){return this._declaration}get byteOffset(){return this._byteOffset}get byteSize(){return this._creationInfo.byteSize}get startTexel(){return this._startTexel}get numTexels(){return this._numTexels}get elementType(){return this._creationInfo.elementType}get elementCount(){return this._creationInfo.elementCount}get glslDecodeArgumentString(){return this._glslDecodeArgumentString}createField(t){const{_declaration:e,_byteOffset:r,_byteStride:n,_creationInfo:s}=this;return s.createField(e,r,n,t)}}var E=r(85079);const M=(0,s.BP)().vec3f("position").u16("componentIndex").freeze(),b=(0,s.BP)().vec2u8("sideness").freeze(),T=(0,n.U)(b),g=(0,s.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").u16("componentIndex").u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),S=(0,s.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").vec2i16("normal2Compressed").u16("componentIndex").u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),_=(0,n.U)(g,1),A=(0,n.U)(S,1);(0,E._u)([T,_]),(0,E._u)([T,A]),new class{constructor(t){this.byteStride=0,this.numTexels=0;let e=0;const r=[];for(let n=0;n<t.length;++n){const s=t[n],{type:i}=s,u=m[i];r.push({declaration:s,byteOffset:e,creationInfo:u}),e+=u.byteSize}e=e+3&-4;const n=e,s=r.map(({declaration:t,byteOffset:e,creationInfo:r})=>new B(t,e,n,r));this.fields=s,this.byteStride=n,this.numTexels=Math.ceil(n/4)}}([{name:"color",type:"vec4unorm8"},{name:"lineWidth",type:"u8"},{name:"extensionLength",type:"u8"},{name:"materialType",type:"u8"},{name:"opacity",type:"unorm8"},{name:"elevationOffset",type:"f32"}])},20498:(t,e,r)=>{r.d(e,{SX:()=>i,pX:()=>s});let n=globalThis.Float16Array;function s(){return n}let i=!!n},34304:(t,e,r)=>{r.d(e,{DF:()=>f,FD:()=>s,Ov:()=>i,ct:()=>c});let n=1e-6;function s(){return n}const i=Math.random,u=Math.PI/180,o=180/Math.PI;function f(t){return t*u}function c(t){return t*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:i,equals:function(t,e){return Math.abs(t-e)<=n*Math.max(1,Math.abs(t),Math.abs(e))},getEpsilon:s,setEpsilon:function(t){n=t},toDegree:c,toRadian:f},Symbol.toStringTag,{value:"Module"}))},34727:(t,e,r)=>{r.d(e,{$8:()=>S,Cc:()=>u,Hx:()=>p,Io:()=>T,KJ:()=>c,OS:()=>w,Sp:()=>l,XM:()=>a,YN:()=>h,ZH:()=>y,b6:()=>g,cU:()=>s,gg:()=>d,hs:()=>o,kU:()=>f,or:()=>A,pF:()=>v,pq:()=>x,qE:()=>i});const n=new Float32Array(1);function s(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function i(t,e,r){return Math.min(Math.max(t,e),r)}function u(t,e,r){return t+(e-t)*r}function o(t,e,r,n,s){return u(n,s,(t-e)/(r-e))}function f(t){return t*Math.PI/180}function c(t){return 180*t/Math.PI}function a(t){return Math.acos(i(t,-1,1))}function h(t){return Math.asin(i(t,-1,1))}function l(t,e,r=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=r}function d(t,e,r=1e-6){return!l(t,e,r)&&t>e}function y(t,e,r=1e-6){return!l(t,e,r)&&t<e}function p(t,e,r=1e-6){return l(t,e,r)||t>e}const m=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function B(t){return m.setFloat64(0,t),m.getBigInt64(0)}const E=1000000n,M=b(1);function b(t){const e=B(t=Math.abs(t)),r=function(t){return m.setBigInt64(0,t),m.getFloat64(0)}(e<=E?E:e-E);return Math.abs(t-r)}function T(t,e,r=M){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=r&&b(Math.min(Math.abs(t),Math.abs(e)))<r)return Math.abs(t-e)<=r;const n=B(t),s=B(e);return n<0==s<0&&!((n<s?s-n:n-s)>E)}function g(t,e,r=1e-6){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;const n=Math.abs(t-e),s=Math.abs(t),i=Math.abs(e);if(0===t||0===e||s<1e-12&&i<1e-12){if(n>.01*r)return!1}else if(n/(s+i)>r)return!1;return!0}function S(t){return _(Math.max(-x,Math.min(t,x)))}function _(t){return n[0]=t,n[0]}function A(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],n=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(l(e,1)&&l(r,1)&&l(n,1))}function w(t,e){return(t%e+e)%e}const x=_(34028234663852886e22);function v(t,e,r){if(void 0===r||0===+r)return Math[t](e);if(e=+e,r=+r,isNaN(e)||"number"!=typeof r||r%1!=0)return NaN;let n=e.toString().split("e");return n=(e=Math[t](+(n[0]+"e"+(n[1]?+n[1]-r:-r)))).toString().split("e"),+(n[0]+"e"+(n[1]?+n[1]+r:r))}},37585:(t,e,r)=>{r.d(e,{C:()=>s,Cc:()=>m,Io:()=>h,S8:()=>p,WQ:()=>u,aI:()=>b,e$:()=>E,hG:()=>l,hZ:()=>i,hs:()=>a,jb:()=>g,l0:()=>B,t2:()=>M});var n=r(34304);function s(t,e){return t[0]=e[0],t[1]=e[1],t}function i(t,e,r){return t[0]=e,t[1]=r,t}function u(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function o(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function f(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t}function c(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t}function a(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function h(t,e){const r=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(r*r+n*n)}function l(t,e){const r=e[0]-t[0],n=e[1]-t[1];return r*r+n*n}function d(t){const e=t[0],r=t[1];return Math.sqrt(e*e+r*r)}function y(t){const e=t[0],r=t[1];return e*e+r*r}function p(t,e){const r=e[0],n=e[1];let s=r*r+n*n;return s>0&&(s=1/Math.sqrt(s),t[0]=e[0]*s,t[1]=e[1]*s),t}function m(t,e,r,n){const s=e[0],i=e[1];return t[0]=s+n*(r[0]-s),t[1]=i+n*(r[1]-i),t}function B(t,e,r){const n=e[0],s=e[1];return t[0]=r[0]*n+r[2]*s+r[4],t[1]=r[1]*n+r[3]*s+r[5],t}function E(t,e,r,n){const s=e[0]-r[0],i=e[1]-r[1],u=Math.sin(n),o=Math.cos(n);return t[0]=s*o-i*u+r[0],t[1]=s*u+i*o+r[1],t}function M(t,e){return t[0]===e[0]&&t[1]===e[1]}function b(t,e){const r=t[0],s=t[1],i=e[0],u=e[1],o=(0,n.FD)();return Math.abs(r-i)<=o*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(s-u)<=o*Math.max(1,Math.abs(s),Math.abs(u))}const T=d,g=o,S=f,_=c,A=h,w=l,x=y;Object.freeze(Object.defineProperty({__proto__:null,add:u,angle:function(t,e){const r=t[0],n=t[1],s=e[0],i=e[1];let u=r*r+n*n;u>0&&(u=1/Math.sqrt(u));let o=s*s+i*i;o>0&&(o=1/Math.sqrt(o));const f=(r*s+n*i)*u*o;return f>1?0:f<-1?Math.PI:Math.acos(f)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},copy:s,cross:function(t,e,r){const n=e[0]*r[1]-e[1]*r[0];return t[0]=t[1]=0,t[2]=n,t},dist:A,distance:h,div:_,divide:c,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},equals:b,exactEquals:M,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:T,length:d,lerp:m,max:function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t},min:function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t},mul:S,multiply:f,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:p,projectAndScale:function(t,e,r,n,s){let i=e[0]-r[0],u=e[1]-r[1];const o=(n[0]*i+n[1]*u)*(s-1);return i=n[0]*o,u=n[1]*o,t[0]=e[0]+i,t[1]=e[1]+u,t},random:function(t,e=1){const r=2*(0,n.Ov)()*Math.PI;return t[0]=Math.cos(r)*e,t[1]=Math.sin(r)*e,t},rotate:E,round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:a,scaleAndAdd:function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t},set:i,sqrDist:w,sqrLen:x,squaredDistance:l,squaredLength:y,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:g,subtract:o,transformMat2:function(t,e,r){const n=e[0],s=e[1];return t[0]=r[0]*n+r[2]*s,t[1]=r[1]*n+r[3]*s,t},transformMat2d:B,transformMat3:function(t,e,r){const n=e[0],s=e[1];return t[0]=r[0]*n+r[3]*s+r[6],t[1]=r[1]*n+r[4]*s+r[7],t},transformMat4:function(t,e,r){const n=e[0],s=e[1];return t[0]=r[0]*n+r[4]*s+r[12],t[1]=r[1]*n+r[5]*s+r[13],t}},Symbol.toStringTag,{value:"Module"}))},38954:(t,e,r)=>{r.d(e,{A:()=>a,B:()=>h,C:()=>E,D:()=>F,E:()=>b,F:()=>P,G:()=>Y,H:()=>q,a:()=>L,b:()=>i,c:()=>B,d:()=>u,e:()=>c,f:()=>A,g:()=>_,h:()=>o,i:()=>f,j:()=>m,l:()=>w,m:()=>V,n:()=>S,o:()=>g,p:()=>x,q:()=>T,r:()=>C,s:()=>M,t:()=>v,u:()=>l,v:()=>z,w:()=>D,x:()=>p,y:()=>y,z:()=>d});var n=r(51850),s=r(34304);function i(t){const e=t[0],r=t[1],n=t[2];return Math.sqrt(e*e+r*r+n*n)}function u(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function o(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}function f(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}function c(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}function a(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}function h(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}function l(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function d(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function y(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t}function p(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t}function m(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}function B(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}function E(t,e){const r=e[0]-t[0],n=e[1]-t[1],s=e[2]-t[2];return Math.sqrt(r*r+n*n+s*s)}function M(t,e){const r=e[0]-t[0],n=e[1]-t[1],s=e[2]-t[2];return r*r+n*n+s*s}function b(t){const e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}function T(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function g(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function S(t,e){const r=e[0],n=e[1],s=e[2];let i=r*r+n*n+s*s;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i),t}function _(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function A(t,e,r){const n=e[0],s=e[1],i=e[2],u=r[0],o=r[1],f=r[2];return t[0]=s*f-i*o,t[1]=i*u-n*f,t[2]=n*o-s*u,t}function w(t,e,r,n){const s=e[0],i=e[1],u=e[2];return t[0]=s+n*(r[0]-s),t[1]=i+n*(r[1]-i),t[2]=u+n*(r[2]-u),t}function x(t,e,r){const n=e[0],s=e[1],i=e[2];return t[0]=r[0]*n+r[4]*s+r[8]*i+r[12],t[1]=r[1]*n+r[5]*s+r[9]*i+r[13],t[2]=r[2]*n+r[6]*s+r[10]*i+r[14],t}function v(t,e,r){const n=e[0],s=e[1],i=e[2];return t[0]=n*r[0]+s*r[3]+i*r[6],t[1]=n*r[1]+s*r[4]+i*r[7],t[2]=n*r[2]+s*r[5]+i*r[8],t}function C(t,e,r){const n=r[0],s=r[1],i=r[2],u=r[3],o=e[0],f=e[1],c=e[2],a=s*c-i*f,h=i*o-n*c,l=n*f-s*o,d=s*l-i*h,y=i*a-n*l,p=n*h-s*a,m=2*u;return t[0]=o+a*m+2*d,t[1]=f+h*m+2*y,t[2]=c+l*m+2*p,t}const N=(0,n.vt)(),I=(0,n.vt)();function V(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function P(t,e){if(t===e)return!0;const r=t[0],n=t[1],i=t[2],u=e[0],o=e[1],f=e[2],c=(0,s.FD)();return Math.abs(r-u)<=c*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(n-o)<=c*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-f)<=c*Math.max(1,Math.abs(i),Math.abs(f))}function F(t,e,r){const n=r[0]-e[0],s=r[1]-e[1],i=r[2]-e[2];let u=n*n+s*s+i*i;return u>0?(u=1/Math.sqrt(u),t[0]=n*u,t[1]=s*u,t[2]=i*u,t):(t[0]=0,t[1]=0,t[2]=0,t)}const L=c,O=a,U=h,Y=E,z=M,q=i,D=b;Object.freeze(Object.defineProperty({__proto__:null,abs:l,add:f,angle:function(t,e){S(N,t),S(I,e);const r=_(N,I);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(t,e,r,n,s,i){const u=1-i,o=u*u,f=i*i,c=o*u,a=3*i*o,h=3*f*u,l=f*i;return t[0]=e[0]*c+r[0]*a+n[0]*h+s[0]*l,t[1]=e[1]*c+r[1]*a+n[1]*h+s[1]*l,t[2]=e[2]*c+r[2]*a+n[2]*h+s[2]*l,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,r=1){return t[0]=Math.min(Math.max(t[0],e),r),t[1]=Math.min(Math.max(t[1],e),r),t[2]=Math.min(Math.max(t[2],e),r),t},copy:u,cross:A,crossAndNormalize:function(t,e,r){const n=e[0],s=e[1],i=e[2],u=r[0],o=r[1],f=r[2],c=s*f-i*o,a=i*u-n*f,h=n*o-s*u,l=Math.sqrt(c*c+a*a+h*h);return t[0]=c/l,t[1]=a/l,t[2]=h/l,t},direction:F,dist:Y,distance:E,div:U,divide:h,dot:_,equals:P,exactEquals:V,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,r,n,s,i){const u=i*i,o=u*(2*i-3)+1,f=u*(i-2)+i,c=u*(i-1),a=u*(3-2*i);return t[0]=e[0]*o+r[0]*f+n[0]*c+s[0]*a,t[1]=e[1]*o+r[1]*f+n[1]*c+s[1]*a,t[2]=e[2]*o+r[2]*f+n[2]*c+s[2]*a,t},inverse:g,len:q,length:i,lerp:w,max:p,min:y,mul:O,multiply:a,negate:T,normalize:S,random:function(t,e=1){const r=s.Ov,n=2*r()*Math.PI,i=2*r()-1,u=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(n)*u,t[1]=Math.sin(n)*u,t[2]=i*e,t},rotateX:function(t,e,r,n){const s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[0],i[1]=s[1]*Math.cos(n)-s[2]*Math.sin(n),i[2]=s[1]*Math.sin(n)+s[2]*Math.cos(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},rotateY:function(t,e,r,n){const s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[2]*Math.sin(n)+s[0]*Math.cos(n),i[1]=s[1],i[2]=s[2]*Math.cos(n)-s[0]*Math.sin(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},rotateZ:function(t,e,r,n){const s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[0]*Math.cos(n)-s[1]*Math.sin(n),i[1]=s[0]*Math.sin(n)+s[1]*Math.cos(n),i[2]=s[2],t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:m,scaleAndAdd:B,set:o,sign:d,sqrDist:z,sqrLen:D,squaredDistance:M,squaredLength:b,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:L,subtract:c,transformMat3:v,transformMat4:x,transformQuat:C},Symbol.toStringTag,{value:"Module"}))},48163:(t,e,r)=>{function n(){return[0,0]}function s(t){return[t[0],t[1]]}function i(t,e){return[t,e]}function u(){return i(1,1)}function o(){return i(1,0)}function f(){return i(0,1)}r.d(e,{Un:()=>c,fA:()=>i,o8:()=>s,vt:()=>n});const c=u(),a=o(),h=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:a,UNIT_Y:h,ZEROS:[0,0],clone:s,create:n,freeze:function(t,e){return[t,e]},fromArray:function(t,e=[0,0]){const r=Math.min(2,t.length);for(let n=0;n<r;++n)e[n]=t[n];return e},fromValues:i,ones:u,unitX:o,unitY:f,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},51850:(t,e,r)=>{function n(){return[0,0,0]}function s(t){return[t[0],t[1],t[2]]}function i(t,e,r){return[t,e,r]}function u(t,e,r){return[t,e,r]}function o(t,e=[0,0,0]){const r=Math.min(3,t.length);for(let n=0;n<r;++n)e[n]=t[n];return e}function f(){return i(1,1,1)}function c(){return i(1,0,0)}function a(){return i(0,1,0)}function h(){return i(0,0,1)}r.d(e,{CN:()=>u,Cb:()=>m,Cw:()=>y,JP:()=>p,Un:()=>d,ci:()=>o,fA:()=>i,o8:()=>s,uY:()=>l,vt:()=>n});const l=[0,0,0],d=f(),y=c(),p=a(),m=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:y,UNIT_Y:p,UNIT_Z:m,ZEROS:l,clone:s,create:n,freeze:u,fromArray:o,fromValues:i,ones:f,unitX:c,unitY:a,unitZ:h,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},93406:(t,e,r)=>{r.d(e,{K:()=>f});var n=r(34727),s=r(15142),i=r(38954),u=r(51850);const o=-1;function f(t,e,r){const n=t.vertices.position,s=t.vertices.componentIndex,u=p.position0,f=p.position1,h=p.faceNormal0,d=p.faceNormal1,{edges:y,normals:m}=a(t),B=y.length/4,E=e.allocate(B);let M=0;const b=B,S=r?.allocate(b);let A=0,w=0,x=0;l.length=0;for(let t=0;t<B;++t){const e=4*t;n.getVec(y.data[e],u),n.getVec(y.data[e+1],f);const r=l.pushNew();r.index=4*t,r.length=(0,i.C)(u,f)}l.sort((t,e)=>e.length-t.length);const v=new Array,C=new Array;l.forAll(({length:t,index:a})=>{const l=y.data[a],B=y.data[a+1],b=y.data[a+2],N=y.data[a+3],I=N===o;if(n.getVec(l,u),n.getVec(B,f),I){const t=3*b;(0,i.h)(h,m.data[t],m.data[t+1],m.data[t+2]),(0,i.d)(d,h),p.componentIndex=s.get(l),p.cosAngle=(0,i.g)(h,d)}else{let t=3*b;if((0,i.h)(h,m.data[t],m.data[t+1],m.data[t+2]),t=3*N,(0,i.h)(d,m.data[t],m.data[t+1],m.data[t+2]),p.componentIndex=s.get(l),p.cosAngle=(0,i.g)(h,d),function(t,e){return t.cosAngle>e}(p,g))return;p.cosAngle<-.9999&&(0,i.d)(d,h)}w+=t,x++,I||function(t,e){return t.cosAngle<e}(p,_)?(e.write(E,M++,p),v.push(t)):c(p,T)&&(S&&r&&r.write(S,A++,p),C.push(t))});const N=new Float32Array(v.reverse()),I=new Float32Array(C.reverse()),V=S&&r?{instancesData:S.slice(0,A),lodInfo:{lengths:I}}:void 0;return{regular:{instancesData:E.slice(0,M),lodInfo:{lengths:N}},silhouette:V,averageEdgeLength:w/x}}function c(t,e){const r=(0,n.XM)(t.cosAngle);return(0,i.D)(B,t.position1,t.position0),r*((0,i.g)((0,i.f)(m,t.faceNormal0,t.faceNormal1),B)>0?-1:1)>e}function a(t){const e=t.faces.length/3,r=t.faces,n=t.neighbors,s=t.vertices.position;d.length=y.length=0;for(let t=0;t<e;t++){const e=3*t,u=n[e],f=n[e+1],c=n[e+2],a=r[e],h=r[e+1],l=r[e+2];s.getVec(a,E),s.getVec(h,M),s.getVec(l,b),(0,i.e)(M,M,E),(0,i.e)(b,b,E),(0,i.f)(E,M,b),(0,i.n)(E,E),y.pushArray(E),(u===o||a<h)&&(d.push(a),d.push(h),d.push(t),d.push(u)),(f===o||h<l)&&(d.push(h),d.push(l),d.push(t),d.push(f)),(c===o||l<a)&&(d.push(l),d.push(a),d.push(t),d.push(c))}return{edges:d,normals:y}}class h{constructor(){this.index=0,this.length=0}}const l=new s.A({allocator:t=>t||new h,deallocator:null}),d=new s.A({deallocator:null}),y=new s.A({deallocator:null}),p=new class{constructor(){this.position0=(0,u.vt)(),this.position1=(0,u.vt)(),this.faceNormal0=(0,u.vt)(),this.faceNormal1=(0,u.vt)(),this.componentIndex=0,this.cosAngle=0}},m=(0,u.vt)(),B=(0,u.vt)(),E=(0,u.vt)(),M=(0,u.vt)(),b=(0,u.vt)(),T=(0,n.kU)(4),g=Math.cos(T),S=(0,n.kU)(35),_=Math.cos(S)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5967],{9093:(e,t,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}n.d(t,{o8:()=>o,vt:()=>r,zK:()=>i});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,fromValues:function(e,t,n,r,o,i,l,s,a,u,c,f,d,p,h,g){return[e,t,n,r,o,i,l,s,a,u,c,f,d,p,h,g]}},Symbol.toStringTag,{value:"Module"}))},9762:(e,t,n)=>{n.r(t),n.d(t,{projectBuffer:()=>o});var r=n(37539);function o(e,t,n,o,i,l,s=Math.floor(e.length/3)){const a=(0,r.jd)(t,i);if(null==a)return!1;if(a===r.pO){if(e===o&&n===l)return!0;const t=n+3*s;for(let r=n,i=l;r<t;r++,i++)o[i]=e[r]??0;return!0}const u=n+3*s;for(let t=n,r=l;t<u;t+=3,r+=3)a(e,t,o,r);return!0}},19356:(e,t,n)=>{n.d(t,{i:()=>r});const r=new(n(66552).J)({none:"none",lowFourBit:"low-four-bit",highFourBit:"high-four-bit",absoluteValue:"absolute-value",moduloTen:"modulo-ten"})},20061:(e,t,n)=>{n.d(t,{A:()=>p});var r,o=n(31635),i=n(69540),l=n(66552),s=n(25482),a=n(91429),u=n(56507),c=n(93223);const f=(0,l.O)()({ascendingValues:"ascending-values",descendingValues:"descending-values"});let d=r=class extends((0,i.OU)(s.o)){static from(e){return(0,u.PZ)(r,e)}constructor(e){super(e),this.title=null,this.order=null}};(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"title",void 0),(0,o.Cg)([(0,c.e)(f)],d.prototype,"order",void 0),d=r=(0,o.Cg)([(0,a.$K)("esri.renderers.support.RendererLegendOptions")],d);const p=d},29242:(e,t,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function o(e,t,n,r,o,i,l,s,a){return[e,t,n,r,o,i,l,s,a]}n.d(t,{fA:()=>o,vt:()=>r,zK:()=>i});const i=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:r,fromValues:o},Symbol.toStringTag,{value:"Module"}))},31635:(e,t,n)=>{function r(e,t,n,r){var o,i=arguments.length,l=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(l=(i<3?o(l):i>3?o(t,n,l):o(t,n))||l);return i>3&&l&&Object.defineProperty(t,n,l),l}function o(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}n.d(t,{Cg:()=>r,hk:()=>l,mS:()=>o}),Object.create,Object.create;var i="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function l(e){function t(t){e.error=e.hasError?new i(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function o(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(o,function(e){return t(e),o()})}else r|=1}catch(e){t(e)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}},34142:(e,t,n)=>{n.r(t),n.d(t,{default:()=>A});var r=n(4576),o=n(34275),i=n(67026),l=n(82534),s=n(38954),a=n(72385),u=n(16930),c=n(9762),f=(n(44208),n(63531)),d=n(69846),p=n(48425),h=n(59418),g=n(37203);function y(e,t,n){return e?.attributeInfo.useElevation?t?function(e,t){const n=new Float64Array(t);for(let r=0;r<t;r++)n[r]=e[3*r+2];return n}(t,n):null:e?.attributeInfo.storageInfo?(0,h.m0)(e.attributeInfo.storageInfo,e.buffer,n,!0):null}function b(e){switch(e){default:case null:case"none":return e=>e;case"low-four-bit":return e=>15&e;case"high-four-bit":return e=>(240&e)>>4;case"absolute-value":return e=>Math.abs(e);case"modulo-ten":return e=>e%10}}function m(e){let t=0;for(const n of e||[])t|=1<<n;return t}var w=n(57005);class M{transform(e){const t=this._transform(e),n=[t.points.buffer,t.rgb.buffer];null!=t.pointIdFilterMap&&n.push(t.pointIdFilterMap.buffer);for(const e of t.attributes)"buffer"in e.values&&(0,o.mw)(e.values.buffer)&&e.values.buffer!==t.rgb.buffer&&n.push(e.values.buffer);return Promise.resolve({result:t,transferList:n})}_transform(e){const t=function(e,t){if(null==e.encoding||""===e.encoding){const n=(0,h.wH)(t,e);if(null==n.vertexAttributes.position)return;const r=(0,h.MA)(t,n.vertexAttributes.position),o=n.header.fields,i=[o.offsetX,o.offsetY,o.offsetZ],l=[o.scaleX,o.scaleY,o.scaleZ],s=r.length/3,a=new Float64Array(3*s);for(let e=0;e<s;e++)a[3*e]=r[3*e]*l[0]+i[0],a[3*e+1]=r[3*e+1]*l[1]+i[1],a[3*e+2]=r[3*e+2]*l[2]+i[2];return a}if("lepcc-xyz"===e.encoding)return(0,g.Me)(t).result}(e.schema,e.geometryBuffer);let n=t.length/3,o=null;const i=new Array,l=y(e.primaryAttributeData,t,n);null!=e.primaryAttributeData&&l&&i.push({attributeInfo:e.primaryAttributeData.attributeInfo,values:l});const s=y(e.modulationAttributeData,t,n);null!=e.modulationAttributeData&&s&&i.push({attributeInfo:e.modulationAttributeData.attributeInfo,values:s});let a=function(e,t,n,r){const{rendererJSON:o,isRGBRenderer:i}=e;let l=null,s=null;if(t&&i)l=t;else if(t&&"pointCloudUniqueValueRenderer"===o?.type){s=p.A.fromJSON(o);const e=s.colorUniqueValueInfos;l=new Uint8Array(3*r);const n=b(s.fieldTransformType);for(let o=0;o<r;o++){const r=(n?n(t[o]):t[o])+"";for(let t=0;t<e.length;t++)if(e[t].values.includes(r)){l[3*o]=e[t].color.r,l[3*o+1]=e[t].color.g,l[3*o+2]=e[t].color.b;break}}}else if(t&&"pointCloudStretchRenderer"===o?.type){s=d.A.fromJSON(o);const e=s.stops;l=new Uint8Array(3*r);const n=b(s.fieldTransformType);for(let o=0;o<r;o++){const r=n?n(t[o]):t[o],i=e.length-1;if(r<e[0].value)l[3*o]=e[0].color.r,l[3*o+1]=e[0].color.g,l[3*o+2]=e[0].color.b;else if(r>=e[i].value)l[3*o]=e[i].color.r,l[3*o+1]=e[i].color.g,l[3*o+2]=e[i].color.b;else for(let t=1;t<e.length;t++)if(r<e[t].value){const n=(r-e[t-1].value)/(e[t].value-e[t-1].value);l[3*o]=e[t].color.r*n+e[t-1].color.r*(1-n),l[3*o+1]=e[t].color.g*n+e[t-1].color.g*(1-n),l[3*o+2]=e[t].color.b*n+e[t-1].color.b*(1-n);break}}}else if(t&&"pointCloudClassBreaksRenderer"===o?.type){s=f.A.fromJSON(o);const e=s.colorClassBreakInfos;l=new Uint8Array(3*r);const n=b(s.fieldTransformType);for(let o=0;o<r;o++){const r=n?n(t[o]):t[o];for(let t=0;t<e.length;t++)if(r>=e[t].minValue&&r<=e[t].maxValue){l[3*o]=e[t].color.r,l[3*o+1]=e[t].color.g,l[3*o+2]=e[t].color.b;break}}}else l=new Uint8Array(3*r).fill(255);if(n&&s?.colorModulation){const e=s.colorModulation.minValue,t=s.colorModulation.maxValue,o=.3;for(let i=0;i<r;i++){const r=n[i],s=r>=t?1:r<=e?o:o+(1-o)*(r-e)/(t-e);l[3*i]=s*l[3*i],l[3*i+1]=s*l[3*i+1],l[3*i+2]=s*l[3*i+2]}}return l}(e.rendererInfo,l,s,n);if(e.filterInfo&&e.filterInfo.length>0&&null!=e.filterAttributesData){const l=e.filterAttributesData.filter(r.Ru).map(e=>{const r=y(e,t,n),o={attributeInfo:e.attributeInfo,values:r};return i.push(o),o});o=new Uint32Array(n),n=function(e,t,n,r,o){const i=e.length/3;let l=0;for(let s=0;s<i;s++){let i=!0;for(let e=0;e<r.length&&i;e++){const{filterJSON:t}=r[e],n=o[e].values[s];switch(t.type){case"pointCloudValueFilter":{const e="exclude"===t.mode;t.values.includes(n)===e&&(i=!1);break}case"pointCloudBitfieldFilter":{const e=m(t.requiredSetBits),r=m(t.requiredClearBits);(n&e)===e&&0===(n&r)||(i=!1);break}case"pointCloudReturnFilter":{const e=15&n,r=n>>>4&15,o=r>1,l=1===e,s=e===r;let a=!1;for(const e of t.includedReturns)if("last"===e&&s||"firstOfMany"===e&&l&&o||"lastOfMany"===e&&s&&o||"single"===e&&!o){a=!0;break}a||(i=!1);break}}}i&&(n[l]=s,e[3*l]=e[3*s],e[3*l+1]=e[3*s+1],e[3*l+2]=e[3*s+2],t[3*l]=t[3*s],t[3*l+1]=t[3*s+1],t[3*l+2]=t[3*s+2],l++)}return l}(t,a,o,e.filterInfo,l)}for(const r of e.userAttributesData){const e=y(r,t,n);i.push({attributeInfo:r.attributeInfo,values:e})}3*n<a.length&&(a=new Uint8Array(a.buffer.slice(0,3*n))),function(e,t,n){if(0!==n)for(let r=0;r<t;r++)e[3*r+2]+=n}(t,n,e.elevationOffset);const c=v(t,n,w.ab.fromData(e.obbData),u.A.fromJSON(e.inSR),u.A.fromJSON(e.outSR));return{obbData:e.obbData,points:c,rgb:a,attributes:i,pointIdFilterMap:o}}}function v(e,t,n,r,o){if(!(0,c.projectBuffer)(e,r,0,e,o,0,t))throw new Error("Can't reproject");const l=(0,a.o8)(n.center),u=(0,a.vt)(),f=(0,a.vt)(),d=(0,a.o8)(n.halfSize);(0,i.Xr)(C,n.quaternion);const p=new Float32Array(3*t);for(let n=0;n<t;n++){let t=3*n;u[0]=e[t]-l[0],u[1]=e[t+1]-l[1],u[2]=e[t+2]-l[2],(0,s.r)(f,u,C),d[0]=Math.max(d[0],Math.abs(f[0])),d[1]=Math.max(d[1],Math.abs(f[1])),d[2]=Math.max(d[2],Math.abs(f[2])),p[t++]=u[0],p[t++]=u[1],p[t]=u[2]}return n.halfSize=d,p}const C=(0,l.vt)();function A(){return new M}},34304:(e,t,n)=>{n.d(t,{DF:()=>a,FD:()=>o,Ov:()=>i,ct:()=>u});let r=1e-6;function o(){return r}const i=Math.random,l=Math.PI/180,s=180/Math.PI;function a(e){return e*l}function u(e){return e*s}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:i,equals:function(e,t){return Math.abs(e-t)<=r*Math.max(1,Math.abs(e),Math.abs(t))},getEpsilon:o,setEpsilon:function(e){r=e},toDegree:u,toRadian:a},Symbol.toStringTag,{value:"Module"}))},37203:(e,t,n)=>{n.d(t,{Ax:()=>b,Me:()=>u,mb:()=>h});var r=n(49186);const o=!0,i={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function l(e,t,n){return{identifier:String.fromCharCode.apply(null,new Uint8Array(e,n+i.identifierOffset,i.identifierLength)),version:t.getUint16(n+i.versionOffset,o),checksum:t.getUint32(n+i.checksumOffset,o)}}const s={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function a(e,t){return{sizeLo:e.getUint32(t+s.sizeLo,o),sizeHi:e.getUint32(t+s.sizeHi,o),minX:e.getFloat64(t+s.minX,o),minY:e.getFloat64(t+s.minY,o),minZ:e.getFloat64(t+s.minZ,o),maxX:e.getFloat64(t+s.maxX,o),maxY:e.getFloat64(t+s.maxY,o),maxZ:e.getFloat64(t+s.maxZ,o),errorX:e.getFloat64(t+s.errorX,o),errorY:e.getFloat64(t+s.errorY,o),errorZ:e.getFloat64(t+s.errorZ,o),count:e.getUint32(t+s.count,o),reserved:e.getUint32(t+s.reserved,o)}}function u(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:u}=l(e,t,n);if(n+=i.byteCount,"LEPCC "!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(u>1)throw new r.A("lepcc-decode-error","Unknown version");const f=a(t,n);if(n+=s.byteCount,f.sizeHi*2**32+f.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const d=new Float64Array(3*f.count),p=[],h=[],g=[],y=[];if(n=c(e,n,p),n=c(e,n,h),n=c(e,n,g),n=c(e,n,y),n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad length");let b=0,m=0;for(let e=0;e<p.length;e++){m+=p[e];let t=0;for(let n=0;n<h[e];n++){t+=g[b];const e=y[b];d[3*b]=Math.min(f.maxX,f.minX+2*f.errorX*t),d[3*b+1]=Math.min(f.maxY,f.minY+2*f.errorY*m),d[3*b+2]=Math.min(f.maxZ,f.minZ+2*f.errorZ*e),b++}}return{errorX:f.errorX,errorY:f.errorY,errorZ:f.errorZ,result:d}}function c(e,t,n){const r=[];t=f(e,t,r);const o=[];for(let i=0;i<r.length;i++){o.length=0,t=f(e,t,o);for(let e=0;e<o.length;e++)n.push(o[e]+r[i])}return t}function f(e,t,n){const i=new DataView(e,t),l=i.getUint8(0),s=31&l,a=!!(32&l),u=(192&l)>>6;let c=0;if(0===u)c=i.getUint32(1,o),t+=5;else if(1===u)c=i.getUint16(1,o),t+=3;else{if(2!==u)throw new r.A("lepcc-decode-error","Bad count type");c=i.getUint8(1),t+=2}if(a)throw new r.A("lepcc-decode-error","LUT not implemented");const f=Math.ceil(c*s/8),d=new Uint8Array(e,t,f);let p=0,h=0,g=0;const y=-1>>>32-s;for(let e=0;e<c;e++){for(;h<s;)p|=d[g]<<h,h+=8,g+=1;n[e]=p&y,p>>>=s,h-=s,h+s>32&&(p|=d[g-1]>>8-h)}return t+g}const d={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function p(e,t){return{sizeLo:e.getUint32(t+d.sizeLo,o),sizeHi:e.getUint32(t+d.sizeHi,o),count:e.getUint32(t+d.count,o),colorMapCount:e.getUint16(t+d.colorMapCount,o),lookupMethod:e.getUint8(t+d.lookupMethod),compressionMethod:e.getUint8(t+d.compressionMethod)}}function h(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:s}=l(e,t,n);if(n+=i.byteCount,"ClusterRGB"!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(s>1)throw new r.A("lepcc-decode-error","Unknown version");const a=p(t,n);if(n+=d.byteCount,a.sizeHi*2**32+a.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");if((2===a.lookupMethod||1===a.lookupMethod)&&0===a.compressionMethod){if(3*a.colorMapCount+a.count+n!==e.byteLength||a.colorMapCount>256)throw new r.A("lepcc-decode-error","Bad count");const t=new Uint8Array(e,n,3*a.colorMapCount),o=new Uint8Array(e,n+3*a.colorMapCount,a.count),i=new Uint8Array(3*a.count);for(let e=0;e<a.count;e++){const n=o[e];i[3*e]=t[3*n],i[3*e+1]=t[3*n+1],i[3*e+2]=t[3*n+2]}return i}if(0===a.lookupMethod&&0===a.compressionMethod){if(3*a.count+n!==e.byteLength||0!==a.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");return new Uint8Array(e,n).slice()}if(a.lookupMethod<=2&&1===a.compressionMethod){if(n+3!==e.byteLength||1!==a.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");const o=t.getUint8(n),i=t.getUint8(n+1),l=t.getUint8(n+2),s=new Uint8Array(3*a.count);for(let e=0;e<a.count;e++)s[3*e]=o,s[3*e+1]=i,s[3*e+2]=l;return s}throw new r.A("lepcc-decode-error","Bad method "+a.lookupMethod+","+a.compressionMethod)}const g={sizeLo:0,sizeHi:4,count:8,scaleFactor:12,bitsPerPoint:14,reserved:15,byteCount:16};function y(e,t){return{sizeLo:e.getUint32(t+g.sizeLo,o),sizeHi:e.getUint32(t+g.sizeHi,o),count:e.getUint32(t+g.count,o),scaleFactor:e.getUint16(t+g.scaleFactor,o),bitsPerPoint:e.getUint8(t+g.bitsPerPoint),reserved:e.getUint8(t+g.reserved)}}function b(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:s}=l(e,t,n);if(n+=i.byteCount,"Intensity "!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(s>1)throw new r.A("lepcc-decode-error","Unknown version");const a=y(t,n);if(n+=g.byteCount,a.sizeHi*2**32+a.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const u=new Uint16Array(a.count);if(8===a.bitsPerPoint){if(a.count+n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const t=new Uint8Array(e,n,a.count);for(let e=0;e<a.count;e++)u[e]=t[e]*a.scaleFactor}else if(16===a.bitsPerPoint){if(2*a.count+n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const t=new Uint16Array(e,n,a.count);for(let e=0;e<a.count;e++)u[e]=t[e]*a.scaleFactor}else{const t=[];if(f(e,n,t)!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");for(let e=0;e<a.count;e++)u[e]=t[e]*a.scaleFactor}return u}},37539:(e,t,n)=>{n.d(t,{pO:()=>g,jd:()=>d,Tp:()=>p,w5:()=>f});var r=n(34727),o=n(86211),i=n(73941),l=n(79258);Math.PI;const s=l.$O.radius,a=l.$O.eccentricitySquared,u={a1:s*a,a2:s*a*s*a,a3:s*a*a/2,a4:s*a*s*a*2.5,a5:s*a+s*a*a/2,a6:1-a};l.$O.radius,l.$O.flattening,l.Sw.radius,l.Sw.flattening,l.sH.radius,l.sH.flattening,l.sH.radius;var c=n(21325);const f={2:{5:g,7:null,9:null,10:g,1:A,6:null,8:null,0:null,3:b,11:m,2:g,4:j},5:{5:g,7:null,9:null,10:g,1:A,6:null,8:null,0:null,3:b,11:m,2:g,4:j},7:{5:null,7:g,9:null,10:g,1:null,6:C,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:g,10:g,1:null,6:null,8:v,0:null,3:null,11:null,2:null,4:null},3:{5:y,7:null,9:null,10:y,1:function(e,t,n,r){const o=e[t]/V,i=z-2*Math.atan(Math.exp(-e[t+1]/V)),l=V+(e[t+2]??0),s=Math.cos(i)*l;n[r]=Math.cos(o)*s,n[r+1]=Math.sin(o)*s,n[r+2]=Math.sin(i)*l},6:null,8:null,0:null,3:g,11:function(e,t,n,r){y(e,t,n,r),m(n,r,n,r)},2:y,4:function(e,t,n,r){y(e,t,n,r),j(n,r,n,r)}},4:{5:k,7:null,9:null,10:k,1:function(e,t,n,r){k(e,t,n,r),A(n,r,n,r)},6:null,8:null,0:null,3:function(e,t,n,r){k(e,t,n,r),b(n,r,n,r)},11:function(e,t,n,r){k(e,t,n,r),m(n,r,n,r)},2:k,4:g},1:{5:U,7:null,9:null,10:U,1:g,6:null,8:null,0:null,3:function(e,t,n,r){U(e,t,n,r),b(n,r,n,r)},11:function(e,t,n,r){U(e,t,n,r),m(n,r,n,r)},2:U,4:function(e,t,n,r){U(e,t,n,r),j(n,r,n,r)}},6:{5:null,7:O,9:null,10:O,1:null,6:g,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:I,10:I,1:null,6:null,8:g,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:g,3:null,11:null,2:null,4:null},10:{5:g,7:g,9:g,10:g,1:A,6:C,8:v,0:null,3:b,11:m,2:g,4:j},11:{5:w,7:null,9:null,10:w,1:function(e,t,n,r){w(e,t,n,r),A(n,r,n,r)},6:null,8:null,0:null,3:function(e,t,n,r){w(e,t,n,r),b(n,r,n,r)},11:g,2:w,4:function(e,t,n,r){w(e,t,n,r),j(n,r,n,r)}}};function d(e,t){return p(e,t)?.projector}function p(e,t){if(null==e||null==t)return null;if(R.source.spatialReference===e&&R.dest.spatialReference===t)return R;const n=h(e,R.source),r=h(t,R.dest);return 0===n&&0===r?(0,c.aI)(e,t)?R.projector=g:R.projector=null:R.projector=f[n][r],R}function h(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,o.GA)(e,1)),(0,i.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===i.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===i.FY.wkt?t.spatialReferenceId=6:e.wkt===i.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function g(e,t,n,r){e!==n&&(n[r++]=e[t++],n[r++]=e[t++],n[r]=e[t]??0)}function y(e,t,n,r){n[r]=x*(e[t]/V),n[r+1]=x*(z-2*Math.atan(Math.exp(-e[t+1]/V))),n[r+2]=e[t+2]??0}function b(e,t,n,o){!function(e,t,n,o,i){const l=.4999999*Math.PI,s=(0,r.qE)(T*e[t+1],-l,l),a=Math.sin(s);n[o++]=T*e[t]*i.radius,n[o++]=i.halfSemiMajorAxis*Math.log((1+a)/(1-a)),n[o]=e[t+2]??0}(e,t,n,o,l.$O)}function m(e,t,n,r){n[r]=e[t]*q,n[r+1]=e[t+1]*q,n[r+2]=e[t+2]??0}function w(e,t,n,r){n[r]=e[t]*P,n[r+1]=e[t+1]*P,n[r+2]=e[t+2]??0}function M(e,t,n,r,o){const i=o+(e[t+2]??0),l=T*e[t],s=T*e[t+1],a=Math.cos(s)*i;n[r]=Math.cos(l)*a,n[r+1]=Math.sin(l)*a,n[r+2]=Math.sin(s)*i}function v(e,t,n,r){M(e,t,n,r,l.Sw.radius)}function C(e,t,n,r){M(e,t,n,r,l.sH.radius)}function A(e,t,n,r){M(e,t,n,r,l.$O.radius)}function S(e,t,n,o,i){const l=e[t],s=e[t+1],a=e[t+2]??0,u=Math.sqrt(l*l+s*s+a*a),c=(0,r.YN)(a/(0===u?1:u)),f=Math.atan2(s,l);n[o++]=x*f,n[o++]=x*c,n[o]=u-i}function I(e,t,n,r){S(e,t,n,r,l.Sw.radius)}function O(e,t,n,r){S(e,t,n,r,l.sH.radius)}function U(e,t,n,r){S(e,t,n,r,l.$O.radius)}function j(e,t,n,r){!function(e,t,n,r,o){const i=T*e[t],l=T*e[t+1],s=e[t+2]??0,a=Math.sin(l),u=Math.cos(l),c=o.radius/Math.sqrt(1-o.eccentricitySquared*a*a);n[r++]=(c+s)*u*Math.cos(i),n[r++]=(c+s)*u*Math.sin(i),n[r++]=(c*(1-o.eccentricitySquared)+s)*a}(e,t,n,r,l.$O)}function k(e,t,n,r){const o=u,i=e[t],s=e[t+1],a=e[t+2]??0;let c,f,d,p,h,g,y,b,m,w,M,v,C,A,S,I,O,U,j,k,R;c=Math.abs(a),f=i*i+s*s,d=Math.sqrt(f),p=f+a*a,h=Math.sqrt(p),k=Math.atan2(s,i),g=a*a/p,y=f/p,A=o.a2/h,S=o.a3-o.a4/h,y>.3?(b=c/h*(1+y*(o.a1+A+g*S)/h),j=Math.asin(b),w=b*b,m=Math.sqrt(1-w)):(m=d/h*(1-g*(o.a5-A-y*S)/h),j=Math.acos(m),w=1-m*m,b=Math.sqrt(w)),M=1-l.$O.eccentricitySquared*w,v=l.$O.radius/Math.sqrt(M),C=o.a6*v,A=d-v*m,S=c-C*b,O=m*A+b*S,I=m*S-b*A,U=I/(C/M+O),j+=U,R=O+I*U/2,a<0&&(j=-j),n[r++]=x*k,n[r++]=x*j,n[r]=R}const R={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:g},T=(0,r.kU)(1),x=(0,r.KJ)(1),z=.5*Math.PI,V=l.$O.radius,q=V*Math.PI/180,P=180/(V*Math.PI)},40876:(e,t,n)=>{n.d(t,{Eq:()=>p,G1:()=>g,TS:()=>i,Tf:()=>m,V6:()=>o,Vm:()=>h,ay:()=>a,c1:()=>y,c4:()=>l,j5:()=>u,lT:()=>f,oW:()=>c,xV:()=>M});const r={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function o(e){return!!r[e]||!!r[e.toLowerCase()]}function i(e){return r[e]??r[e.toLowerCase()]}function l(e){return[...i(e)]}function s(e,t,n){n<0&&++n,n>1&&--n;const r=6*n;return r<1?e+(t-e)*r:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function a(e,t,n,r=1){const o=(e%360+360)%360/360,i=n<=.5?n*(t+1):n+t-n*t,l=2*n-i;return[Math.round(255*s(l,i,o+1/3)),Math.round(255*s(l,i,o)),Math.round(255*s(l,i,o-1/3)),r]}function u(e){const t=e.length>5,n=t?8:4,r=(1<<n)-1,o=t?1:17,i=t?9===e.length:5===e.length;let l=Number("0x"+e.slice(1));if(isNaN(l))return null;const s=[0,0,0,1];let a;return i&&(a=l&r,l>>=n,s[3]=o*a/255),a=l&r,l>>=n,s[2]=o*a,a=l&r,l>>=n,s[1]=o*a,a=l&r,l>>=n,s[0]=o*a,s}function c(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const t=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),r=parseInt(e.slice(3,4),16),o=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,n+16*n,r+16*r,(o+16*o)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function f(e){const t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){const e=t[2].split(/\s*,\s*/),n=t[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){if(e[0].endsWith("%")){const t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),d(t)}return d(e.map(e=>parseFloat(e)))}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return a(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function d(e){return e[0]=y(e[0]),e[1]=y(e[1]),e[2]=y(e[2]),e[3]=4===e.length?g(e[3]):1,e}function p(e){let t=o(e)?i(e):null;return t??=f(e),t??=c(e),t}function h(e){const t=p(e);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function g(e){return b(e,0,1)}function y(e){return Math.round(b(e,0,255))}function b(e,t,n){return e=Number(e),isNaN(e)?n:e<t?t:e>n?n:e}const m=2.2,w=1/m;function M(e){return e**w}},48425:(e,t,n)=>{n.d(t,{A:()=>b});var r,o=n(31635),i=n(4718),l=n(91429),s=n(51857),a=n(20061),u=n(68197),c=n(25482),f=n(56507);let d=r=class extends c.o{constructor(){super(...arguments),this.description=null,this.label=null,this.values=null,this.color=null}clone(){return new r({description:this.description,label:this.label,values:(0,i.o8)(this.values),color:(0,i.o8)(this.color)})}};(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],d.prototype,"label",void 0),(0,o.Cg)([(0,l.MZ)({type:[String],json:{write:{isRequired:!0}}})],d.prototype,"values",void 0),(0,o.Cg)([(0,l.MZ)({type:u.A,json:{type:[f.jz],write:{isRequired:!0}}})],d.prototype,"color",void 0),d=r=(0,o.Cg)([(0,l.$K)("esri.renderers.support.pointCloud.ColorUniqueValueInfo")],d);const p=d;var h,g=n(19356),y=n(93223);let b=h=class extends s.A{constructor(e){super(e),this.type="point-cloud-unique-value",this.field=null,this.fieldTransformType=null,this.colorUniqueValueInfos=null,this.legendOptions=null}clone(){return new h({...this.cloneProperties(),field:(0,i.o8)(this.field),fieldTransformType:(0,i.o8)(this.fieldTransformType),colorUniqueValueInfos:(0,i.o8)(this.colorUniqueValueInfos),legendOptions:(0,i.o8)(this.legendOptions)})}};(0,o.Cg)([(0,y.e)({pointCloudUniqueValueRenderer:"point-cloud-unique-value"})],b.prototype,"type",void 0),(0,o.Cg)([(0,l.MZ)({json:{write:{isRequired:!0}},type:String})],b.prototype,"field",void 0),(0,o.Cg)([(0,l.MZ)({type:g.i.apiValues,json:{type:g.i.jsonValues,read:g.i.read,write:g.i.write}})],b.prototype,"fieldTransformType",void 0),(0,o.Cg)([(0,l.MZ)({type:[p],json:{write:{isRequired:!0}}})],b.prototype,"colorUniqueValueInfos",void 0),(0,o.Cg)([(0,l.MZ)({type:a.A,json:{write:!0}})],b.prototype,"legendOptions",void 0),b=h=(0,o.Cg)([(0,l.$K)("esri.renderers.PointCloudUniqueValueRenderer")],b)},51850:(e,t,n)=>{function r(){return[0,0,0]}function o(e){return[e[0],e[1],e[2]]}function i(e,t,n){return[e,t,n]}function l(e,t,n){return[e,t,n]}function s(e,t=[0,0,0]){const n=Math.min(3,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t}function a(){return i(1,1,1)}function u(){return i(1,0,0)}function c(){return i(0,1,0)}function f(){return i(0,0,1)}n.d(t,{CN:()=>l,Cb:()=>y,Cw:()=>h,JP:()=>g,Un:()=>p,ci:()=>s,fA:()=>i,o8:()=>o,uY:()=>d,vt:()=>r});const d=[0,0,0],p=a(),h=u(),g=c(),y=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:p,UNIT_X:h,UNIT_Y:g,UNIT_Z:y,ZEROS:d,clone:o,create:r,freeze:l,fromArray:s,fromValues:i,ones:a,unitX:u,unitY:c,unitZ:f,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},51857:(e,t,n)=>{n.d(t,{A:()=>C});var r,o=n(31635),i=n(66552),l=n(25482),s=n(4718),a=n(91429);let u=r=class extends l.o{constructor(){super(...arguments),this.field=null,this.minValue=0,this.maxValue=255}clone(){return new r({field:this.field,minValue:this.minValue,maxValue:this.maxValue})}};(0,o.Cg)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],u.prototype,"field",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],u.prototype,"minValue",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],u.prototype,"maxValue",void 0),u=r=(0,o.Cg)([(0,a.$K)("esri.renderers.support.pointCloud.ColorModulation")],u);const c=u,f=new i.J({pointCloudFixedSizeAlgorithm:"fixed-size",pointCloudSplatAlgorithm:"splat"});let d=class extends l.o{};(0,o.Cg)([(0,a.MZ)({type:f.apiValues,readOnly:!0,nonNullable:!0,json:{type:f.jsonValues,read:!1,write:{writer:f.write,isRequired:!0}}})],d.prototype,"type",void 0),d=(0,o.Cg)([(0,a.$K)("esri.renderers.support.pointCloud.PointSizeAlgorithm")],d);const p=d;var h,g=n(93223);let y=h=class extends p{constructor(){super(...arguments),this.type="fixed-size",this.size=0,this.useRealWorldSymbolSizes=null}clone(){return new h({size:this.size,useRealWorldSymbolSizes:this.useRealWorldSymbolSizes})}};(0,o.Cg)([(0,g.e)({pointCloudFixedSizeAlgorithm:"fixed-size"})],y.prototype,"type",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],y.prototype,"size",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"useRealWorldSymbolSizes",void 0),y=h=(0,o.Cg)([(0,a.$K)("esri.renderers.support.pointCloud.PointSizeFixedSizeAlgorithm")],y);const b=y;var m;let w=m=class extends p{constructor(){super(...arguments),this.type="splat",this.scaleFactor=1}clone(){return new m({scaleFactor:this.scaleFactor})}};(0,o.Cg)([(0,g.e)({pointCloudSplatAlgorithm:"splat"})],w.prototype,"type",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,value:1,nonNullable:!0,json:{write:{isRequired:!0}}})],w.prototype,"scaleFactor",void 0),w=m=(0,o.Cg)([(0,a.$K)("esri.renderers.support.pointCloud.PointSizeSplatAlgorithm")],w);const M={key:"type",base:p,typeMap:{"fixed-size":b,splat:w}},v=(0,i.O)()({pointCloudClassBreaksRenderer:"point-cloud-class-breaks",pointCloudRGBRenderer:"point-cloud-rgb",pointCloudStretchRenderer:"point-cloud-stretch",pointCloudUniqueValueRenderer:"point-cloud-unique-value"});let C=class extends l.o{constructor(e){super(e),this.type=void 0,this.pointSizeAlgorithm=null,this.colorModulation=null,this.pointsPerInch=10}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}cloneProperties(){return{pointSizeAlgorithm:(0,s.o8)(this.pointSizeAlgorithm),colorModulation:(0,s.o8)(this.colorModulation),pointsPerInch:(0,s.o8)(this.pointsPerInch)}}};(0,o.Cg)([(0,a.MZ)({type:v.apiValues,readOnly:!0,nonNullable:!0,json:{type:v.jsonValues,read:!1,write:{writer:v.write,isRequired:!0}}})],C.prototype,"type",void 0),(0,o.Cg)([(0,a.MZ)({types:M,json:{write:!0}})],C.prototype,"pointSizeAlgorithm",void 0),(0,o.Cg)([(0,a.MZ)({type:c,json:{write:!0}})],C.prototype,"colorModulation",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0},nonNullable:!0,type:Number})],C.prototype,"pointsPerInch",void 0),C=(0,o.Cg)([(0,a.$K)("esri.renderers.PointCloudRenderer")],C)},59418:(e,t,n)=>{n.d(t,{wH:()=>g,MA:()=>d,E5:()=>p,m0:()=>b});var r=n(49186),o=n(4718),i=n(53966),l=n(34275),s=n(37203);const a=()=>i.A.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function u(e,t,n){let o="",i=0;for(;i<n;){const l=e[t+i];if(l<128)o+=String.fromCharCode(l),i++;else if(l>=192&&l<224){if(i+1>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const s=(31&l)<<6|63&e[t+i+1];o+=String.fromCharCode(s),i+=2}else if(l>=224&&l<240){if(i+2>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const s=(15&l)<<12|(63&e[t+i+1])<<6|63&e[t+i+2];o+=String.fromCharCode(s),i+=3}else{if(!(l>=240&&l<248))throw new r.A("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(i+3>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const s=(7&l)<<18|(63&e[t+i+1])<<12|(63&e[t+i+2])<<6|63&e[t+i+3];if(s>=65536){const e=55296+(s-65536>>10),t=56320+(1023&s);o+=String.fromCharCode(e,t)}else o+=String.fromCharCode(s);i+=4}}}return o}function c(e,t){const n={byteOffset:0,byteCount:0,fields:Object.create(null)};let r=0;for(let o=0;o<t.length;o++){const i=t[o],l=i.valueType||i.type,s=w[l];n.fields[i.property]=s(e,r),r+=m[l].BYTES_PER_ELEMENT}return n.byteCount=r,n}function f(e,t,n){const o=[];let i,l,s=0;for(l=0;l<e;l+=1){if(i=t[l],i>0){if(o.push(u(n,s,i-1)),0!==n[s+i-1])throw new r.A("string-array-error","Invalid string array: missing null termination.")}else o.push(null);s+=i}return o}function d(e,t){return new(0,m[t.valueType])(e,t.byteOffset,t.count*t.valuesPerElement)}function p(e,t){if(!e)return null;const n=e[t];return(0,l.IY)(e)?n===l.PI?null:n:(0,l._G)(e)?n===l.h2?null:n:n!=n?null:n}function h(e,t,n){if(t!==e&&a().error(`Invalid ${n} buffer size\n expected: ${e}, actual: ${t})`),t<e)throw new r.A("buffer-too-small","Binary buffer is too small",{expectedSize:e,actualSize:t})}function g(e,t){const n=c(e,t&&t.header);let r=n.byteCount;const o={isDraco:!1,header:n,byteOffset:n.byteCount,byteCount:0,vertexAttributes:{}},i=n.fields,l=null!=i.vertexCount?i.vertexCount:i.count;for(const e of t.ordering){if(!t.vertexAttributes[e])continue;const n={...t.vertexAttributes[e],byteOffset:r,count:l},i=y[e]||"_"+e;o.vertexAttributes[i]=n,r+=v(n.valueType)*n.valuesPerElement*l}const s=i.faceCount;if(t.faces&&s){o.faces={};for(const e of t.ordering){if(!t.faces[e])continue;const n={...t.faces[e],byteOffset:r,count:s};o.faces[e]=n,r+=v(n.valueType)*n.valuesPerElement*s}}const a=i.featureCount;if(t.featureAttributes&&t.featureAttributeOrder&&a){o.featureAttributes={};for(const e of t.featureAttributeOrder){if(!t.featureAttributes[e])continue;const n={...t.featureAttributes[e],byteOffset:r,count:a};o.featureAttributes[e]=n,r+=("UInt64"===n.valueType?8:v(n.valueType))*n.valuesPerElement*a}}return h(r,e.byteLength,"geometry"),o.byteCount=r-o.byteOffset,o}const y={position:"position",normal:"normal",color:"color",uv0:"uv0",region:"uvRegion"};function b(e,t,n,i=!1){if("lepcc-rgb"===e.encoding)return i?(0,s.mb)(t):function(e){return Array.isArray(e)?e.length<l.y9?e:new Uint8Array(e):e.length<l.y9?Array.from(e):e}((0,s.mb)(t));if("lepcc-intensity"===e.encoding)return i?(0,s.Ax)(t):function(e){return Array.isArray(e)?e.length<l.y9?e:new Uint16Array(e):e.length<l.y9?Array.from(e):e}((0,s.Ax)(t));if(null!=e.encoding&&""!==e.encoding)throw new r.A("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");e["attributeByteCounts "]&&!e.attributeByteCounts&&(a().warn("Warning: Trailing space in 'attributeByteCounts '."),e.attributeByteCounts=e["attributeByteCounts "]),"ObjectIds"===e.ordering[0]&&e.hasOwnProperty("objectIds")&&(a().warn("Warning: Case error in objectIds"),e.ordering[0]="objectIds");const u=function(e,t,n){const i=null!=t.header?c(e,t.header):{byteOffset:0,byteCount:0,fields:{count:n}},l={header:i,byteOffset:i.byteCount,byteCount:0,entries:Object.create(null)};let s=i.byteCount;for(let e=0;e<t.ordering.length;e++){const n=t.ordering[e],a=(0,o.o8)(t[n]);if(a.count=i.fields.count??0,"String"===a.valueType){if(a.byteOffset=s,a.byteCount=i.fields[n+"ByteCount"],"UTF-8"!==a.encoding)throw new r.A("unsupported-encoding","Unsupported String encoding.",{encoding:a.encoding});if(a.timeEncoding&&"ECMA_ISO8601"!==a.timeEncoding)throw new r.A("unsupported-time-encoding","Unsupported time encoding.",{timeEncoding:a.timeEncoding})}else{if(!M(a.valueType))throw new r.A("unsupported-value-type","Unsupported binary valueType",{valueType:a.valueType});{const e=v(a.valueType);s+=s%e!==0?e-s%e:0,a.byteOffset=s,a.byteCount=e*a.valuesPerElement*a.count}}s+=a.byteCount??0,l.entries[n]=a}return l.byteCount=s-l.byteOffset,l}(t,e,n);h(u.byteOffset+u.byteCount,t.byteLength,"attribute");const g=u.entries.attributeValues||u.entries.objectIds;if(g){if("String"===g.valueType){const e=u.entries.attributeByteCounts,n=d(t,e),r=function(e,t){return new Uint8Array(e,t.byteOffset,t.byteCount)}(t,g);return g.timeEncoding?function(e,t,n){return f(e,t,n).map(e=>{const t=e?Date.parse(e):null;return null==t||Number.isNaN(t)?null:t})}(e.count,n,r):f(e.count,n,r)}return i?d(t,g):function(e,t){const n=d(e,t);if(n.length>=l.y9)return n;const r=new Array;return n.forEach((e,t)=>r.push(p(n,t))),r}(t,g)}throw new r.A("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const m={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},w={Float32:(e,t)=>new DataView(e,0).getFloat32(t,!0),Float64:(e,t)=>new DataView(e,0).getFloat64(t,!0),UInt8:(e,t)=>new DataView(e,0).getUint8(t),Int8:(e,t)=>new DataView(e,0).getInt8(t),UInt16:(e,t)=>new DataView(e,0).getUint16(t,!0),Int16:(e,t)=>new DataView(e,0).getInt16(t,!0),UInt32:(e,t)=>new DataView(e,0).getUint32(t,!0),Int32:(e,t)=>new DataView(e,0).getInt32(t,!0)};function M(e){return m.hasOwnProperty(e)}function v(e){return M(e)?m[e].BYTES_PER_ELEMENT:0}},63531:(e,t,n)=>{n.d(t,{A:()=>b});var r,o=n(31635),i=n(4718),l=n(91429),s=n(51857),a=n(20061),u=n(68197),c=n(25482),f=n(56507);let d=r=class extends c.o{constructor(){super(...arguments),this.description=null,this.label=null,this.minValue=0,this.maxValue=0,this.color=null}clone(){return new r({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,color:(0,i.o8)(this.color)})}};(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],d.prototype,"label",void 0),(0,o.Cg)([(0,l.MZ)({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue",isRequired:!0}}})],d.prototype,"minValue",void 0),(0,o.Cg)([(0,l.MZ)({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue",isRequired:!0}}})],d.prototype,"maxValue",void 0),(0,o.Cg)([(0,l.MZ)({type:u.A,json:{type:[f.jz],write:{isRequired:!0}}})],d.prototype,"color",void 0),d=r=(0,o.Cg)([(0,l.$K)("esri.renderers.support.pointCloud.ColorClassBreakInfo")],d);const p=d;var h,g=n(19356),y=n(93223);let b=h=class extends s.A{constructor(e){super(e),this.type="point-cloud-class-breaks",this.field=null,this.legendOptions=null,this.fieldTransformType=null,this.colorClassBreakInfos=null}clone(){return new h({...this.cloneProperties(),field:this.field,fieldTransformType:this.fieldTransformType,colorClassBreakInfos:(0,i.o8)(this.colorClassBreakInfos),legendOptions:(0,i.o8)(this.legendOptions)})}};(0,o.Cg)([(0,y.e)({pointCloudClassBreaksRenderer:"point-cloud-class-breaks"})],b.prototype,"type",void 0),(0,o.Cg)([(0,l.MZ)({json:{write:{isRequired:!0}},type:String})],b.prototype,"field",void 0),(0,o.Cg)([(0,l.MZ)({type:a.A,json:{write:!0}})],b.prototype,"legendOptions",void 0),(0,o.Cg)([(0,l.MZ)({type:g.i.apiValues,json:{type:g.i.jsonValues,read:g.i.read,write:g.i.write}})],b.prototype,"fieldTransformType",void 0),(0,o.Cg)([(0,l.MZ)({type:[p],json:{write:{isRequired:!0}}})],b.prototype,"colorClassBreakInfos",void 0),b=h=(0,o.Cg)([(0,l.$K)("esri.renderers.PointCloudClassBreaksRenderer")],b)},68197:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(40876),o=n(34727),i=n(56507);function l(e){return(0,o.qE)((0,i.Vr)(e),0,255)}function s(e,t){const n=e.toString(16).padStart(2,"0");return t?n.slice(0,1):n}class a{static blendColors(e,t,n,r=new a){return r.r=Math.round(e.r+(t.r-e.r)*n),r.g=Math.round(e.g+(t.g-e.g)*n),r.b=Math.round(e.b+(t.b-e.b)*n),r.a=e.a+(t.a-e.a)*n,r._sanitize()}static fromRgb(e,t){const n=(0,r.lT)(e);return n?a.fromArray(n,t):null}static fromHex(e,t=new a){const n=(0,r.oW)(e);return n?a.fromArray(n,t):null}static fromArray(e,t=new a){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const n=(0,r.Eq)(e);return n?a.fromArray(n,t):null}static fromJSON(e){return null!=e?new a([e[0],e[1],e[2],(e[3]??255)/255]):void 0}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e,t){return null==e?null:(t??=[0,0,0,0],t[0]=e.r/255,t[1]=e.g/255,t[2]=e.b/255,t[3]=null!=e.a?e.a:1,t)}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){if("string"==typeof e)a.fromString(e,this);else if(Array.isArray(e))a.fromArray(e,this);else{const t=e;this._set(t.r??0,t.g??0,t.b??0,t.a??1),e instanceof a||this._sanitize()}return this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){const t=e?.capitalize??!1,n=e?.digits??6,r=3===n||4===n,o=4===n||8===n,i=`#${s(this.r,r)}${s(this.g,r)}${s(this.b,r)}${o?s(Math.round(255*this.a),r):""}`;return t?i.toUpperCase():i}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=0){const t=l(this.r),n=l(this.g),r=l(this.b);return 0===e||1!==this.a?[t,n,r,l(255*this.a)]:[t,n,r]}clone(){return new a(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=(0,r.c1)(this.r),this.g=(0,r.c1)(this.g),this.b=(0,r.c1)(this.b),this.a=(0,r.G1)(this.a),this}_set(e,t,n,r){this.r=e,this.g=t,this.b=n,this.a=r}}a.prototype.declaredClass="esri.Color"},69540:(e,t,n)=>{n.d(t,{OU:()=>c,Pw:()=>f});var r=n(31635),o=n(69622),i=(n(44208),n(4718)),l=(n(53966),n(97768)),s=n(88620),a=n(64108);const u=Symbol("ClonableMixin"),c=e=>{var t;const n=e;let o=class extends n{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,s.oY)(this);(0,l.Lw)(t,"unable to clone instance of non-accessor class");const n=t.metadata,r=t.store,o={},a=new Map;for(const t in n){const l=n[t],s=r?.originOf(t),u=l.clonable;if(l.readOnly||!1===u||7!==s&&0!==s&&5!==s&&4!==s)continue;const c=this[t];let f=null;if("function"==typeof u)f=u(c,e);else if("reference"===u)f=c;else if(f=(0,i.TU)(c,e),null!=c&&null==f)continue;0===s?a.set(t,f):o[t]=f}const u=new(0,Object.getPrototypeOf(this).constructor)(o);if(a.size){const e=(0,s.oY)(u)?.store;if(e)for(const[t,n]of a)e.set(t,n,0)}return u}};return o=(0,r.Cg)([(0,a.$)("esri.core.Clonable")],o),o},f=c(o.A)},69846:(e,t,n)=>{n.d(t,{A:()=>d});var r,o=n(31635),i=n(4718),l=n(91429),s=n(51857),a=n(20061),u=n(19356),c=n(72500),f=n(93223);let d=r=class extends s.A{constructor(e){super(e),this.type="point-cloud-stretch",this.field=null,this.legendOptions=null,this.fieldTransformType=null,this.stops=null}clone(){return new r({...this.cloneProperties(),field:(0,i.o8)(this.field),fieldTransformType:(0,i.o8)(this.fieldTransformType),stops:(0,i.o8)(this.stops),legendOptions:(0,i.o8)(this.legendOptions)})}};(0,o.Cg)([(0,f.e)({pointCloudStretchRenderer:"point-cloud-stretch"})],d.prototype,"type",void 0),(0,o.Cg)([(0,l.MZ)({json:{write:{isRequired:!0}},type:String})],d.prototype,"field",void 0),(0,o.Cg)([(0,l.MZ)({type:a.A,json:{write:!0}})],d.prototype,"legendOptions",void 0),(0,o.Cg)([(0,l.MZ)({type:u.i.apiValues,json:{type:u.i.jsonValues,read:u.i.read,write:u.i.write}})],d.prototype,"fieldTransformType",void 0),(0,o.Cg)([(0,l.MZ)({type:[c.A],json:{write:{isRequired:!0}}})],d.prototype,"stops",void 0),d=r=(0,o.Cg)([(0,l.$K)("esri.renderers.PointCloudStretchRenderer")],d)},72385:(e,t,n)=>{function r(){return new Float32Array(3)}function o(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function i(e,t,n){const r=new Float32Array(3);return r[0]=e,r[1]=t,r[2]=n,r}function l(){return r()}function s(){return i(1,1,1)}function a(){return i(1,0,0)}function u(){return i(0,1,0)}function c(){return i(0,0,1)}n.d(t,{fA:()=>i,o8:()=>o,vt:()=>r});const f=l(),d=s(),p=a(),h=u(),g=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:p,UNIT_Y:h,UNIT_Z:g,ZEROS:f,clone:o,create:r,fromValues:i,ones:s,unitX:a,unitY:u,unitZ:c,zeros:l},Symbol.toStringTag,{value:"Module"}))},72500:(e,t,n)=>{n.d(t,{A:()=>f});var r,o=n(31635),i=n(68197),l=n(25482),s=n(91429),a=n(56507),u=n(43937);let c=r=class extends l.o{constructor(e){super(e),this.color=null,this.label=null,this.value=null}writeValue(e,t,n){t[n]=e??0}clone(){return new r({color:this.color&&this.color.clone(),label:this.label,value:this.value})}};(0,o.Cg)([(0,s.MZ)({type:i.A,json:{type:[a.jz],write:{isRequired:!0}}})],c.prototype,"color",void 0),(0,o.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],c.prototype,"label",void 0),(0,o.Cg)([(0,s.MZ)({type:Number,json:{write:{writerEnsuresNonNull:!0}}})],c.prototype,"value",void 0),(0,o.Cg)([(0,u.K)("value")],c.prototype,"writeValue",null),c=r=(0,o.Cg)([(0,s.$K)("esri.renderers.visualVariables.support.ColorStop")],c);const f=c},77690:(e,t,n)=>{n.d(t,{B8:()=>s,Ge:()=>p,I0:()=>d,KC:()=>a,a4:()=>u,hZ:()=>i,hs:()=>f,lw:()=>c,mg:()=>l,z0:()=>o});var r=n(34304);function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function i(e,t,n,r,o,i,l,s,a,u){return e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=i,e[5]=l,e[6]=s,e[7]=a,e[8]=u,e}function l(e,t){if(e===t){const n=t[1],r=t[2],o=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=o}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function s(e,t){const n=t[0],r=t[1],o=t[2],i=t[3],l=t[4],s=t[5],a=t[6],u=t[7],c=t[8],f=c*l-s*u,d=-c*i+s*a,p=u*i-l*a;let h=n*f+r*d+o*p;return h?(h=1/h,e[0]=f*h,e[1]=(-c*r+o*u)*h,e[2]=(s*r-o*l)*h,e[3]=d*h,e[4]=(c*n-o*a)*h,e[5]=(-s*n+o*i)*h,e[6]=p*h,e[7]=(-u*n+r*a)*h,e[8]=(l*n-r*i)*h,e):null}function a(e,t){const n=t[0],r=t[1],o=t[2],i=t[3],l=t[4],s=t[5],a=t[6],u=t[7],c=t[8];return e[0]=l*c-s*u,e[1]=o*u-r*c,e[2]=r*s-o*l,e[3]=s*a-i*c,e[4]=n*c-o*a,e[5]=o*i-n*s,e[6]=i*u-l*a,e[7]=r*a-n*u,e[8]=n*l-r*i,e}function u(e){const t=e[0],n=e[1],r=e[2],o=e[3],i=e[4],l=e[5],s=e[6],a=e[7],u=e[8];return t*(u*i-l*a)+n*(-u*o+l*s)+r*(a*o-i*s)}function c(e,t,n){const r=t[0],o=t[1],i=t[2],l=t[3],s=t[4],a=t[5],u=t[6],c=t[7],f=t[8],d=n[0],p=n[1],h=n[2],g=n[3],y=n[4],b=n[5],m=n[6],w=n[7],M=n[8];return e[0]=d*r+p*l+h*u,e[1]=d*o+p*s+h*c,e[2]=d*i+p*a+h*f,e[3]=g*r+y*l+b*u,e[4]=g*o+y*s+b*c,e[5]=g*i+y*a+b*f,e[6]=m*r+w*l+M*u,e[7]=m*o+w*s+M*c,e[8]=m*i+w*a+M*f,e}function f(e,t,n){const r=n[0],o=n[1],i=n[2];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=o*t[3],e[4]=o*t[4],e[5]=o*t[5],e[6]=i*t[6],e[7]=i*t[7],e[8]=i*t[8],e}function d(e,t){const n=t[0],r=t[1],o=t[2],i=t[3],l=n+n,s=r+r,a=o+o,u=n*l,c=r*l,f=r*s,d=o*l,p=o*s,h=o*a,g=i*l,y=i*s,b=i*a;return e[0]=1-f-h,e[3]=c-b,e[6]=d+y,e[1]=c+b,e[4]=1-u-h,e[7]=p-g,e[2]=d-y,e[5]=p+g,e[8]=1-u-f,e}function p(e,t){const n=t[0],r=t[1],o=t[2],i=t[3],l=t[4],s=t[5],a=t[6],u=t[7],c=t[8],f=t[9],d=t[10],p=t[11],h=t[12],g=t[13],y=t[14],b=t[15],m=n*s-r*l,w=n*a-o*l,M=n*u-i*l,v=r*a-o*s,C=r*u-i*s,A=o*u-i*a,S=c*g-f*h,I=c*y-d*h,O=c*b-p*h,U=f*y-d*g,j=f*b-p*g,k=d*b-p*y;let R=m*k-w*j+M*U+v*O-C*I+A*S;return R?(R=1/R,e[0]=(s*k-a*j+u*U)*R,e[1]=(a*O-l*k-u*I)*R,e[2]=(l*j-s*O+u*S)*R,e[3]=(o*j-r*k-i*U)*R,e[4]=(n*k-o*O+i*I)*R,e[5]=(r*O-n*j-i*S)*R,e[6]=(g*A-y*C+b*v)*R,e[7]=(y*M-h*A-b*w)*R,e[8]=(h*C-g*M+b*m)*R,e):null}function h(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e}const g=c,y=h;Object.freeze(Object.defineProperty({__proto__:null,add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e},adjoint:a,copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},determinant:u,equals:function(e,t){const n=e[0],o=e[1],i=e[2],l=e[3],s=e[4],a=e[5],u=e[6],c=e[7],f=e[8],d=t[0],p=t[1],h=t[2],g=t[3],y=t[4],b=t[5],m=t[6],w=t[7],M=t[8],v=(0,r.FD)();return Math.abs(n-d)<=v*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(o-p)<=v*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(i-h)<=v*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(l-g)<=v*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(s-y)<=v*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(a-b)<=v*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(u-m)<=v*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(c-w)<=v*Math.max(1,Math.abs(c),Math.abs(w))&&Math.abs(f-M)<=v*Math.max(1,Math.abs(f),Math.abs(M))},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},frob:function(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2)},fromMat2d:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e},fromMat4:o,fromQuat:d,fromRotation:function(e,t){const n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},fromScaling:function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},fromTranslation:function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e},identity:function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},invert:s,isOrthoNormal:function(e){const t=(0,r.FD)(),n=e[0],o=e[1],i=e[2],l=e[3],s=e[4],a=e[5],u=e[6],c=e[7],f=e[8];return Math.abs(1-(n*n+l*l+u*u))<=t&&Math.abs(1-(o*o+s*s+c*c))<=t&&Math.abs(1-(i*i+a*a+f*f))<=t},mul:g,multiply:c,multiplyScalar:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e},multiplyScalarAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e},normalFromMat4:p,normalFromMat4Legacy:function(e,t){const n=t[0],r=t[1],o=t[2],i=t[4],l=t[5],s=t[6],a=t[8],u=t[9],c=t[10],f=c*l-s*u,d=-c*i+s*a,p=u*i-l*a,h=n*f+r*d+o*p;if(!h)return null;const g=1/h;return e[0]=f*g,e[1]=(-c*r+o*u)*g,e[2]=(s*r-o*l)*g,e[3]=d*g,e[4]=(c*n-o*a)*g,e[5]=(-s*n+o*i)*g,e[6]=p*g,e[7]=(-u*n+r*a)*g,e[8]=(l*n-r*i)*g,e},projection:function(e,t,n){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e},rotate:function(e,t,n){const r=t[0],o=t[1],i=t[2],l=t[3],s=t[4],a=t[5],u=t[6],c=t[7],f=t[8],d=Math.sin(n),p=Math.cos(n);return e[0]=p*r+d*l,e[1]=p*o+d*s,e[2]=p*i+d*a,e[3]=p*l-d*r,e[4]=p*s-d*o,e[5]=p*a-d*i,e[6]=u,e[7]=c,e[8]=f,e},scale:f,scaleByVec2:function(e,t,n){const r=n[0],o=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=o*t[3],e[4]=o*t[4],e[5]=o*t[5],e},set:i,str:function(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"},sub:y,subtract:h,translate:function(e,t,n){const r=t[0],o=t[1],i=t[2],l=t[3],s=t[4],a=t[5],u=t[6],c=t[7],f=t[8],d=n[0],p=n[1];return e[0]=r,e[1]=o,e[2]=i,e[3]=l,e[4]=s,e[5]=a,e[6]=d*r+p*l+u,e[7]=d*o+p*s+c,e[8]=d*i+p*a+f,e},transpose:l},Symbol.toStringTag,{value:"Module"}))}}]);
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
-
*/
|
|
5
|
-
import{PiUtils as a}from"../shading/PiUtils.glsl.js";import{glsl as t}from"../../shaderModules/glsl.js";function l(l){l.include(a),l.code.add(t`float fastSin(float x) {
|
|
6
|
-
const float B = 4.0 / PI;
|
|
7
|
-
const float C = -4.0 / (PI_SQUARED);
|
|
8
|
-
const float P = 0.225;
|
|
9
|
-
float y = B * x + C * x * abs(x);
|
|
10
|
-
return P * (y * abs(y) - y) + y;
|
|
11
|
-
}
|
|
12
|
-
float fastCos(float x) {
|
|
13
|
-
return fastSin(x + HALF_PI);
|
|
14
|
-
}
|
|
15
|
-
float fastAtan2(float y, float x) {
|
|
16
|
-
float r, angle;
|
|
17
|
-
float abs_y = abs(y) + 1e-10;
|
|
18
|
-
if (x < 0.0) {
|
|
19
|
-
r = (x + abs_y) / (abs_y - x);
|
|
20
|
-
angle = THREE_QUATER_PI - ONE_QUATER_PI * r;
|
|
21
|
-
} else {
|
|
22
|
-
r = (x - abs_y) / (x + abs_y);
|
|
23
|
-
angle = ONE_QUATER_PI - ONE_QUATER_PI * r;
|
|
24
|
-
}
|
|
25
|
-
return (y < 0.0) ? -angle : angle;
|
|
26
|
-
}`)}export{l as FastApproximateTrigonometry};
|