/*
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/mat2d","../../../../chunks/mat3","../../../../chunks/mat3f32","../../../../chunks/vec2","../../../../chunks/vec2f32","./definitions","./TiledDisplayObject"],(function(t,e,s,r,n,i,a,o,c){"use strict";let l=function(){function t(){}var e=t.prototype;return e.acquire=function(t){return{refCount:1,version:-1,labelMat2d:n.create(),tileMat3:n.create(),dvs:n.create()}},e.release=function(t){},t}(),h=function(t){function n(e,s,r){return t.call(this,e,s,r,o.TILE_SIZE,o.TILE_SIZE)||this}e._inheritsLoose(n,t);var c=n.prototype;return c.destroy=function(){t.prototype.destroy.call(this),this._transforms&&n.TransformCache.release(this.key.hash)},c.setTransform=function(t,e){const n=e/(t.resolution*t.pixelRatio),o=this.transforms.tileMat3,[c,l]=t.toScreenNoRotation([0,0],[this.x,this.y]),h=this.width/this.rangeX*n,u=this.height/this.rangeY*n;r.set(o,h,0,0,0,u,0,c,l,1),r.multiply(this.transforms.dvs,t.displayViewMat3,o);const f=this.transforms.labelMat2d,d=t.getScreenTransform(f,e),m=a.create();i.transformMat2d(m,[this.x,this.y],d),s.fromTranslation(f,m),s.multiply(f,t.viewMat2d,f)},c._createTransforms=function(){return n.TransformCache.acquire(this.key.hash)},n}(c.TiledDisplayObject);h.TransformCache=new l,t.WGLTile=h,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
