"use strict";module.exports={isLegacyStruct,isLegacyValue,isLegacyValueObject};let valueKeysSet=new Set(["string_value","number_value","bool_value","struct_value","list_value","null_value"]);function isLegacyValue(e){return e&&"object"==typeof e&&1===Object.keys(e).length&&valueKeysSet.has(Object.keys(e)[0])}function isLegacyStruct(e){if(e&&1===Object.keys(e).length&&e.fields&&"object"==typeof e.fields){if(Array.isArray(e.fields))return e.fields.every(e=>2===Object.keys(e).length&&e.key&&isLegacyValue(e.value));if(Object.values(e.fields).every(e=>isLegacyValue(e)))return!0}return!1}function isLegacyValueObject(e){return e&&"object"==typeof e&&1===Object.keys(e).length&&"value"===Object.keys(e)[0]}