/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../chunks/_rollupPluginBabelHelpers","../../../../chunks/vec2"],(function(t,e,r){"use strict";let f=function(){function t(t,e,r=0,f,i){this.TypedArrayConstructor=t,this.elementCount=2;const u=this.TypedArrayConstructor;void 0===f&&(f=2*u.BYTES_PER_ELEMENT);const s=0===e.byteLength?0:r;this.typedBuffer=null==i?new u(e,s):new u(e,s,(i-r)/u.BYTES_PER_ELEMENT),this.typedBufferStride=f/u.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}var f=t.prototype;return f.sliceBuffer=function(t,e,r=this.count-e){const f=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,f,this.stride,f+r*this.stride)},f.getVec=function(t,e){return t*=this.typedBufferStride,r.set(e,this.typedBuffer[t],this.typedBuffer[t+1])},f.setVec=function(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t]=e[1]},f.get=function(t,e){return this.typedBuffer[t*this.typedBufferStride+e]},f.set=function(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r},f.setValues=function(t,e,r){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t]=r},f.copyFrom=function(t,e,r){const f=this.typedBuffer,i=e.typedBuffer;let u=t*this.typedBufferStride,s=r*e.typedBufferStride;f[u++]=i[s++],f[u]=i[s]},e._createClass(t,[{key:"buffer",get:function(){return this.typedBuffer.buffer}}]),t}();f.ElementCount=2,t.BufferViewVec2Impl=f,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
