import{version as kernelVersion}from"@arcgis/core/kernel";var ArcGisApiVersion;!function(i){i[i.Unknown=0]="Unknown",i[i.v3=1]="v3",i[i.v4=2]="v4"}(ArcGisApiVersion=ArcGisApiVersion||{});let arcGisApiVersionComponents;function getArcGisApiVersion(){var i=kernelVersion.substr(0,2);return"4."===i?ArcGisApiVersion.v4:"3."===i?ArcGisApiVersion.v3:ArcGisApiVersion.Unknown}function getVersionComponents(i=kernelVersion){let r=null;i=(i="string"==typeof i?i:String(i)).match(/^\s*(\d+)\.(\d+)/);return i&&(r={majorVersion:parseInt(i[1],10),minorVersion:parseInt(i[2],10)}),r}function compareArcGisApiVersion(i){let r=null;var n=arcGisApiVersionComponents=arcGisApiVersionComponents||getVersionComponents(),i=getVersionComponents(i);return n&&i&&(i.majorVersion!==n.majorVersion?r=n.majorVersion<i.majorVersion?-1:1:i.minorVersion!==n.minorVersion&&(r=n.minorVersion<i.minorVersion?-1:1),r=r||0),r}function isArcGisApiVersionAtLeast(i){i=compareArcGisApiVersion(i);return null!==i&&-1<i}const arcGisApiVersion=getArcGisApiVersion(),isArcGisApiVersion3x=arcGisApiVersion===ArcGisApiVersion.v3,isArcGisApiVersion4x=arcGisApiVersion===ArcGisApiVersion.v4,isUnknownArcGisApiVersion=arcGisApiVersion===ArcGisApiVersion.Unknown;export{ArcGisApiVersion,isArcGisApiVersionAtLeast,arcGisApiVersion,isArcGisApiVersion3x,isArcGisApiVersion4x,isUnknownArcGisApiVersion};