/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../../Color"],(function(n,e){"use strict";const r={kind:"null"},t={kind:"number"},i={kind:"string"},o={kind:"boolean"},u={kind:"color"},y={kind:"object"},a={kind:"value"};function f(n,e){return{kind:"array",itemType:n,n:e}}const l=[r,t,i,o,u,y,f(a)];function p(n){if("array"===n.kind){const e=p(n.itemType);return"number"==typeof n.n?`array<${e}, ${n.n}>`:"value"===n.itemType.kind?"array":`array<${e}>`}return n.kind}function c(n){if(null===n)return r;if("string"==typeof n)return i;if("boolean"==typeof n)return o;if("number"==typeof n)return t;if(n instanceof e)return u;if(Array.isArray(n)){let e;for(const r of n){const n=c(r);if(e){if(e!==n){e=a;break}}else e=n}return f(e||a,n.length)}return"object"==typeof n?y:a}function d(n,e){if("array"===e.kind)return"array"===n.kind&&(0===n.n&&"value"===n.itemType.kind||d(n.itemType,e.itemType))&&("number"!=typeof e.n||e.n===n.n);if("value"===e.kind)for(const r of l)if(d(n,r))return!0;return e.kind===n.kind}function s(n){if(null===n)return"";const r=typeof n;return"string"===r?n:"number"===r||"boolean"===r?String(n):n instanceof e?n.toString():JSON.stringify(n)}n.BooleanType=o,n.ColorType=u,n.NullType=r,n.NumberType=t,n.ObjectType=y,n.StringType=i,n.ValueType=a,n.arrayType=f,n.getType=c,n.matchType=d,n.typeToString=p,n.valueToString=s,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
