/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../core/handleUtils","../../../core/nextTick","./SceneSnappingEngine","./SnappingManager"],(function(e,n,a,r,t){"use strict";const i=new Map;function o(e){i.has(e)||i.set(e,{referenceCount:0,snappingManager:p(e)});const a=i.get(e);a.referenceCount++;const r=n.makeHandle((()=>c(e,a)));return{snappingManager:a.snappingManager,...r}}function c(e,n){n.referenceCount--,n.referenceCount>0||a.nextTick((()=>{0===n.referenceCount&&(n.snappingManager.destroy(),i.delete(e))}))}function p(e){return new t.SnappingManager({view:e,snappingEnginesFactory:(n,a)=>[new r.SceneSnappingEngine({view:e,options:a})]})}e.acquire=o,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
