/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{cDegTo256 as t}from"../../../../vectorTiles/GeometryUtils.js";import{minMaxZoomPrecisionFactor as e,spritePadding as o}from"../../../definitions.js";import{assert as i}from"../../../animations/utils.js";import{packAnimatedBitset as c}from"./AnimatedMeshWriter.js";import{getMinMaxZoom as n}from"../fill/meshWriterUtils.js";import{DataType as a}from"../../../../../../webgl/enums.js";const s={type:a.SHORT,count:2,packPrecisionFactor:e,pack:({scaleInfo:t},{tileInfo:e})=>n(t,e)},p={type:a.FLOAT,count:4,packPrecisionFactor:1,packTessellation:({value1Position2Value2:t})=>(i(t),t)},r={type:a.FLOAT,count:4,packPrecisionFactor:1,packTessellation:()=>[0,0,0,1]},l={type:a.FLOAT,count:1,packPrecisionFactor:1,pack:()=>0},k={type:a.FLOAT,count:1,packPrecisionFactor:1,packTessellation:({lineLength:t})=>t},u={type:a.UNSIGNED_SHORT,count:1,packTessellation:({distance:t})=>t},T={type:a.BYTE,count:2,packPrecisionFactor:16,packTessellation:({directionX:t,directionY:e})=>[t,e]},m={type:a.FLOAT,count:2,packPrecisionFactor:16,packTessellation:({normalX:t,normalY:e})=>[t,e]},y={type:a.UNSIGNED_BYTE,count:3,pack:"id"},f={type:a.UNSIGNED_BYTE,count:1,pack:c},F={type:a.SHORT,count:2,pack:"position",packPrecisionFactor:1},O={marker:{type:a.FLOAT,count:2,packAlternating:{count:4,pack:({texelDimensions:t})=>[[-.5*t[0],-.5*t[1]],[.5*t[0],-.5*t[1]],[-.5*t[0],.5*t[1]],[.5*t[0],.5*t[1]]]}},line:{type:a.FLOAT,count:2,packTessellation:({extrusionOffsetX:t,extrusionOffsetY:e},{baseSize:o})=>[t*o/2,e*o/2]},fill:{type:a.FLOAT,count:2,packTessellation:()=>[0,0]}},S={marker:{type:a.SHORT,count:2,packPrecisionFactor:1,packAlternating:{count:4,packTessellation:({texXmax:t,texXmin:e,texYmax:o,texYmin:i})=>[[e,i],[t,i],[e,o],[t,o]]}}},d={type:a.UNSIGNED_SHORT,count:4,pack:({sprite:t})=>{const{rect:e,width:i,height:c}=t,n=e.x+o,a=e.y+o;return[n+1,a+1,n+i-1,a+c-1]}},x={type:a.UNSIGNED_SHORT,count:4,packPrecisionFactor:4,pack:({animations:t,baseSize:e,referenceSize:o})=>[t.dataColumn,t.dataRow,e,o]},E={type:a.UNSIGNED_SHORT,count:4,packPrecisionFactor:8,pack:({strokeWidth:t,pixelDimensions:e,baseSize:o,sprite:i,sizeRatio:c})=>{const n=Math.max(o*i.width/i.height,o),a=i.sdfDecodeCoeff*n*c;return[e[0],e[1],t,a]}},N={type:a.BYTE,count:1,packTessellation:({angle:e})=>e*t},P={type:a.BYTE,count:1,pack:({angle:e})=>e?e*t:0},h={type:a.BYTE,count:1,pack:()=>0};export{u as accumulatedDistance,N as angle,x as animationPointerAndBaseSizeAndReferenceSize,f as bitset,y as id,k as lineLength,l as noLineLength,h as noPatternAngle,r as noTiming,m as normal,O as offset,P as patternAngle,F as pos,T as segmentDirection,E as sizing,d as tlbr,S as uv,p as value1Position2Value2,s as zoomRange};
