/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{unitType as n,convertUnit as u,adaptiveAreaUnit as t,deriveLengthUnitFromAreaUnit as e,adaptiveLengthUnit as r,adaptiveVolumeUnit as i,isBaseUnit as a,baseUnitForUnit as o}from"./units.js";function l(u,t){return{type:n(t),value:u,unit:t}}function c(n){return{value:n}}function f(u,t){return{type:n(t),value:u,unit:t}}function s(u,t){return{type:n(t),value:u,unit:t}}function v(u,t){return{type:n(t),value:u,unit:t}}function p(u,t,e="arithmetic"){return{type:n(t),value:u,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(n,t){return u(n.value,n.unit,t)}function h(n){return g(n,o(n.unit))}function d(n,t){return null==n?t:null==t||n.value>u(t.value,t.unit,n.unit)?n:t}function T(n,t){return null==n?t:null==t||n.value<u(t.value,t.unit,n.unit)?n: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,t(n.value,n.unit,u))}function x(n,u){return g(n,B(n,u))}function B(n,u){const t=e(u);return r(n.value,n.unit,t)}function U(n,u){return g(n,r(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};
