/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{convertUnit as n,unitType as u,adaptiveLengthUnit as t,adaptiveAreaUnit as e,deriveLengthUnitFromAreaUnit as r,adaptiveVolumeUnit as i,isBaseUnit as a,baseUnitForUnit as o}from"./units.js";function l(n,t){return{type:u(t),value:n,unit:t}}function c(n){return{value:n}}function f(n,t){return{type:u(t),value:n,unit:t}}function s(n,t){return{type:u(t),value:n,unit:t}}function v(n,t){return{type:u(t),value:n,unit:t}}function p(n,t,e="arithmetic"){return{type:u(t),value:n,unit:t,rotationType:e}}function y(n){return a(n.unit)}function g(n,u){const t=m(n,u);return"angle"===n.type?p(t,u,n.rotationType):l(t,u)}function m(u,t){return n(u.value,u.unit,t)}function h(n){return g(n,o(n.unit))}function d(u,t){return null==u?t:null==t||u.value>n(t.value,t.unit,u.unit)?u:t}function T(u,t){return null==u?t:null==t||u.value<n(t.value,t.unit,u.unit)?u:t}function j(n,u){return null==n?null:{...n,value:n.value*u}}function q(n,u,t){if(u===t)return n;switch(t){case"arithmetic":case"geographic":return 90-n}}function w(n,u){return g(n,e(n.value,n.unit,u))}function x(n,u){return g(n,B(n,u))}function B(n,u){const e=r(u);return t(n.value,n.unit,e)}function U(n,u){return g(n,t(n.value,n.unit,u))}function b(n,u){return g(n,i(n.value,n.unit,u))}const k=f(0,"meters"),z=s(0,"square-meters"),A=p(0,"radians"),C=p(0,"degrees"),D=p(0,"degrees","geographic");export{B as adaptiveLengthUnitForArea,q as convertRotationType,p as createAngle,s as createArea,f as createLength,l as createQuantity,c as createScalar,v as createVolume,y as isBaseUnit,d as max,T as min,j as scale,w as toAdaptiveAreaUnit,U as toAdaptiveLengthUnit,x as toAdaptiveLengthUnitForArea,b as toAdaptiveVolumeUnit,h as toBaseUnit,g as toUnit,m as valueInUnit,C as zeroDegrees,D as zeroDegreesGeographic,k as zeroMeters,A as zeroRadians,z as zeroSquareMeters};
