ord-schema-protobufjs 0.6.7 → 0.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/main.js +1 -1
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see main.js.LICENSE.txt */
2
- (()=>{var e={45(e){"use strict";e.exports=function(e,t){for(var n=new Array(arguments.length-1),r=0,o=2,i=!0;o<arguments.length;)n[r++]=arguments[o++];return new Promise(function(o,s){n[r]=function(e){if(i)if(i=!1,e)s(e);else{for(var t=new Array(arguments.length-1),n=0;n<t.length;)t[n++]=arguments[n];o.apply(null,t)}};try{e.apply(t||null,n)}catch(e){i&&(i=!1,s(e))}})}},839(e,t){"use strict";var n=t;n.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&"="===e.charAt(t);)++n;return Math.ceil(3*e.length)/4-n};for(var r=new Array(64),o=new Array(123),i=0;i<64;)o[r[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;n.encode=function(e,t,n){for(var o,i=null,s=[],a=0,l=0;t<n;){var u=e[t++];switch(l){case 0:s[a++]=r[u>>2],o=(3&u)<<4,l=1;break;case 1:s[a++]=r[o|u>>4],o=(15&u)<<2,l=2;break;case 2:s[a++]=r[o|u>>6],s[a++]=r[63&u],l=0}a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),a=0)}return l&&(s[a++]=r[o],s[a++]=61,1===l&&(s[a++]=61)),i?(a&&i.push(String.fromCharCode.apply(String,s.slice(0,a))),i.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var s="invalid encoding";n.decode=function(e,t,n){for(var r,i=n,a=0,l=0;l<e.length;){var u=e.charCodeAt(l++);if(61===u&&a>1)break;if(void 0===(u=o[u]))throw Error(s);switch(a){case 0:r=u,a=1;break;case 1:t[n++]=r<<2|(48&u)>>4,r=u,a=2;break;case 2:t[n++]=(15&r)<<4|(60&u)>>2,r=u,a=3;break;case 3:t[n++]=(3&r)<<6|u,a=0}}if(1===a)throw Error(s);return n-i},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},358(e){"use strict";function t(){this._listeners=Object.create(null)}e.exports=t,t.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners=Object.create(null);else if(void 0===t)this._listeners[e]=[];else{var n=this._listeners[e];if(!n)return this;for(var r=0;r<n.length;)n[r].fn===t?n.splice(r,1):++r}return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,n)}return this}},410(e){"use strict";function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),r=128===n[3];function o(e,r,o){t[0]=e,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3]}function i(e,r,o){t[0]=e,r[o]=n[3],r[o+1]=n[2],r[o+2]=n[1],r[o+3]=n[0]}function s(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],t[0]}function a(e,r){return n[3]=e[r],n[2]=e[r+1],n[1]=e[r+2],n[0]=e[r+3],t[0]}e.writeFloatLE=r?o:i,e.writeFloatBE=r?i:o,e.readFloatLE=r?s:a,e.readFloatBE=r?a:s}():function(){function t(e,t,n,r){var o=t<0?1:0;if(o&&(t=-t),0===t)e(1/t>0?0:2147483648,n,r);else if(isNaN(t))e(2143289344,n,r);else if(t>34028234663852886e22)e((o<<31|2139095040)>>>0,n,r);else if(t<11754943508222875e-54)e((o<<31|Math.round(t/1401298464324817e-60))>>>0,n,r);else{var i=Math.floor(Math.log(t)/Math.LN2);e((o<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,n,r)}}function s(e,t,n){var r=e(t,n),o=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:o*(1/0):0===i?1401298464324817e-60*o*s:o*Math.pow(2,i-150)*(s+8388608)}e.writeFloatLE=t.bind(null,n),e.writeFloatBE=t.bind(null,r),e.readFloatLE=s.bind(null,o),e.readFloatBE=s.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),r=128===n[7];function o(e,r,o){t[0]=e,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3],r[o+4]=n[4],r[o+5]=n[5],r[o+6]=n[6],r[o+7]=n[7]}function i(e,r,o){t[0]=e,r[o]=n[7],r[o+1]=n[6],r[o+2]=n[5],r[o+3]=n[4],r[o+4]=n[3],r[o+5]=n[2],r[o+6]=n[1],r[o+7]=n[0]}function s(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],n[4]=e[r+4],n[5]=e[r+5],n[6]=e[r+6],n[7]=e[r+7],t[0]}function a(e,r){return n[7]=e[r],n[6]=e[r+1],n[5]=e[r+2],n[4]=e[r+3],n[3]=e[r+4],n[2]=e[r+5],n[1]=e[r+6],n[0]=e[r+7],t[0]}e.writeDoubleLE=r?o:i,e.writeDoubleBE=r?i:o,e.readDoubleLE=r?s:a,e.readDoubleBE=r?a:s}():function(){function t(e,t,n,r,o,i){var s=r<0?1:0;if(s&&(r=-r),0===r)e(0,o,i+t),e(1/r>0?0:2147483648,o,i+n);else if(isNaN(r))e(0,o,i+t),e(2146959360,o,i+n);else if(r>17976931348623157e292)e(0,o,i+t),e((s<<31|2146435072)>>>0,o,i+n);else{var a;if(r<22250738585072014e-324)e((a=r/5e-324)>>>0,o,i+t),e((s<<31|a/4294967296)>>>0,o,i+n);else{var l=Math.floor(Math.log(r)/Math.LN2);1024===l&&(l=1023),e(4503599627370496*(a=r*Math.pow(2,-l))>>>0,o,i+t),e((s<<31|l+1023<<20|1048576*a&1048575)>>>0,o,i+n)}}}function s(e,t,n,r,o){var i=e(r,o+t),s=e(r,o+n),a=2*(s>>31)+1,l=s>>>20&2047,u=4294967296*(1048575&s)+i;return 2047===l?u?NaN:a*(1/0):0===l?5e-324*a*u:a*Math.pow(2,l-1075)*(u+4503599627370496)}e.writeDoubleLE=t.bind(null,n,0,4),e.writeDoubleBE=t.bind(null,r,4,0),e.readDoubleLE=s.bind(null,o,0,4),e.readDoubleBE=s.bind(null,i,4,0)}(),e}function n(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function r(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function i(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},153(e,t,n){"use strict";e.exports=function(e){try{var t=n(876)(e);return t&&(t.length||Object.keys(t).length)?t:null}catch(e){return null}}},876(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=876,e.exports=t},390(e){"use strict";e.exports=function(e,t,n){var r=n||8192,o=r>>>1,i=null,s=r;return function(n){if(n<1||n>o)return e(n);s+n>r&&(i=e(r),s=0);var a=t.call(i,s,s+=n);return 7&s&&(s=1+(7|s)),a}}},447(e,t){"use strict";var n=t;n.length=function(e){for(var t=0,n=0,r=0;r<e.length;++r)(n=e.charCodeAt(r))<128?t+=1:n<2048?t+=2:55296==(64512&n)&&56320==(64512&e.charCodeAt(r+1))?(++r,t+=4):t+=3;return t},n.read=function(e,t,n){if(n-t<1)return"";for(var r="",o=t;o<n;){var i=e[o++];if(i<=127)r+=String.fromCharCode(i);else if(i>=192&&i<224){var s=(31&i)<<6|63&e[o++];r+=s>=128?String.fromCharCode(s):"�"}else if(i>=224&&i<240){var a=(15&i)<<12|(63&e[o++])<<6|63&e[o++];r+=a>=2048?String.fromCharCode(a):"�"}else if(i>=240){var l=(7&i)<<18|(63&e[o++])<<12|(63&e[o++])<<6|63&e[o++];l<65536||l>1114111?r+="�":(l-=65536,r+=String.fromCharCode(55296+(l>>10)),r+=String.fromCharCode(56320+(1023&l)))}}return r},n.write=function(e,t,n){for(var r,o,i=n,s=0;s<e.length;++s)(r=e.charCodeAt(s))<128?t[n++]=r:r<2048?(t[n++]=r>>6|192,t[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(o=e.charCodeAt(s+1)))?(r=65536+((1023&r)<<10)+(1023&o),++s,t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=63&r|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=63&r|128);return n-i}},946(e,t,n){"use strict";e.exports=n(394)},394(e,t,n){"use strict";var r=t;function o(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(449),r.BufferWriter=n(818),r.Reader=n(618),r.BufferReader=n(158),r.util=n(610),r.rpc=n(47),r.roots=n(529),r.configure=o,o()},618(e,t,n){"use strict";e.exports=l;var r,o=n(610),i=o.LongBits,s=o.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var u,c="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")},p=function(){return o.Buffer?function(e){return(l.create=function(e){return o.Buffer.isBuffer(e)?new r(e):c(e)})(e)}:c};function d(){var e=new i(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function y(){if(this.pos+8>this.len)throw a(this,8);return new i(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}l.create=p(),l.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,l.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return u}),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return f(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|f(this.buf,this.pos+=4)},l.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},l.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw a(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,n);if(t===n){var r=o.Buffer;return r?r.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,n)},l.prototype.string=function(){var e=this.bytes();return s.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},l.recursionLimit=o.recursionLimit,l.prototype.skipType=function(e,t){if(void 0===t&&(t=0),t>l.recursionLimit)throw Error("maximum nesting depth exceeded");switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e,t+1);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){r=e,l.create=p(),r._configure();var t=o.Long?"toLong":"toNumber";o.merge(l.prototype,{int64:function(){return d.call(this)[t](!1)},uint64:function(){return d.call(this)[t](!0)},sint64:function(){return d.call(this).zzDecode()[t](!1)},fixed64:function(){return y.call(this)[t](!0)},sfixed64:function(){return y.call(this)[t](!1)}})}},158(e,t,n){"use strict";e.exports=i;var r=n(618);(i.prototype=Object.create(r.prototype)).constructor=i;var o=n(610);function i(e){r.call(this,e)}i._configure=function(){o.Buffer&&(i.prototype._slice=o.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},529(e){"use strict";e.exports=Object.create(null)},47(e,t,n){"use strict";t.Service=n(595)},595(e,t,n){"use strict";e.exports=o;var r=n(610);function o(e,t,n){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(o.prototype=Object.create(r.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,n,o,i,s){if(!i)throw TypeError("request must be specified");var a=this;if(!s)return r.asPromise(e,a,t,n,o,i);if(a.rpcImpl)try{return a.rpcImpl(t,n[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),function(e,n){if(e)return a.emit("error",e,t),s(e);if(null!==n){if(!(n instanceof o))try{n=o[a.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return a.emit("error",e,t),s(e)}return a.emit("data",n,t),s(null,n)}a.end(!0)})}catch(e){return a.emit("error",e,t),void setTimeout(function(){s(e)},0)}else setTimeout(function(){s(Error("already ended"))},0)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},239(e,t,n){"use strict";e.exports=o;var r=n(610);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=o.zero=new o(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var s=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var n=e>>>0,r=(e-n)/4294967296>>>0;return t&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new o(n,r)},o.from=function(e){if("number"==typeof e)return o.fromNumber(e);if(r.isString(e)){if(!r.Long)return o.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):i},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;o.fromHash=function(e){return e===s?i:new o((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},610(e,t,n){"use strict";var r=t;function o(e){return"__proto__"===e||"prototype"===e||"constructor"===e}function i(e){var t="boolean"==typeof arguments[arguments.length-1],n=t?arguments.length-1:arguments.length;t=t&&arguments[arguments.length-1];for(var r=1;r<n;++r){var i=arguments[r];if(i)for(var s=Object.keys(i),a=0;a<s.length;++a)o(s[a])||void 0!==e[s[a]]&&t||(e[s[a]]=i[s[a]])}return e}function s(e){function t(e,n){if(!(this instanceof t))return new t(e,n);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&i(this,n)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}r.asPromise=n(45),r.base64=n(839),r.EventEmitter=n(358),r.float=n(410),r.inquire=n(153),r.utf8=n(447),r.pool=n(390),r.LongBits=n(239),r.isUnsafeProperty=o,r.isNode=Boolean(void 0!==n.g&&n.g&&n.g.process&&n.g.process.versions&&n.g.process.versions.node),r.global=r.isNode&&n.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},r.isString=function(e){return"string"==typeof e||e instanceof String},r.isObject=function(e){return e&&"object"==typeof e},r.isset=r.isSet=function(e,t){var n=e[t];return!(null==n||!Object.hasOwnProperty.call(e,t))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},r.Buffer=function(){try{var e=r.global.Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"==typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||function(){try{var e=n(17);return e&&e.isLong?e:null}catch(e){return null}}(),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){var n=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},r.merge=i,r.nestingLimit=32,r.recursionLimit=100,r.makeProp=function(e,t){Object.defineProperty(e,t,{enumerable:!0,configurable:!0,writable:!0})},r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=s,r.ProtocolError=s("ProtocolError"),r.oneOfGetter=function(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=1;return function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},r.oneOfSetter=function(e){return function(t){for(var n=0;n<e.length;++n)e[n]!==t&&delete this[e[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var e=r.Buffer;e?(r._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,n){return new e(t,n)},r._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},449(e,t,n){"use strict";e.exports=p;var r,o=n(610),i=o.LongBits,s=o.base64,a=o.utf8;function l(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function u(){}function c(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function p(){this.len=0,this.head=new l(u,0,0),this.tail=this.head,this.states=null}var d=function(){return o.Buffer?function(){return(p.create=function(){return new r})()}:function(){return new p}};function f(e,t,n){t[n]=255&e}function y(e,t){this.len=e,this.next=void 0,this.val=t}function h(e,t,n){for(var r=e.lo,o=e.hi;o;)t[n++]=127&r|128,r=(r>>>7|o<<25)>>>0,o>>>=7;for(;r>127;)t[n++]=127&r|128,r>>>=7;t[n++]=r}function m(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}p.create=d(),p.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(p.alloc=o.pool(p.alloc,o.Array.prototype.subarray)),p.prototype._push=function(e,t,n){return this.tail=this.tail.next=new l(e,t,n),this.len+=t,this},y.prototype=Object.create(l.prototype),y.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},p.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new y((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},p.prototype.int32=function(e){return(e|=0)<0?this._push(h,10,i.fromNumber(e)):this.uint32(e)},p.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},p.prototype.uint64=function(e){var t=i.from(e);return this._push(h,t.length(),t)},p.prototype.int64=p.prototype.uint64,p.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(h,t.length(),t)},p.prototype.bool=function(e){return this._push(f,1,e?1:0)},p.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},p.prototype.sfixed32=p.prototype.fixed32,p.prototype.fixed64=function(e){var t=i.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},p.prototype.sfixed64=p.prototype.fixed64,p.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},p.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var b=o.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r<e.length;++r)t[n+r]=e[r]};p.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(f,1,0);if(o.isString(e)){var n=p.alloc(t=s.length(e));s.decode(e,n,0),e=n}return this.uint32(t)._push(b,t,e)},p.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(f,1,0)},p.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new l(u,0,0),this.len=0,this},p.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(u,0,0),this.len=0),this},p.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},p.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},p._configure=function(e){r=e,p.create=d(),r._configure()}},818(e,t,n){"use strict";e.exports=i;var r=n(449);(i.prototype=Object.create(r.prototype)).constructor=i;var o=n(610);function i(){r.call(this)}function s(e,t,n){e.length<40?o.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}i._configure=function(){i.alloc=o._Buffer_allocUnsafe,i.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r<e.length;)t[n++]=e[r++]}},i.prototype.bytes=function(e){o.isString(e)&&(e=o._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(s,t,e),this},i._configure()},17(e,t){var n;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,n=function(){var e={};return function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function n(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function r(e){return!0===(e&&e.__isLong__)}function o(e){var t=Math.clz32(e&-e);return e?31-t:t}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0}),n.isLong=r;var i={},s={};function a(e,t){var n,r,o;return t?(o=0<=(e>>>=0)&&e<256)&&(r=s[e])?r:(n=u(e,0,!0),o&&(s[e]=n),n):(o=-128<=(e|=0)&&e<128)&&(r=i[e])?r:(n=u(e,e<0?-1:0,!1),o&&(i[e]=n),n)}function l(e,t){if(isNaN(e))return t?O:b;if(t){if(e<0)return O;if(e>=y)return j}else{if(e<=-h)return S;if(e+1>=h)return P}return e<0?l(-e,t).neg():u(e%f|0,e/f|0,t)}function u(e,t,r){return new n(e,t,r)}n.fromInt=a,n.fromNumber=l,n.fromBits=u;var c=Math.pow;function p(e,t,n){if(0===e.length)throw Error("empty string");if("number"==typeof t?(n=t,t=!1):t=!!t,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t?O:b;if((n=n||10)<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return p(e.substring(1),t,n).neg();for(var o=l(c(n,8)),i=b,s=0;s<e.length;s+=8){var a=Math.min(8,e.length-s),u=parseInt(e.substring(s,s+a),n);if(a<8){var d=l(c(n,a));i=i.mul(d).add(l(u))}else i=(i=i.mul(o)).add(l(u))}return i.unsigned=t,i}function d(e,t){return"number"==typeof e?l(e,t):"string"==typeof e?p(e,t):u(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}n.fromString=p,n.fromValue=d;var f=4294967296,y=f*f,h=y/2,m=a(1<<24),b=a(0);n.ZERO=b;var O=a(0,!0);n.UZERO=O;var g=a(1);n.ONE=g;var w=a(1,!0);n.UONE=w;var v=a(-1);n.NEG_ONE=v;var P=u(-1,2147483647,!1);n.MAX_VALUE=P;var j=u(-1,-1,!0);n.MAX_UNSIGNED_VALUE=j;var S=u(0,-2147483648,!1);n.MIN_VALUE=S;var T=n.prototype;T.toInt=function(){return this.unsigned?this.low>>>0:this.low},T.toNumber=function(){return this.unsigned?(this.high>>>0)*f+(this.low>>>0):this.high*f+(this.low>>>0)},T.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(S)){var t=l(e),n=this.div(t),r=n.mul(t).sub(this);return n.toString(e)+r.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var o=l(c(e,6),this.unsigned),i=this,s="";;){var a=i.div(o),u=(i.sub(a.mul(o)).toInt()>>>0).toString(e);if((i=a).isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}},T.getHighBits=function(){return this.high},T.getHighBitsUnsigned=function(){return this.high>>>0},T.getLowBits=function(){return this.low},T.getLowBitsUnsigned=function(){return this.low>>>0},T.getNumBitsAbs=function(){if(this.isNegative())return this.eq(S)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&!(e&1<<t);t--);return 0!=this.high?t+33:t+1},T.isSafeInteger=function(){var e=this.high>>21;return!e||!this.unsigned&&-1===e&&!(0===this.low&&-2097152===this.high)},T.isZero=function(){return 0===this.high&&0===this.low},T.eqz=T.isZero,T.isNegative=function(){return!this.unsigned&&this.high<0},T.isPositive=function(){return this.unsigned||this.high>=0},T.isOdd=function(){return!(1&~this.low)},T.isEven=function(){return!(1&this.low)},T.equals=function(e){return r(e)||(e=d(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},T.eq=T.equals,T.notEquals=function(e){return!this.eq(e)},T.neq=T.notEquals,T.ne=T.notEquals,T.lessThan=function(e){return this.comp(e)<0},T.lt=T.lessThan,T.lessThanOrEqual=function(e){return this.comp(e)<=0},T.lte=T.lessThanOrEqual,T.le=T.lessThanOrEqual,T.greaterThan=function(e){return this.comp(e)>0},T.gt=T.greaterThan,T.greaterThanOrEqual=function(e){return this.comp(e)>=0},T.gte=T.greaterThanOrEqual,T.ge=T.greaterThanOrEqual,T.compare=function(e){if(r(e)||(e=d(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},T.comp=T.compare,T.negate=function(){return!this.unsigned&&this.eq(S)?S:this.not().add(g)},T.neg=T.negate,T.add=function(e){r(e)||(e=d(e));var t=this.high>>>16,n=65535&this.high,o=this.low>>>16,i=65535&this.low,s=e.high>>>16,a=65535&e.high,l=e.low>>>16,c=0,p=0,f=0,y=0;return f+=(y+=i+(65535&e.low))>>>16,p+=(f+=o+l)>>>16,c+=(p+=n+a)>>>16,c+=t+s,u((f&=65535)<<16|(y&=65535),(c&=65535)<<16|(p&=65535),this.unsigned)},T.subtract=function(e){return r(e)||(e=d(e)),this.add(e.neg())},T.sub=T.subtract,T.multiply=function(e){if(this.isZero())return this;if(r(e)||(e=d(e)),t)return u(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return this.unsigned?O:b;if(this.eq(S))return e.isOdd()?S:b;if(e.eq(S))return this.isOdd()?S:b;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(m)&&e.lt(m))return l(this.toNumber()*e.toNumber(),this.unsigned);var n=this.high>>>16,o=65535&this.high,i=this.low>>>16,s=65535&this.low,a=e.high>>>16,c=65535&e.high,p=e.low>>>16,f=65535&e.low,y=0,h=0,g=0,w=0;return g+=(w+=s*f)>>>16,h+=(g+=i*f)>>>16,g&=65535,h+=(g+=s*p)>>>16,y+=(h+=o*f)>>>16,h&=65535,y+=(h+=i*p)>>>16,h&=65535,y+=(h+=s*c)>>>16,y+=n*f+o*p+i*c+s*a,u((g&=65535)<<16|(w&=65535),(y&=65535)<<16|(h&=65535),this.unsigned)},T.mul=T.multiply,T.divide=function(e){if(r(e)||(e=d(e)),e.isZero())throw Error("division by zero");var n,o,i;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?u((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?O:b;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return O;if(e.gt(this.shru(1)))return w;i=O}else{if(this.eq(S))return e.eq(g)||e.eq(v)?S:e.eq(S)?g:(n=this.shr(1).div(e).shl(1)).eq(b)?e.isNegative()?g:v:(o=this.sub(e.mul(n)),i=n.add(o.div(e)));if(e.eq(S))return this.unsigned?O:b;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();i=b}for(o=this;o.gte(e);){n=Math.max(1,Math.floor(o.toNumber()/e.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),a=s<=48?1:c(2,s-48),p=l(n),f=p.mul(e);f.isNegative()||f.gt(o);)f=(p=l(n-=a,this.unsigned)).mul(e);p.isZero()&&(p=g),i=i.add(p),o=o.sub(f)}return i},T.div=T.divide,T.modulo=function(e){return r(e)||(e=d(e)),t?u((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},T.mod=T.modulo,T.rem=T.modulo,T.not=function(){return u(~this.low,~this.high,this.unsigned)},T.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},T.clz=T.countLeadingZeros,T.countTrailingZeros=function(){return this.low?o(this.low):o(this.high)+32},T.ctz=T.countTrailingZeros,T.and=function(e){return r(e)||(e=d(e)),u(this.low&e.low,this.high&e.high,this.unsigned)},T.or=function(e){return r(e)||(e=d(e)),u(this.low|e.low,this.high|e.high,this.unsigned)},T.xor=function(e){return r(e)||(e=d(e)),u(this.low^e.low,this.high^e.high,this.unsigned)},T.shiftLeft=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?u(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):u(0,this.low<<e-32,this.unsigned)},T.shl=T.shiftLeft,T.shiftRight=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?u(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):u(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},T.shr=T.shiftRight,T.shiftRightUnsigned=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?u(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):u(32===e?this.high:this.high>>>e-32,0,this.unsigned)},T.shru=T.shiftRightUnsigned,T.shr_u=T.shiftRightUnsigned,T.rotateLeft=function(e){var t;return r(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?u(this.high,this.low,this.unsigned):e<32?(t=32-e,u(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned)):(t=32-(e-=32),u(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned))},T.rotl=T.rotateLeft,T.rotateRight=function(e){var t;return r(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?u(this.high,this.low,this.unsigned):e<32?(t=32-e,u(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned)):(t=32-(e-=32),u(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned))},T.rotr=T.rotateRight,T.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},T.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},T.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},T.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},T.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},n.fromBytes=function(e,t,r){return r?n.fromBytesLE(e,t):n.fromBytesBE(e,t)},n.fromBytesLE=function(e,t){return new n(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},n.fromBytesBE=function(e,t){return new n(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)},"function"==typeof BigInt&&(n.fromBigInt=function(e,t){return u(Number(BigInt.asIntN(32,e)),Number(BigInt.asIntN(32,e>>BigInt(32))),t)},n.fromValue=function(e,t){return"bigint"==typeof e?n.fromBigInt(e,t):d(e,t)},T.toBigInt=function(){var e=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|e}),e.default=n}(e),function(e){return e.default||e}(e)}.apply(t,[]),void 0===n||(e.exports=n)}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=n(946);const t=e.Reader,r=e.Writer,o=e.util,i=e.roots.default||(e.roots.default={});i.ord=(()=>{const n={};return n.Reaction=function(){function n(e){if(this.identifiers=[],this.inputs={},this.observations=[],this.workups=[],this.outcomes=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.identifiers=o.emptyArray,n.prototype.inputs=o.emptyObject,n.prototype.setup=null,n.prototype.conditions=null,n.prototype.notes=null,n.prototype.observations=o.emptyArray,n.prototype.workups=o.emptyArray,n.prototype.outcomes=o.emptyArray,n.prototype.provenance=null,n.prototype.reactionId="",n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.identifiers&&e.identifiers.length)for(let n=0;n<e.identifiers.length;++n)i.ord.ReactionIdentifier.encode(e.identifiers[n],t.uint32(10).fork()).ldelim();if(null!=e.inputs&&Object.hasOwnProperty.call(e,"inputs"))for(let n=Object.keys(e.inputs),r=0;r<n.length;++r)t.uint32(18).fork().uint32(10).string(n[r]),i.ord.ReactionInput.encode(e.inputs[n[r]],t.uint32(18).fork()).ldelim().ldelim();if(null!=e.setup&&Object.hasOwnProperty.call(e,"setup")&&i.ord.ReactionSetup.encode(e.setup,t.uint32(26).fork()).ldelim(),null!=e.conditions&&Object.hasOwnProperty.call(e,"conditions")&&i.ord.ReactionConditions.encode(e.conditions,t.uint32(34).fork()).ldelim(),null!=e.notes&&Object.hasOwnProperty.call(e,"notes")&&i.ord.ReactionNotes.encode(e.notes,t.uint32(42).fork()).ldelim(),null!=e.observations&&e.observations.length)for(let n=0;n<e.observations.length;++n)i.ord.ReactionObservation.encode(e.observations[n],t.uint32(50).fork()).ldelim();if(null!=e.workups&&e.workups.length)for(let n=0;n<e.workups.length;++n)i.ord.ReactionWorkup.encode(e.workups[n],t.uint32(58).fork()).ldelim();if(null!=e.outcomes&&e.outcomes.length)for(let n=0;n<e.outcomes.length;++n)i.ord.ReactionOutcome.encode(e.outcomes[n],t.uint32(66).fork()).ldelim();return null!=e.provenance&&Object.hasOwnProperty.call(e,"provenance")&&i.ord.ReactionProvenance.encode(e.provenance,t.uint32(74).fork()).ldelim(),null!=e.reactionId&&Object.hasOwnProperty.call(e,"reactionId")&&t.uint32(82).string(e.reactionId),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r,s,a=void 0===n?e.len:e.pos+n,l=new i.ord.Reaction;for(;e.pos<a;){let t=e.uint32();switch(t>>>3){case 1:l.identifiers&&l.identifiers.length||(l.identifiers=[]),l.identifiers.push(i.ord.ReactionIdentifier.decode(e,e.uint32()));break;case 2:{l.inputs===o.emptyObject&&(l.inputs={});let t=e.uint32()+e.pos;for(r="",s=null;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=i.ord.ReactionInput.decode(e,e.uint32());break;default:e.skipType(7&t)}}l.inputs[r]=s;break}case 3:l.setup=i.ord.ReactionSetup.decode(e,e.uint32());break;case 4:l.conditions=i.ord.ReactionConditions.decode(e,e.uint32());break;case 5:l.notes=i.ord.ReactionNotes.decode(e,e.uint32());break;case 6:l.observations&&l.observations.length||(l.observations=[]),l.observations.push(i.ord.ReactionObservation.decode(e,e.uint32()));break;case 7:l.workups&&l.workups.length||(l.workups=[]),l.workups.push(i.ord.ReactionWorkup.decode(e,e.uint32()));break;case 8:l.outcomes&&l.outcomes.length||(l.outcomes=[]),l.outcomes.push(i.ord.ReactionOutcome.decode(e,e.uint32()));break;case 9:l.provenance=i.ord.ReactionProvenance.decode(e,e.uint32());break;case 10:l.reactionId=e.string();break;default:e.skipType(7&t)}}return l},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.identifiers&&e.hasOwnProperty("identifiers")){if(!Array.isArray(e.identifiers))return"identifiers: array expected";for(let t=0;t<e.identifiers.length;++t){let n=i.ord.ReactionIdentifier.verify(e.identifiers[t]);if(n)return"identifiers."+n}}if(null!=e.inputs&&e.hasOwnProperty("inputs")){if(!o.isObject(e.inputs))return"inputs: object expected";let t=Object.keys(e.inputs);for(let n=0;n<t.length;++n){let r=i.ord.ReactionInput.verify(e.inputs[t[n]]);if(r)return"inputs."+r}}if(null!=e.setup&&e.hasOwnProperty("setup")){let t=i.ord.ReactionSetup.verify(e.setup);if(t)return"setup."+t}if(null!=e.conditions&&e.hasOwnProperty("conditions")){let t=i.ord.ReactionConditions.verify(e.conditions);if(t)return"conditions."+t}if(null!=e.notes&&e.hasOwnProperty("notes")){let t=i.ord.ReactionNotes.verify(e.notes);if(t)return"notes."+t}if(null!=e.observations&&e.hasOwnProperty("observations")){if(!Array.isArray(e.observations))return"observations: array expected";for(let t=0;t<e.observations.length;++t){let n=i.ord.ReactionObservation.verify(e.observations[t]);if(n)return"observations."+n}}if(null!=e.workups&&e.hasOwnProperty("workups")){if(!Array.isArray(e.workups))return"workups: array expected";for(let t=0;t<e.workups.length;++t){let n=i.ord.ReactionWorkup.verify(e.workups[t]);if(n)return"workups."+n}}if(null!=e.outcomes&&e.hasOwnProperty("outcomes")){if(!Array.isArray(e.outcomes))return"outcomes: array expected";for(let t=0;t<e.outcomes.length;++t){let n=i.ord.ReactionOutcome.verify(e.outcomes[t]);if(n)return"outcomes."+n}}if(null!=e.provenance&&e.hasOwnProperty("provenance")){let t=i.ord.ReactionProvenance.verify(e.provenance);if(t)return"provenance."+t}return null!=e.reactionId&&e.hasOwnProperty("reactionId")&&!o.isString(e.reactionId)?"reactionId: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.Reaction)return e;let t=new i.ord.Reaction;if(e.identifiers){if(!Array.isArray(e.identifiers))throw TypeError(".ord.Reaction.identifiers: array expected");t.identifiers=[];for(let n=0;n<e.identifiers.length;++n){if("object"!=typeof e.identifiers[n])throw TypeError(".ord.Reaction.identifiers: object expected");t.identifiers[n]=i.ord.ReactionIdentifier.fromObject(e.identifiers[n])}}if(e.inputs){if("object"!=typeof e.inputs)throw TypeError(".ord.Reaction.inputs: object expected");t.inputs={};for(let n=Object.keys(e.inputs),r=0;r<n.length;++r){if("object"!=typeof e.inputs[n[r]])throw TypeError(".ord.Reaction.inputs: object expected");t.inputs[n[r]]=i.ord.ReactionInput.fromObject(e.inputs[n[r]])}}if(null!=e.setup){if("object"!=typeof e.setup)throw TypeError(".ord.Reaction.setup: object expected");t.setup=i.ord.ReactionSetup.fromObject(e.setup)}if(null!=e.conditions){if("object"!=typeof e.conditions)throw TypeError(".ord.Reaction.conditions: object expected");t.conditions=i.ord.ReactionConditions.fromObject(e.conditions)}if(null!=e.notes){if("object"!=typeof e.notes)throw TypeError(".ord.Reaction.notes: object expected");t.notes=i.ord.ReactionNotes.fromObject(e.notes)}if(e.observations){if(!Array.isArray(e.observations))throw TypeError(".ord.Reaction.observations: array expected");t.observations=[];for(let n=0;n<e.observations.length;++n){if("object"!=typeof e.observations[n])throw TypeError(".ord.Reaction.observations: object expected");t.observations[n]=i.ord.ReactionObservation.fromObject(e.observations[n])}}if(e.workups){if(!Array.isArray(e.workups))throw TypeError(".ord.Reaction.workups: array expected");t.workups=[];for(let n=0;n<e.workups.length;++n){if("object"!=typeof e.workups[n])throw TypeError(".ord.Reaction.workups: object expected");t.workups[n]=i.ord.ReactionWorkup.fromObject(e.workups[n])}}if(e.outcomes){if(!Array.isArray(e.outcomes))throw TypeError(".ord.Reaction.outcomes: array expected");t.outcomes=[];for(let n=0;n<e.outcomes.length;++n){if("object"!=typeof e.outcomes[n])throw TypeError(".ord.Reaction.outcomes: object expected");t.outcomes[n]=i.ord.ReactionOutcome.fromObject(e.outcomes[n])}}if(null!=e.provenance){if("object"!=typeof e.provenance)throw TypeError(".ord.Reaction.provenance: object expected");t.provenance=i.ord.ReactionProvenance.fromObject(e.provenance)}return null!=e.reactionId&&(t.reactionId=String(e.reactionId)),t},n.toObject=function(e,t){t||(t={});let n,r={};if((t.arrays||t.defaults)&&(r.identifiers=[],r.observations=[],r.workups=[],r.outcomes=[]),(t.objects||t.defaults)&&(r.inputs={}),t.defaults&&(r.setup=null,r.conditions=null,r.notes=null,r.provenance=null,r.reactionId=""),e.identifiers&&e.identifiers.length){r.identifiers=[];for(let n=0;n<e.identifiers.length;++n)r.identifiers[n]=i.ord.ReactionIdentifier.toObject(e.identifiers[n],t)}if(e.inputs&&(n=Object.keys(e.inputs)).length){r.inputs={};for(let o=0;o<n.length;++o)r.inputs[n[o]]=i.ord.ReactionInput.toObject(e.inputs[n[o]],t)}if(null!=e.setup&&e.hasOwnProperty("setup")&&(r.setup=i.ord.ReactionSetup.toObject(e.setup,t)),null!=e.conditions&&e.hasOwnProperty("conditions")&&(r.conditions=i.ord.ReactionConditions.toObject(e.conditions,t)),null!=e.notes&&e.hasOwnProperty("notes")&&(r.notes=i.ord.ReactionNotes.toObject(e.notes,t)),e.observations&&e.observations.length){r.observations=[];for(let n=0;n<e.observations.length;++n)r.observations[n]=i.ord.ReactionObservation.toObject(e.observations[n],t)}if(e.workups&&e.workups.length){r.workups=[];for(let n=0;n<e.workups.length;++n)r.workups[n]=i.ord.ReactionWorkup.toObject(e.workups[n],t)}if(e.outcomes&&e.outcomes.length){r.outcomes=[];for(let n=0;n<e.outcomes.length;++n)r.outcomes[n]=i.ord.ReactionOutcome.toObject(e.outcomes[n],t)}return null!=e.provenance&&e.hasOwnProperty("provenance")&&(r.provenance=i.ord.ReactionProvenance.toObject(e.provenance,t)),null!=e.reactionId&&e.hasOwnProperty("reactionId")&&(r.reactionId=e.reactionId),r},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Reaction"},n}(),n.ReactionIdentifier=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.type=0,n.prototype.details="",n.prototype.value="",n.prototype.isMapped=null,Object.defineProperty(n.prototype,"_isMapped",{get:o.oneOfGetter(s=["isMapped"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(26).string(e.value),null!=e.isMapped&&Object.hasOwnProperty.call(e,"isMapped")&&t.uint32(32).bool(e.isMapped),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionIdentifier;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.value=e.string();break;case 4:o.isMapped=e.bool();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 6:case 3:case 4:case 5:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null!=e.value&&e.hasOwnProperty("value")&&!o.isString(e.value)?"value: string expected":null!=e.isMapped&&e.hasOwnProperty("isMapped")&&"boolean"!=typeof e.isMapped?"isMapped: boolean expected":null},n.fromObject=function(e){if(e instanceof i.ord.ReactionIdentifier)return e;let t=new i.ord.ReactionIdentifier;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"REACTION_SMILES":case 2:t.type=2;break;case"REACTION_CXSMILES":case 6:t.type=6;break;case"RDFILE":case 3:t.type=3;break;case"RINCHI":case 4:t.type=4;break;case"REACTION_TYPE":case 5:t.type=5}return null!=e.details&&(t.details=String(e.details)),null!=e.value&&(t.value=String(e.value)),null!=e.isMapped&&(t.isMapped=Boolean(e.isMapped)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.value=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ReactionIdentifier.ReactionIdentifierType[e.type]?e.type:i.ord.ReactionIdentifier.ReactionIdentifierType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.value&&e.hasOwnProperty("value")&&(n.value=e.value),null!=e.isMapped&&e.hasOwnProperty("isMapped")&&(n.isMapped=e.isMapped,t.oneofs&&(n._isMapped="isMapped")),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionIdentifier"},n.ReactionIdentifierType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="REACTION_SMILES"]=2,t[e[6]="REACTION_CXSMILES"]=6,t[e[3]="RDFILE"]=3,t[e[4]="RINCHI"]=4,t[e[5]="REACTION_TYPE"]=5,t}(),n}(),n.ReactionInput=function(){function n(e){if(this.components=[],this.crudeComponents=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.components=o.emptyArray,n.prototype.crudeComponents=o.emptyArray,n.prototype.additionOrder=0,n.prototype.additionTime=null,n.prototype.additionSpeed=null,n.prototype.additionDuration=null,n.prototype.flowRate=null,n.prototype.additionDevice=null,n.prototype.additionTemperature=null,n.prototype.texture=null,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.components&&e.components.length)for(let n=0;n<e.components.length;++n)i.ord.Compound.encode(e.components[n],t.uint32(10).fork()).ldelim();if(null!=e.crudeComponents&&e.crudeComponents.length)for(let n=0;n<e.crudeComponents.length;++n)i.ord.CrudeComponent.encode(e.crudeComponents[n],t.uint32(18).fork()).ldelim();return null!=e.additionOrder&&Object.hasOwnProperty.call(e,"additionOrder")&&t.uint32(24).int32(e.additionOrder),null!=e.additionTime&&Object.hasOwnProperty.call(e,"additionTime")&&i.ord.Time.encode(e.additionTime,t.uint32(34).fork()).ldelim(),null!=e.additionSpeed&&Object.hasOwnProperty.call(e,"additionSpeed")&&i.ord.ReactionInput.AdditionSpeed.encode(e.additionSpeed,t.uint32(42).fork()).ldelim(),null!=e.additionDuration&&Object.hasOwnProperty.call(e,"additionDuration")&&i.ord.Time.encode(e.additionDuration,t.uint32(50).fork()).ldelim(),null!=e.flowRate&&Object.hasOwnProperty.call(e,"flowRate")&&i.ord.FlowRate.encode(e.flowRate,t.uint32(58).fork()).ldelim(),null!=e.additionDevice&&Object.hasOwnProperty.call(e,"additionDevice")&&i.ord.ReactionInput.AdditionDevice.encode(e.additionDevice,t.uint32(66).fork()).ldelim(),null!=e.additionTemperature&&Object.hasOwnProperty.call(e,"additionTemperature")&&i.ord.Temperature.encode(e.additionTemperature,t.uint32(74).fork()).ldelim(),null!=e.texture&&Object.hasOwnProperty.call(e,"texture")&&i.ord.Texture.encode(e.texture,t.uint32(82).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionInput;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.components&&o.components.length||(o.components=[]),o.components.push(i.ord.Compound.decode(e,e.uint32()));break;case 2:o.crudeComponents&&o.crudeComponents.length||(o.crudeComponents=[]),o.crudeComponents.push(i.ord.CrudeComponent.decode(e,e.uint32()));break;case 3:o.additionOrder=e.int32();break;case 4:o.additionTime=i.ord.Time.decode(e,e.uint32());break;case 5:o.additionSpeed=i.ord.ReactionInput.AdditionSpeed.decode(e,e.uint32());break;case 6:o.additionDuration=i.ord.Time.decode(e,e.uint32());break;case 7:o.flowRate=i.ord.FlowRate.decode(e,e.uint32());break;case 8:o.additionDevice=i.ord.ReactionInput.AdditionDevice.decode(e,e.uint32());break;case 9:o.additionTemperature=i.ord.Temperature.decode(e,e.uint32());break;case 10:o.texture=i.ord.Texture.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.components&&e.hasOwnProperty("components")){if(!Array.isArray(e.components))return"components: array expected";for(let t=0;t<e.components.length;++t){let n=i.ord.Compound.verify(e.components[t]);if(n)return"components."+n}}if(null!=e.crudeComponents&&e.hasOwnProperty("crudeComponents")){if(!Array.isArray(e.crudeComponents))return"crudeComponents: array expected";for(let t=0;t<e.crudeComponents.length;++t){let n=i.ord.CrudeComponent.verify(e.crudeComponents[t]);if(n)return"crudeComponents."+n}}if(null!=e.additionOrder&&e.hasOwnProperty("additionOrder")&&!o.isInteger(e.additionOrder))return"additionOrder: integer expected";if(null!=e.additionTime&&e.hasOwnProperty("additionTime")){let t=i.ord.Time.verify(e.additionTime);if(t)return"additionTime."+t}if(null!=e.additionSpeed&&e.hasOwnProperty("additionSpeed")){let t=i.ord.ReactionInput.AdditionSpeed.verify(e.additionSpeed);if(t)return"additionSpeed."+t}if(null!=e.additionDuration&&e.hasOwnProperty("additionDuration")){let t=i.ord.Time.verify(e.additionDuration);if(t)return"additionDuration."+t}if(null!=e.flowRate&&e.hasOwnProperty("flowRate")){let t=i.ord.FlowRate.verify(e.flowRate);if(t)return"flowRate."+t}if(null!=e.additionDevice&&e.hasOwnProperty("additionDevice")){let t=i.ord.ReactionInput.AdditionDevice.verify(e.additionDevice);if(t)return"additionDevice."+t}if(null!=e.additionTemperature&&e.hasOwnProperty("additionTemperature")){let t=i.ord.Temperature.verify(e.additionTemperature);if(t)return"additionTemperature."+t}if(null!=e.texture&&e.hasOwnProperty("texture")){let t=i.ord.Texture.verify(e.texture);if(t)return"texture."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.ReactionInput)return e;let t=new i.ord.ReactionInput;if(e.components){if(!Array.isArray(e.components))throw TypeError(".ord.ReactionInput.components: array expected");t.components=[];for(let n=0;n<e.components.length;++n){if("object"!=typeof e.components[n])throw TypeError(".ord.ReactionInput.components: object expected");t.components[n]=i.ord.Compound.fromObject(e.components[n])}}if(e.crudeComponents){if(!Array.isArray(e.crudeComponents))throw TypeError(".ord.ReactionInput.crudeComponents: array expected");t.crudeComponents=[];for(let n=0;n<e.crudeComponents.length;++n){if("object"!=typeof e.crudeComponents[n])throw TypeError(".ord.ReactionInput.crudeComponents: object expected");t.crudeComponents[n]=i.ord.CrudeComponent.fromObject(e.crudeComponents[n])}}if(null!=e.additionOrder&&(t.additionOrder=0|e.additionOrder),null!=e.additionTime){if("object"!=typeof e.additionTime)throw TypeError(".ord.ReactionInput.additionTime: object expected");t.additionTime=i.ord.Time.fromObject(e.additionTime)}if(null!=e.additionSpeed){if("object"!=typeof e.additionSpeed)throw TypeError(".ord.ReactionInput.additionSpeed: object expected");t.additionSpeed=i.ord.ReactionInput.AdditionSpeed.fromObject(e.additionSpeed)}if(null!=e.additionDuration){if("object"!=typeof e.additionDuration)throw TypeError(".ord.ReactionInput.additionDuration: object expected");t.additionDuration=i.ord.Time.fromObject(e.additionDuration)}if(null!=e.flowRate){if("object"!=typeof e.flowRate)throw TypeError(".ord.ReactionInput.flowRate: object expected");t.flowRate=i.ord.FlowRate.fromObject(e.flowRate)}if(null!=e.additionDevice){if("object"!=typeof e.additionDevice)throw TypeError(".ord.ReactionInput.additionDevice: object expected");t.additionDevice=i.ord.ReactionInput.AdditionDevice.fromObject(e.additionDevice)}if(null!=e.additionTemperature){if("object"!=typeof e.additionTemperature)throw TypeError(".ord.ReactionInput.additionTemperature: object expected");t.additionTemperature=i.ord.Temperature.fromObject(e.additionTemperature)}if(null!=e.texture){if("object"!=typeof e.texture)throw TypeError(".ord.ReactionInput.texture: object expected");t.texture=i.ord.Texture.fromObject(e.texture)}return t},n.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.components=[],n.crudeComponents=[]),t.defaults&&(n.additionOrder=0,n.additionTime=null,n.additionSpeed=null,n.additionDuration=null,n.flowRate=null,n.additionDevice=null,n.additionTemperature=null,n.texture=null),e.components&&e.components.length){n.components=[];for(let r=0;r<e.components.length;++r)n.components[r]=i.ord.Compound.toObject(e.components[r],t)}if(e.crudeComponents&&e.crudeComponents.length){n.crudeComponents=[];for(let r=0;r<e.crudeComponents.length;++r)n.crudeComponents[r]=i.ord.CrudeComponent.toObject(e.crudeComponents[r],t)}return null!=e.additionOrder&&e.hasOwnProperty("additionOrder")&&(n.additionOrder=e.additionOrder),null!=e.additionTime&&e.hasOwnProperty("additionTime")&&(n.additionTime=i.ord.Time.toObject(e.additionTime,t)),null!=e.additionSpeed&&e.hasOwnProperty("additionSpeed")&&(n.additionSpeed=i.ord.ReactionInput.AdditionSpeed.toObject(e.additionSpeed,t)),null!=e.additionDuration&&e.hasOwnProperty("additionDuration")&&(n.additionDuration=i.ord.Time.toObject(e.additionDuration,t)),null!=e.flowRate&&e.hasOwnProperty("flowRate")&&(n.flowRate=i.ord.FlowRate.toObject(e.flowRate,t)),null!=e.additionDevice&&e.hasOwnProperty("additionDevice")&&(n.additionDevice=i.ord.ReactionInput.AdditionDevice.toObject(e.additionDevice,t)),null!=e.additionTemperature&&e.hasOwnProperty("additionTemperature")&&(n.additionTemperature=i.ord.Temperature.toObject(e.additionTemperature,t)),null!=e.texture&&e.hasOwnProperty("texture")&&(n.texture=i.ord.Texture.toObject(e.texture,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionInput"},n.AdditionSpeed=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionInput.AdditionSpeed;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.ReactionInput.AdditionSpeed)return e;let t=new i.ord.ReactionInput.AdditionSpeed;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"ALL_AT_ONCE":case 1:t.type=1;break;case"FAST":case 2:t.type=2;break;case"SLOW":case 3:t.type=3;break;case"DROPWISE":case 4:t.type=4;break;case"CONTINUOUS":case 5:t.type=5;break;case"PORTIONWISE":case 6:t.type=6}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ReactionInput.AdditionSpeed.AdditionSpeedType[e.type]?e.type:i.ord.ReactionInput.AdditionSpeed.AdditionSpeedType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionInput.AdditionSpeed"},n.AdditionSpeedType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="ALL_AT_ONCE"]=1,t[e[2]="FAST"]=2,t[e[3]="SLOW"]=3,t[e[4]="DROPWISE"]=4,t[e[5]="CONTINUOUS"]=5,t[e[6]="PORTIONWISE"]=6,t}(),n}(),n.AdditionDevice=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionInput.AdditionDevice;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.ReactionInput.AdditionDevice)return e;let t=new i.ord.ReactionInput.AdditionDevice;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"NONE":case 2:t.type=2;break;case"SYRINGE":case 3:t.type=3;break;case"CANNULA":case 4:t.type=4;break;case"ADDITION_FUNNEL":case 5:t.type=5;break;case"PIPETTE":case 6:t.type=6;break;case"POSITIVE_DISPLACEMENT_PIPETTE":case 7:t.type=7;break;case"PISTON_PUMP":case 8:t.type=8;break;case"SYRINGE_PUMP":case 9:t.type=9;break;case"PERISTALTIC_PUMP":case 10:t.type=10}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ReactionInput.AdditionDevice.AdditionDeviceType[e.type]?e.type:i.ord.ReactionInput.AdditionDevice.AdditionDeviceType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionInput.AdditionDevice"},n.AdditionDeviceType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="NONE"]=2,t[e[3]="SYRINGE"]=3,t[e[4]="CANNULA"]=4,t[e[5]="ADDITION_FUNNEL"]=5,t[e[6]="PIPETTE"]=6,t[e[7]="POSITIVE_DISPLACEMENT_PIPETTE"]=7,t[e[8]="PISTON_PUMP"]=8,t[e[9]="SYRINGE_PUMP"]=9,t[e[10]="PERISTALTIC_PUMP"]=10,t}(),n}(),n}(),n.Amount=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.mass=null,n.prototype.moles=null,n.prototype.volume=null,n.prototype.unmeasured=null,n.prototype.volumeIncludesSolutes=null,Object.defineProperty(n.prototype,"kind",{get:o.oneOfGetter(s=["mass","moles","volume","unmeasured"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_volumeIncludesSolutes",{get:o.oneOfGetter(s=["volumeIncludesSolutes"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.mass&&Object.hasOwnProperty.call(e,"mass")&&i.ord.Mass.encode(e.mass,t.uint32(10).fork()).ldelim(),null!=e.moles&&Object.hasOwnProperty.call(e,"moles")&&i.ord.Moles.encode(e.moles,t.uint32(18).fork()).ldelim(),null!=e.volume&&Object.hasOwnProperty.call(e,"volume")&&i.ord.Volume.encode(e.volume,t.uint32(26).fork()).ldelim(),null!=e.volumeIncludesSolutes&&Object.hasOwnProperty.call(e,"volumeIncludesSolutes")&&t.uint32(32).bool(e.volumeIncludesSolutes),null!=e.unmeasured&&Object.hasOwnProperty.call(e,"unmeasured")&&i.ord.UnmeasuredAmount.encode(e.unmeasured,t.uint32(42).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Amount;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.mass=i.ord.Mass.decode(e,e.uint32());break;case 2:o.moles=i.ord.Moles.decode(e,e.uint32());break;case 3:o.volume=i.ord.Volume.decode(e,e.uint32());break;case 5:o.unmeasured=i.ord.UnmeasuredAmount.decode(e,e.uint32());break;case 4:o.volumeIncludesSolutes=e.bool();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.mass&&e.hasOwnProperty("mass")){t.kind=1;{let t=i.ord.Mass.verify(e.mass);if(t)return"mass."+t}}if(null!=e.moles&&e.hasOwnProperty("moles")){if(1===t.kind)return"kind: multiple values";t.kind=1;{let t=i.ord.Moles.verify(e.moles);if(t)return"moles."+t}}if(null!=e.volume&&e.hasOwnProperty("volume")){if(1===t.kind)return"kind: multiple values";t.kind=1;{let t=i.ord.Volume.verify(e.volume);if(t)return"volume."+t}}if(null!=e.unmeasured&&e.hasOwnProperty("unmeasured")){if(1===t.kind)return"kind: multiple values";t.kind=1;{let t=i.ord.UnmeasuredAmount.verify(e.unmeasured);if(t)return"unmeasured."+t}}return null!=e.volumeIncludesSolutes&&e.hasOwnProperty("volumeIncludesSolutes")&&(t._volumeIncludesSolutes=1,"boolean"!=typeof e.volumeIncludesSolutes)?"volumeIncludesSolutes: boolean expected":null},n.fromObject=function(e){if(e instanceof i.ord.Amount)return e;let t=new i.ord.Amount;if(null!=e.mass){if("object"!=typeof e.mass)throw TypeError(".ord.Amount.mass: object expected");t.mass=i.ord.Mass.fromObject(e.mass)}if(null!=e.moles){if("object"!=typeof e.moles)throw TypeError(".ord.Amount.moles: object expected");t.moles=i.ord.Moles.fromObject(e.moles)}if(null!=e.volume){if("object"!=typeof e.volume)throw TypeError(".ord.Amount.volume: object expected");t.volume=i.ord.Volume.fromObject(e.volume)}if(null!=e.unmeasured){if("object"!=typeof e.unmeasured)throw TypeError(".ord.Amount.unmeasured: object expected");t.unmeasured=i.ord.UnmeasuredAmount.fromObject(e.unmeasured)}return null!=e.volumeIncludesSolutes&&(t.volumeIncludesSolutes=Boolean(e.volumeIncludesSolutes)),t},n.toObject=function(e,t){t||(t={});let n={};return null!=e.mass&&e.hasOwnProperty("mass")&&(n.mass=i.ord.Mass.toObject(e.mass,t),t.oneofs&&(n.kind="mass")),null!=e.moles&&e.hasOwnProperty("moles")&&(n.moles=i.ord.Moles.toObject(e.moles,t),t.oneofs&&(n.kind="moles")),null!=e.volume&&e.hasOwnProperty("volume")&&(n.volume=i.ord.Volume.toObject(e.volume,t),t.oneofs&&(n.kind="volume")),null!=e.volumeIncludesSolutes&&e.hasOwnProperty("volumeIncludesSolutes")&&(n.volumeIncludesSolutes=e.volumeIncludesSolutes,t.oneofs&&(n._volumeIncludesSolutes="volumeIncludesSolutes")),null!=e.unmeasured&&e.hasOwnProperty("unmeasured")&&(n.unmeasured=i.ord.UnmeasuredAmount.toObject(e.unmeasured,t),t.oneofs&&(n.kind="unmeasured")),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Amount"},n}(),n.UnmeasuredAmount=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.UnmeasuredAmount;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.UnmeasuredAmount)return e;let t=new i.ord.UnmeasuredAmount;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"SATURATED":case 2:t.type=2;break;case"CATALYTIC":case 3:t.type=3;break;case"TITRATED":case 4:t.type=4}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.UnmeasuredAmount.UnmeasuredAmountType[e.type]?e.type:i.ord.UnmeasuredAmount.UnmeasuredAmountType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.UnmeasuredAmount"},n.UnmeasuredAmountType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="SATURATED"]=2,t[e[3]="CATALYTIC"]=3,t[e[4]="TITRATED"]=4,t}(),n}(),n.Texture=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Texture;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.Texture)return e;let t=new i.ord.Texture;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"POWDER":case 2:t.type=2;break;case"CRYSTAL":case 3:t.type=3;break;case"OIL":case 4:t.type=4;break;case"AMORPHOUS_SOLID":case 5:t.type=5;break;case"FOAM":case 6:t.type=6;break;case"WAX":case 7:t.type=7;break;case"SEMI_SOLID":case 8:t.type=8;break;case"SOLID":case 9:t.type=9;break;case"LIQUID":case 10:t.type=10;break;case"GAS":case 11:t.type=11}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.Texture.TextureType[e.type]?e.type:i.ord.Texture.TextureType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Texture"},n.TextureType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="POWDER"]=2,t[e[3]="CRYSTAL"]=3,t[e[4]="OIL"]=4,t[e[5]="AMORPHOUS_SOLID"]=5,t[e[6]="FOAM"]=6,t[e[7]="WAX"]=7,t[e[8]="SEMI_SOLID"]=8,t[e[9]="SOLID"]=9,t[e[10]="LIQUID"]=10,t[e[11]="GAS"]=11,t}(),n}(),n.CrudeComponent=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.reactionId="",n.prototype.includesWorkup=null,n.prototype.hasDerivedAmount=null,n.prototype.amount=null,n.prototype.texture=null,Object.defineProperty(n.prototype,"_includesWorkup",{get:o.oneOfGetter(s=["includesWorkup"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_hasDerivedAmount",{get:o.oneOfGetter(s=["hasDerivedAmount"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.reactionId&&Object.hasOwnProperty.call(e,"reactionId")&&t.uint32(10).string(e.reactionId),null!=e.includesWorkup&&Object.hasOwnProperty.call(e,"includesWorkup")&&t.uint32(16).bool(e.includesWorkup),null!=e.hasDerivedAmount&&Object.hasOwnProperty.call(e,"hasDerivedAmount")&&t.uint32(24).bool(e.hasDerivedAmount),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&i.ord.Amount.encode(e.amount,t.uint32(34).fork()).ldelim(),null!=e.texture&&Object.hasOwnProperty.call(e,"texture")&&i.ord.Texture.encode(e.texture,t.uint32(42).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.CrudeComponent;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.reactionId=e.string();break;case 2:o.includesWorkup=e.bool();break;case 3:o.hasDerivedAmount=e.bool();break;case 4:o.amount=i.ord.Amount.decode(e,e.uint32());break;case 5:o.texture=i.ord.Texture.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.reactionId&&e.hasOwnProperty("reactionId")&&!o.isString(e.reactionId))return"reactionId: string expected";if(null!=e.includesWorkup&&e.hasOwnProperty("includesWorkup")&&(t._includesWorkup=1,"boolean"!=typeof e.includesWorkup))return"includesWorkup: boolean expected";if(null!=e.hasDerivedAmount&&e.hasOwnProperty("hasDerivedAmount")&&(t._hasDerivedAmount=1,"boolean"!=typeof e.hasDerivedAmount))return"hasDerivedAmount: boolean expected";if(null!=e.amount&&e.hasOwnProperty("amount")){let t=i.ord.Amount.verify(e.amount);if(t)return"amount."+t}if(null!=e.texture&&e.hasOwnProperty("texture")){let t=i.ord.Texture.verify(e.texture);if(t)return"texture."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.CrudeComponent)return e;let t=new i.ord.CrudeComponent;if(null!=e.reactionId&&(t.reactionId=String(e.reactionId)),null!=e.includesWorkup&&(t.includesWorkup=Boolean(e.includesWorkup)),null!=e.hasDerivedAmount&&(t.hasDerivedAmount=Boolean(e.hasDerivedAmount)),null!=e.amount){if("object"!=typeof e.amount)throw TypeError(".ord.CrudeComponent.amount: object expected");t.amount=i.ord.Amount.fromObject(e.amount)}if(null!=e.texture){if("object"!=typeof e.texture)throw TypeError(".ord.CrudeComponent.texture: object expected");t.texture=i.ord.Texture.fromObject(e.texture)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.reactionId="",n.amount=null,n.texture=null),null!=e.reactionId&&e.hasOwnProperty("reactionId")&&(n.reactionId=e.reactionId),null!=e.includesWorkup&&e.hasOwnProperty("includesWorkup")&&(n.includesWorkup=e.includesWorkup,t.oneofs&&(n._includesWorkup="includesWorkup")),null!=e.hasDerivedAmount&&e.hasOwnProperty("hasDerivedAmount")&&(n.hasDerivedAmount=e.hasDerivedAmount,t.oneofs&&(n._hasDerivedAmount="hasDerivedAmount")),null!=e.amount&&e.hasOwnProperty("amount")&&(n.amount=i.ord.Amount.toObject(e.amount,t)),null!=e.texture&&e.hasOwnProperty("texture")&&(n.texture=i.ord.Texture.toObject(e.texture,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.CrudeComponent"},n}(),n.Compound=function(){function n(e){if(this.identifiers=[],this.preparations=[],this.features={},this.analyses={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.identifiers=o.emptyArray,n.prototype.amount=null,n.prototype.reactionRole=0,n.prototype.isLimiting=null,n.prototype.preparations=o.emptyArray,n.prototype.source=null,n.prototype.features=o.emptyObject,n.prototype.analyses=o.emptyObject,n.prototype.texture=null,Object.defineProperty(n.prototype,"_isLimiting",{get:o.oneOfGetter(s=["isLimiting"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.identifiers&&e.identifiers.length)for(let n=0;n<e.identifiers.length;++n)i.ord.CompoundIdentifier.encode(e.identifiers[n],t.uint32(10).fork()).ldelim();if(null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&i.ord.Amount.encode(e.amount,t.uint32(18).fork()).ldelim(),null!=e.reactionRole&&Object.hasOwnProperty.call(e,"reactionRole")&&t.uint32(24).int32(e.reactionRole),null!=e.isLimiting&&Object.hasOwnProperty.call(e,"isLimiting")&&t.uint32(32).bool(e.isLimiting),null!=e.preparations&&e.preparations.length)for(let n=0;n<e.preparations.length;++n)i.ord.CompoundPreparation.encode(e.preparations[n],t.uint32(42).fork()).ldelim();if(null!=e.source&&Object.hasOwnProperty.call(e,"source")&&i.ord.Compound.Source.encode(e.source,t.uint32(50).fork()).ldelim(),null!=e.features&&Object.hasOwnProperty.call(e,"features"))for(let n=Object.keys(e.features),r=0;r<n.length;++r)t.uint32(58).fork().uint32(10).string(n[r]),i.ord.Data.encode(e.features[n[r]],t.uint32(18).fork()).ldelim().ldelim();if(null!=e.analyses&&Object.hasOwnProperty.call(e,"analyses"))for(let n=Object.keys(e.analyses),r=0;r<n.length;++r)t.uint32(66).fork().uint32(10).string(n[r]),i.ord.Analysis.encode(e.analyses[n[r]],t.uint32(18).fork()).ldelim().ldelim();return null!=e.texture&&Object.hasOwnProperty.call(e,"texture")&&i.ord.Texture.encode(e.texture,t.uint32(74).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r,s,a=void 0===n?e.len:e.pos+n,l=new i.ord.Compound;for(;e.pos<a;){let t=e.uint32();switch(t>>>3){case 1:l.identifiers&&l.identifiers.length||(l.identifiers=[]),l.identifiers.push(i.ord.CompoundIdentifier.decode(e,e.uint32()));break;case 2:l.amount=i.ord.Amount.decode(e,e.uint32());break;case 3:l.reactionRole=e.int32();break;case 4:l.isLimiting=e.bool();break;case 5:l.preparations&&l.preparations.length||(l.preparations=[]),l.preparations.push(i.ord.CompoundPreparation.decode(e,e.uint32()));break;case 6:l.source=i.ord.Compound.Source.decode(e,e.uint32());break;case 7:{l.features===o.emptyObject&&(l.features={});let t=e.uint32()+e.pos;for(r="",s=null;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=i.ord.Data.decode(e,e.uint32());break;default:e.skipType(7&t)}}l.features[r]=s;break}case 8:{l.analyses===o.emptyObject&&(l.analyses={});let t=e.uint32()+e.pos;for(r="",s=null;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=i.ord.Analysis.decode(e,e.uint32());break;default:e.skipType(7&t)}}l.analyses[r]=s;break}case 9:l.texture=i.ord.Texture.decode(e,e.uint32());break;default:e.skipType(7&t)}}return l},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.identifiers&&e.hasOwnProperty("identifiers")){if(!Array.isArray(e.identifiers))return"identifiers: array expected";for(let t=0;t<e.identifiers.length;++t){let n=i.ord.CompoundIdentifier.verify(e.identifiers[t]);if(n)return"identifiers."+n}}if(null!=e.amount&&e.hasOwnProperty("amount")){let t=i.ord.Amount.verify(e.amount);if(t)return"amount."+t}if(null!=e.reactionRole&&e.hasOwnProperty("reactionRole"))switch(e.reactionRole){default:return"reactionRole: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:}if(null!=e.isLimiting&&e.hasOwnProperty("isLimiting")&&"boolean"!=typeof e.isLimiting)return"isLimiting: boolean expected";if(null!=e.preparations&&e.hasOwnProperty("preparations")){if(!Array.isArray(e.preparations))return"preparations: array expected";for(let t=0;t<e.preparations.length;++t){let n=i.ord.CompoundPreparation.verify(e.preparations[t]);if(n)return"preparations."+n}}if(null!=e.source&&e.hasOwnProperty("source")){let t=i.ord.Compound.Source.verify(e.source);if(t)return"source."+t}if(null!=e.features&&e.hasOwnProperty("features")){if(!o.isObject(e.features))return"features: object expected";let t=Object.keys(e.features);for(let n=0;n<t.length;++n){let r=i.ord.Data.verify(e.features[t[n]]);if(r)return"features."+r}}if(null!=e.analyses&&e.hasOwnProperty("analyses")){if(!o.isObject(e.analyses))return"analyses: object expected";let t=Object.keys(e.analyses);for(let n=0;n<t.length;++n){let r=i.ord.Analysis.verify(e.analyses[t[n]]);if(r)return"analyses."+r}}if(null!=e.texture&&e.hasOwnProperty("texture")){let t=i.ord.Texture.verify(e.texture);if(t)return"texture."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.Compound)return e;let t=new i.ord.Compound;if(e.identifiers){if(!Array.isArray(e.identifiers))throw TypeError(".ord.Compound.identifiers: array expected");t.identifiers=[];for(let n=0;n<e.identifiers.length;++n){if("object"!=typeof e.identifiers[n])throw TypeError(".ord.Compound.identifiers: object expected");t.identifiers[n]=i.ord.CompoundIdentifier.fromObject(e.identifiers[n])}}if(null!=e.amount){if("object"!=typeof e.amount)throw TypeError(".ord.Compound.amount: object expected");t.amount=i.ord.Amount.fromObject(e.amount)}switch(e.reactionRole){default:if("number"==typeof e.reactionRole){t.reactionRole=e.reactionRole;break}break;case"UNSPECIFIED":case 0:t.reactionRole=0;break;case"REACTANT":case 1:t.reactionRole=1;break;case"REAGENT":case 2:t.reactionRole=2;break;case"SOLVENT":case 3:t.reactionRole=3;break;case"CATALYST":case 4:t.reactionRole=4;break;case"WORKUP":case 5:t.reactionRole=5;break;case"INTERNAL_STANDARD":case 6:t.reactionRole=6;break;case"AUTHENTIC_STANDARD":case 7:t.reactionRole=7;break;case"PRODUCT":case 8:t.reactionRole=8;break;case"BYPRODUCT":case 9:t.reactionRole=9;break;case"SIDE_PRODUCT":case 10:t.reactionRole=10}if(null!=e.isLimiting&&(t.isLimiting=Boolean(e.isLimiting)),e.preparations){if(!Array.isArray(e.preparations))throw TypeError(".ord.Compound.preparations: array expected");t.preparations=[];for(let n=0;n<e.preparations.length;++n){if("object"!=typeof e.preparations[n])throw TypeError(".ord.Compound.preparations: object expected");t.preparations[n]=i.ord.CompoundPreparation.fromObject(e.preparations[n])}}if(null!=e.source){if("object"!=typeof e.source)throw TypeError(".ord.Compound.source: object expected");t.source=i.ord.Compound.Source.fromObject(e.source)}if(e.features){if("object"!=typeof e.features)throw TypeError(".ord.Compound.features: object expected");t.features={};for(let n=Object.keys(e.features),r=0;r<n.length;++r){if("object"!=typeof e.features[n[r]])throw TypeError(".ord.Compound.features: object expected");t.features[n[r]]=i.ord.Data.fromObject(e.features[n[r]])}}if(e.analyses){if("object"!=typeof e.analyses)throw TypeError(".ord.Compound.analyses: object expected");t.analyses={};for(let n=Object.keys(e.analyses),r=0;r<n.length;++r){if("object"!=typeof e.analyses[n[r]])throw TypeError(".ord.Compound.analyses: object expected");t.analyses[n[r]]=i.ord.Analysis.fromObject(e.analyses[n[r]])}}if(null!=e.texture){if("object"!=typeof e.texture)throw TypeError(".ord.Compound.texture: object expected");t.texture=i.ord.Texture.fromObject(e.texture)}return t},n.toObject=function(e,t){t||(t={});let n,r={};if((t.arrays||t.defaults)&&(r.identifiers=[],r.preparations=[]),(t.objects||t.defaults)&&(r.features={},r.analyses={}),t.defaults&&(r.amount=null,r.reactionRole=t.enums===String?"UNSPECIFIED":0,r.source=null,r.texture=null),e.identifiers&&e.identifiers.length){r.identifiers=[];for(let n=0;n<e.identifiers.length;++n)r.identifiers[n]=i.ord.CompoundIdentifier.toObject(e.identifiers[n],t)}if(null!=e.amount&&e.hasOwnProperty("amount")&&(r.amount=i.ord.Amount.toObject(e.amount,t)),null!=e.reactionRole&&e.hasOwnProperty("reactionRole")&&(r.reactionRole=t.enums===String?void 0===i.ord.ReactionRole.ReactionRoleType[e.reactionRole]?e.reactionRole:i.ord.ReactionRole.ReactionRoleType[e.reactionRole]:e.reactionRole),null!=e.isLimiting&&e.hasOwnProperty("isLimiting")&&(r.isLimiting=e.isLimiting,t.oneofs&&(r._isLimiting="isLimiting")),e.preparations&&e.preparations.length){r.preparations=[];for(let n=0;n<e.preparations.length;++n)r.preparations[n]=i.ord.CompoundPreparation.toObject(e.preparations[n],t)}if(null!=e.source&&e.hasOwnProperty("source")&&(r.source=i.ord.Compound.Source.toObject(e.source,t)),e.features&&(n=Object.keys(e.features)).length){r.features={};for(let o=0;o<n.length;++o)r.features[n[o]]=i.ord.Data.toObject(e.features[n[o]],t)}if(e.analyses&&(n=Object.keys(e.analyses)).length){r.analyses={};for(let o=0;o<n.length;++o)r.analyses[n[o]]=i.ord.Analysis.toObject(e.analyses[n[o]],t)}return null!=e.texture&&e.hasOwnProperty("texture")&&(r.texture=i.ord.Texture.toObject(e.texture,t)),r},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Compound"},n.Source=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.vendor="",n.prototype.catalogId="",n.prototype.lot="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.vendor&&Object.hasOwnProperty.call(e,"vendor")&&t.uint32(10).string(e.vendor),null!=e.catalogId&&Object.hasOwnProperty.call(e,"catalogId")&&t.uint32(18).string(e.catalogId),null!=e.lot&&Object.hasOwnProperty.call(e,"lot")&&t.uint32(26).string(e.lot),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Compound.Source;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.vendor=e.string();break;case 2:o.catalogId=e.string();break;case 3:o.lot=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.vendor&&e.hasOwnProperty("vendor")&&!o.isString(e.vendor)?"vendor: string expected":null!=e.catalogId&&e.hasOwnProperty("catalogId")&&!o.isString(e.catalogId)?"catalogId: string expected":null!=e.lot&&e.hasOwnProperty("lot")&&!o.isString(e.lot)?"lot: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.Compound.Source)return e;let t=new i.ord.Compound.Source;return null!=e.vendor&&(t.vendor=String(e.vendor)),null!=e.catalogId&&(t.catalogId=String(e.catalogId)),null!=e.lot&&(t.lot=String(e.lot)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.vendor="",n.catalogId="",n.lot=""),null!=e.vendor&&e.hasOwnProperty("vendor")&&(n.vendor=e.vendor),null!=e.catalogId&&e.hasOwnProperty("catalogId")&&(n.catalogId=e.catalogId),null!=e.lot&&e.hasOwnProperty("lot")&&(n.lot=e.lot),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Compound.Source"},n}(),n}(),n.ReactionRole=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionRole;for(;e.pos<r;){let t=e.uint32();e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){return"object"!=typeof e||null===e?"object expected":null},n.fromObject=function(e){return e instanceof i.ord.ReactionRole?e:new i.ord.ReactionRole},n.toObject=function(){return{}},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionRole"},n.ReactionRoleType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="REACTANT"]=1,t[e[2]="REAGENT"]=2,t[e[3]="SOLVENT"]=3,t[e[4]="CATALYST"]=4,t[e[5]="WORKUP"]=5,t[e[6]="INTERNAL_STANDARD"]=6,t[e[7]="AUTHENTIC_STANDARD"]=7,t[e[8]="PRODUCT"]=8,t[e[9]="BYPRODUCT"]=9,t[e[10]="SIDE_PRODUCT"]=10,t}(),n}(),n.CompoundPreparation=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.reactionId="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.reactionId&&Object.hasOwnProperty.call(e,"reactionId")&&t.uint32(26).string(e.reactionId),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.CompoundPreparation;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.reactionId=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null!=e.reactionId&&e.hasOwnProperty("reactionId")&&!o.isString(e.reactionId)?"reactionId: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.CompoundPreparation)return e;let t=new i.ord.CompoundPreparation;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"NONE":case 2:t.type=2;break;case"REPURIFIED":case 3:t.type=3;break;case"SPARGED":case 4:t.type=4;break;case"DRIED":case 5:t.type=5;break;case"SYNTHESIZED":case 6:t.type=6}return null!=e.details&&(t.details=String(e.details)),null!=e.reactionId&&(t.reactionId=String(e.reactionId)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.reactionId=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.CompoundPreparation.CompoundPreparationType[e.type]?e.type:i.ord.CompoundPreparation.CompoundPreparationType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.reactionId&&e.hasOwnProperty("reactionId")&&(n.reactionId=e.reactionId),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.CompoundPreparation"},n.CompoundPreparationType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="NONE"]=2,t[e[3]="REPURIFIED"]=3,t[e[4]="SPARGED"]=4,t[e[5]="DRIED"]=5,t[e[6]="SYNTHESIZED"]=6,t}(),n}(),n.CompoundIdentifier=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.value="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(26).string(e.value),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.CompoundIdentifier;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.value=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null!=e.value&&e.hasOwnProperty("value")&&!o.isString(e.value)?"value: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.CompoundIdentifier)return e;let t=new i.ord.CompoundIdentifier;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"SMILES":case 2:t.type=2;break;case"INCHI":case 3:t.type=3;break;case"MOLBLOCK":case 4:t.type=4;break;case"IUPAC_NAME":case 5:t.type=5;break;case"NAME":case 6:t.type=6;break;case"CAS_NUMBER":case 7:t.type=7;break;case"PUBCHEM_CID":case 8:t.type=8;break;case"CHEMSPIDER_ID":case 9:t.type=9;break;case"CXSMILES":case 10:t.type=10;break;case"INCHI_KEY":case 11:t.type=11;break;case"XYZ":case 12:t.type=12;break;case"UNIPROT_ID":case 13:t.type=13;break;case"PDB_ID":case 14:t.type=14;break;case"AMINO_ACID_SEQUENCE":case 15:t.type=15;break;case"HELM":case 16:t.type=16;break;case"MDL":case 17:t.type=17}return null!=e.details&&(t.details=String(e.details)),null!=e.value&&(t.value=String(e.value)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.value=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.CompoundIdentifier.CompoundIdentifierType[e.type]?e.type:i.ord.CompoundIdentifier.CompoundIdentifierType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.value&&e.hasOwnProperty("value")&&(n.value=e.value),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.CompoundIdentifier"},n.CompoundIdentifierType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="SMILES"]=2,t[e[3]="INCHI"]=3,t[e[4]="MOLBLOCK"]=4,t[e[5]="IUPAC_NAME"]=5,t[e[6]="NAME"]=6,t[e[7]="CAS_NUMBER"]=7,t[e[8]="PUBCHEM_CID"]=8,t[e[9]="CHEMSPIDER_ID"]=9,t[e[10]="CXSMILES"]=10,t[e[11]="INCHI_KEY"]=11,t[e[12]="XYZ"]=12,t[e[13]="UNIPROT_ID"]=13,t[e[14]="PDB_ID"]=14,t[e[15]="AMINO_ACID_SEQUENCE"]=15,t[e[16]="HELM"]=16,t[e[17]="MDL"]=17,t}(),n}(),n.Vessel=function(){function n(e){if(this.preparations=[],this.attachments=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.material=null,n.prototype.preparations=o.emptyArray,n.prototype.attachments=o.emptyArray,n.prototype.volume=null,n.prototype.vesselId="",n.prototype.position="",n.prototype.row="",n.prototype.col="",n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.material&&Object.hasOwnProperty.call(e,"material")&&i.ord.VesselMaterial.encode(e.material,t.uint32(26).fork()).ldelim(),null!=e.preparations&&e.preparations.length)for(let n=0;n<e.preparations.length;++n)i.ord.VesselPreparation.encode(e.preparations[n],t.uint32(34).fork()).ldelim();if(null!=e.attachments&&e.attachments.length)for(let n=0;n<e.attachments.length;++n)i.ord.VesselAttachment.encode(e.attachments[n],t.uint32(42).fork()).ldelim();return null!=e.volume&&Object.hasOwnProperty.call(e,"volume")&&i.ord.Volume.encode(e.volume,t.uint32(50).fork()).ldelim(),null!=e.vesselId&&Object.hasOwnProperty.call(e,"vesselId")&&t.uint32(58).string(e.vesselId),null!=e.position&&Object.hasOwnProperty.call(e,"position")&&t.uint32(66).string(e.position),null!=e.row&&Object.hasOwnProperty.call(e,"row")&&t.uint32(74).string(e.row),null!=e.col&&Object.hasOwnProperty.call(e,"col")&&t.uint32(82).string(e.col),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Vessel;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.material=i.ord.VesselMaterial.decode(e,e.uint32());break;case 4:o.preparations&&o.preparations.length||(o.preparations=[]),o.preparations.push(i.ord.VesselPreparation.decode(e,e.uint32()));break;case 5:o.attachments&&o.attachments.length||(o.attachments=[]),o.attachments.push(i.ord.VesselAttachment.decode(e,e.uint32()));break;case 6:o.volume=i.ord.Volume.decode(e,e.uint32());break;case 7:o.vesselId=e.string();break;case 8:o.position=e.string();break;case 9:o.row=e.string();break;case 10:o.col=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.material&&e.hasOwnProperty("material")){let t=i.ord.VesselMaterial.verify(e.material);if(t)return"material."+t}if(null!=e.preparations&&e.hasOwnProperty("preparations")){if(!Array.isArray(e.preparations))return"preparations: array expected";for(let t=0;t<e.preparations.length;++t){let n=i.ord.VesselPreparation.verify(e.preparations[t]);if(n)return"preparations."+n}}if(null!=e.attachments&&e.hasOwnProperty("attachments")){if(!Array.isArray(e.attachments))return"attachments: array expected";for(let t=0;t<e.attachments.length;++t){let n=i.ord.VesselAttachment.verify(e.attachments[t]);if(n)return"attachments."+n}}if(null!=e.volume&&e.hasOwnProperty("volume")){let t=i.ord.Volume.verify(e.volume);if(t)return"volume."+t}return null!=e.vesselId&&e.hasOwnProperty("vesselId")&&!o.isString(e.vesselId)?"vesselId: string expected":null!=e.position&&e.hasOwnProperty("position")&&!o.isString(e.position)?"position: string expected":null!=e.row&&e.hasOwnProperty("row")&&!o.isString(e.row)?"row: string expected":null!=e.col&&e.hasOwnProperty("col")&&!o.isString(e.col)?"col: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.Vessel)return e;let t=new i.ord.Vessel;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"ROUND_BOTTOM_FLASK":case 2:t.type=2;break;case"VIAL":case 3:t.type=3;break;case"WELL_PLATE":case 4:t.type=4;break;case"MICROWAVE_VIAL":case 5:t.type=5;break;case"TUBE":case 6:t.type=6;break;case"CONTINUOUS_STIRRED_TANK_REACTOR":case 7:t.type=7;break;case"PACKED_BED_REACTOR":case 8:t.type=8;break;case"NMR_TUBE":case 9:t.type=9;break;case"PRESSURE_FLASK":case 10:t.type=10;break;case"PRESSURE_REACTOR":case 11:t.type=11;break;case"ELECTROCHEMICAL_CELL":case 12:t.type=12}if(null!=e.details&&(t.details=String(e.details)),null!=e.material){if("object"!=typeof e.material)throw TypeError(".ord.Vessel.material: object expected");t.material=i.ord.VesselMaterial.fromObject(e.material)}if(e.preparations){if(!Array.isArray(e.preparations))throw TypeError(".ord.Vessel.preparations: array expected");t.preparations=[];for(let n=0;n<e.preparations.length;++n){if("object"!=typeof e.preparations[n])throw TypeError(".ord.Vessel.preparations: object expected");t.preparations[n]=i.ord.VesselPreparation.fromObject(e.preparations[n])}}if(e.attachments){if(!Array.isArray(e.attachments))throw TypeError(".ord.Vessel.attachments: array expected");t.attachments=[];for(let n=0;n<e.attachments.length;++n){if("object"!=typeof e.attachments[n])throw TypeError(".ord.Vessel.attachments: object expected");t.attachments[n]=i.ord.VesselAttachment.fromObject(e.attachments[n])}}if(null!=e.volume){if("object"!=typeof e.volume)throw TypeError(".ord.Vessel.volume: object expected");t.volume=i.ord.Volume.fromObject(e.volume)}return null!=e.vesselId&&(t.vesselId=String(e.vesselId)),null!=e.position&&(t.position=String(e.position)),null!=e.row&&(t.row=String(e.row)),null!=e.col&&(t.col=String(e.col)),t},n.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.preparations=[],n.attachments=[]),t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.material=null,n.volume=null,n.vesselId="",n.position="",n.row="",n.col=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.Vessel.VesselType[e.type]?e.type:i.ord.Vessel.VesselType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.material&&e.hasOwnProperty("material")&&(n.material=i.ord.VesselMaterial.toObject(e.material,t)),e.preparations&&e.preparations.length){n.preparations=[];for(let r=0;r<e.preparations.length;++r)n.preparations[r]=i.ord.VesselPreparation.toObject(e.preparations[r],t)}if(e.attachments&&e.attachments.length){n.attachments=[];for(let r=0;r<e.attachments.length;++r)n.attachments[r]=i.ord.VesselAttachment.toObject(e.attachments[r],t)}return null!=e.volume&&e.hasOwnProperty("volume")&&(n.volume=i.ord.Volume.toObject(e.volume,t)),null!=e.vesselId&&e.hasOwnProperty("vesselId")&&(n.vesselId=e.vesselId),null!=e.position&&e.hasOwnProperty("position")&&(n.position=e.position),null!=e.row&&e.hasOwnProperty("row")&&(n.row=e.row),null!=e.col&&e.hasOwnProperty("col")&&(n.col=e.col),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Vessel"},n.VesselType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="ROUND_BOTTOM_FLASK"]=2,t[e[3]="VIAL"]=3,t[e[4]="WELL_PLATE"]=4,t[e[5]="MICROWAVE_VIAL"]=5,t[e[6]="TUBE"]=6,t[e[7]="CONTINUOUS_STIRRED_TANK_REACTOR"]=7,t[e[8]="PACKED_BED_REACTOR"]=8,t[e[9]="NMR_TUBE"]=9,t[e[10]="PRESSURE_FLASK"]=10,t[e[11]="PRESSURE_REACTOR"]=11,t[e[12]="ELECTROCHEMICAL_CELL"]=12,t}(),n}(),n.VesselMaterial=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.VesselMaterial;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.VesselMaterial)return e;let t=new i.ord.VesselMaterial;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"GLASS":case 2:t.type=2;break;case"POLYPROPYLENE":case 3:t.type=3;break;case"PLASTIC":case 4:t.type=4;break;case"METAL":case 5:t.type=5;break;case"QUARTZ":case 6:t.type=6}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.VesselMaterial.VesselMaterialType[e.type]?e.type:i.ord.VesselMaterial.VesselMaterialType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.VesselMaterial"},n.VesselMaterialType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="GLASS"]=2,t[e[3]="POLYPROPYLENE"]=3,t[e[4]="PLASTIC"]=4,t[e[5]="METAL"]=5,t[e[6]="QUARTZ"]=6,t}(),n}(),n.VesselAttachment=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.VesselAttachment;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.VesselAttachment)return e;let t=new i.ord.VesselAttachment;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"NONE":case 1:t.type=1;break;case"CUSTOM":case 2:t.type=2;break;case"SEPTUM":case 3:t.type=3;break;case"CAP":case 4:t.type=4;break;case"MAT":case 5:t.type=5;break;case"REFLUX_CONDENSER":case 6:t.type=6;break;case"VENT_NEEDLE":case 7:t.type=7;break;case"DEAN_STARK":case 8:t.type=8;break;case"VACUUM_TUBE":case 9:t.type=9;break;case"ADDITION_FUNNEL":case 10:t.type=10;break;case"DRYING_TUBE":case 11:t.type=11;break;case"ALUMINUM_FOIL":case 12:t.type=12;break;case"THERMOCOUPLE":case 13:t.type=13;break;case"BALLOON":case 14:t.type=14;break;case"GAS_ADAPTER":case 15:t.type=15;break;case"PRESSURE_REGULATOR":case 16:t.type=16;break;case"RELEASE_VALVE":case 17:t.type=17}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.VesselAttachment.VesselAttachmentType[e.type]?e.type:i.ord.VesselAttachment.VesselAttachmentType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.VesselAttachment"},n.VesselAttachmentType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="NONE"]=1,t[e[2]="CUSTOM"]=2,t[e[3]="SEPTUM"]=3,t[e[4]="CAP"]=4,t[e[5]="MAT"]=5,t[e[6]="REFLUX_CONDENSER"]=6,t[e[7]="VENT_NEEDLE"]=7,t[e[8]="DEAN_STARK"]=8,t[e[9]="VACUUM_TUBE"]=9,t[e[10]="ADDITION_FUNNEL"]=10,t[e[11]="DRYING_TUBE"]=11,t[e[12]="ALUMINUM_FOIL"]=12,t[e[13]="THERMOCOUPLE"]=13,t[e[14]="BALLOON"]=14,t[e[15]="GAS_ADAPTER"]=15,t[e[16]="PRESSURE_REGULATOR"]=16,t[e[17]="RELEASE_VALVE"]=17,t}(),n}(),n.VesselPreparation=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.VesselPreparation;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.VesselPreparation)return e;let t=new i.ord.VesselPreparation;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"NONE":case 2:t.type=2;break;case"OVEN_DRIED":case 3:t.type=3;break;case"FLAME_DRIED":case 4:t.type=4;break;case"EVACUATED_BACKFILLED":case 5:t.type=5;break;case"PURGED":case 6:t.type=6}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.VesselPreparation.VesselPreparationType[e.type]?e.type:i.ord.VesselPreparation.VesselPreparationType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.VesselPreparation"},n.VesselPreparationType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="NONE"]=2,t[e[3]="OVEN_DRIED"]=3,t[e[4]="FLAME_DRIED"]=4,t[e[5]="EVACUATED_BACKFILLED"]=5,t[e[6]="PURGED"]=6,t}(),n}(),n.ReactionSetup=function(){function n(e){if(this.automationCode={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.vessel=null,n.prototype.isAutomated=null,n.prototype.automationPlatform="",n.prototype.automationCode=o.emptyObject,n.prototype.environment=null,Object.defineProperty(n.prototype,"_isAutomated",{get:o.oneOfGetter(s=["isAutomated"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.vessel&&Object.hasOwnProperty.call(e,"vessel")&&i.ord.Vessel.encode(e.vessel,t.uint32(10).fork()).ldelim(),null!=e.isAutomated&&Object.hasOwnProperty.call(e,"isAutomated")&&t.uint32(16).bool(e.isAutomated),null!=e.automationPlatform&&Object.hasOwnProperty.call(e,"automationPlatform")&&t.uint32(26).string(e.automationPlatform),null!=e.automationCode&&Object.hasOwnProperty.call(e,"automationCode"))for(let n=Object.keys(e.automationCode),r=0;r<n.length;++r)t.uint32(34).fork().uint32(10).string(n[r]),i.ord.Data.encode(e.automationCode[n[r]],t.uint32(18).fork()).ldelim().ldelim();return null!=e.environment&&Object.hasOwnProperty.call(e,"environment")&&i.ord.ReactionSetup.ReactionEnvironment.encode(e.environment,t.uint32(42).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r,s,a=void 0===n?e.len:e.pos+n,l=new i.ord.ReactionSetup;for(;e.pos<a;){let t=e.uint32();switch(t>>>3){case 1:l.vessel=i.ord.Vessel.decode(e,e.uint32());break;case 2:l.isAutomated=e.bool();break;case 3:l.automationPlatform=e.string();break;case 4:{l.automationCode===o.emptyObject&&(l.automationCode={});let t=e.uint32()+e.pos;for(r="",s=null;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=i.ord.Data.decode(e,e.uint32());break;default:e.skipType(7&t)}}l.automationCode[r]=s;break}case 5:l.environment=i.ord.ReactionSetup.ReactionEnvironment.decode(e,e.uint32());break;default:e.skipType(7&t)}}return l},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.vessel&&e.hasOwnProperty("vessel")){let t=i.ord.Vessel.verify(e.vessel);if(t)return"vessel."+t}if(null!=e.isAutomated&&e.hasOwnProperty("isAutomated")&&"boolean"!=typeof e.isAutomated)return"isAutomated: boolean expected";if(null!=e.automationPlatform&&e.hasOwnProperty("automationPlatform")&&!o.isString(e.automationPlatform))return"automationPlatform: string expected";if(null!=e.automationCode&&e.hasOwnProperty("automationCode")){if(!o.isObject(e.automationCode))return"automationCode: object expected";let t=Object.keys(e.automationCode);for(let n=0;n<t.length;++n){let r=i.ord.Data.verify(e.automationCode[t[n]]);if(r)return"automationCode."+r}}if(null!=e.environment&&e.hasOwnProperty("environment")){let t=i.ord.ReactionSetup.ReactionEnvironment.verify(e.environment);if(t)return"environment."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.ReactionSetup)return e;let t=new i.ord.ReactionSetup;if(null!=e.vessel){if("object"!=typeof e.vessel)throw TypeError(".ord.ReactionSetup.vessel: object expected");t.vessel=i.ord.Vessel.fromObject(e.vessel)}if(null!=e.isAutomated&&(t.isAutomated=Boolean(e.isAutomated)),null!=e.automationPlatform&&(t.automationPlatform=String(e.automationPlatform)),e.automationCode){if("object"!=typeof e.automationCode)throw TypeError(".ord.ReactionSetup.automationCode: object expected");t.automationCode={};for(let n=Object.keys(e.automationCode),r=0;r<n.length;++r){if("object"!=typeof e.automationCode[n[r]])throw TypeError(".ord.ReactionSetup.automationCode: object expected");t.automationCode[n[r]]=i.ord.Data.fromObject(e.automationCode[n[r]])}}if(null!=e.environment){if("object"!=typeof e.environment)throw TypeError(".ord.ReactionSetup.environment: object expected");t.environment=i.ord.ReactionSetup.ReactionEnvironment.fromObject(e.environment)}return t},n.toObject=function(e,t){t||(t={});let n,r={};if((t.objects||t.defaults)&&(r.automationCode={}),t.defaults&&(r.vessel=null,r.automationPlatform="",r.environment=null),null!=e.vessel&&e.hasOwnProperty("vessel")&&(r.vessel=i.ord.Vessel.toObject(e.vessel,t)),null!=e.isAutomated&&e.hasOwnProperty("isAutomated")&&(r.isAutomated=e.isAutomated,t.oneofs&&(r._isAutomated="isAutomated")),null!=e.automationPlatform&&e.hasOwnProperty("automationPlatform")&&(r.automationPlatform=e.automationPlatform),e.automationCode&&(n=Object.keys(e.automationCode)).length){r.automationCode={};for(let o=0;o<n.length;++o)r.automationCode[n[o]]=i.ord.Data.toObject(e.automationCode[n[o]],t)}return null!=e.environment&&e.hasOwnProperty("environment")&&(r.environment=i.ord.ReactionSetup.ReactionEnvironment.toObject(e.environment,t)),r},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionSetup"},n.ReactionEnvironment=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionSetup.ReactionEnvironment;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.ReactionSetup.ReactionEnvironment)return e;let t=new i.ord.ReactionSetup.ReactionEnvironment;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"FUME_HOOD":case 2:t.type=2;break;case"BENCH_TOP":case 3:t.type=3;break;case"GLOVE_BOX":case 4:t.type=4;break;case"GLOVE_BAG":case 5:t.type=5}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ReactionSetup.ReactionEnvironment.ReactionEnvironmentType[e.type]?e.type:i.ord.ReactionSetup.ReactionEnvironment.ReactionEnvironmentType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionSetup.ReactionEnvironment"},n.ReactionEnvironmentType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="FUME_HOOD"]=2,t[e[3]="BENCH_TOP"]=3,t[e[4]="GLOVE_BOX"]=4,t[e[5]="GLOVE_BAG"]=5,t}(),n}(),n}(),n.ReactionConditions=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.temperature=null,n.prototype.pressure=null,n.prototype.stirring=null,n.prototype.illumination=null,n.prototype.electrochemistry=null,n.prototype.flow=null,n.prototype.reflux=null,n.prototype.ph=null,n.prototype.conditionsAreDynamic=null,n.prototype.details="",Object.defineProperty(n.prototype,"_reflux",{get:o.oneOfGetter(s=["reflux"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_ph",{get:o.oneOfGetter(s=["ph"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_conditionsAreDynamic",{get:o.oneOfGetter(s=["conditionsAreDynamic"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.temperature&&Object.hasOwnProperty.call(e,"temperature")&&i.ord.TemperatureConditions.encode(e.temperature,t.uint32(10).fork()).ldelim(),null!=e.pressure&&Object.hasOwnProperty.call(e,"pressure")&&i.ord.PressureConditions.encode(e.pressure,t.uint32(18).fork()).ldelim(),null!=e.stirring&&Object.hasOwnProperty.call(e,"stirring")&&i.ord.StirringConditions.encode(e.stirring,t.uint32(26).fork()).ldelim(),null!=e.illumination&&Object.hasOwnProperty.call(e,"illumination")&&i.ord.IlluminationConditions.encode(e.illumination,t.uint32(34).fork()).ldelim(),null!=e.electrochemistry&&Object.hasOwnProperty.call(e,"electrochemistry")&&i.ord.ElectrochemistryConditions.encode(e.electrochemistry,t.uint32(42).fork()).ldelim(),null!=e.flow&&Object.hasOwnProperty.call(e,"flow")&&i.ord.FlowConditions.encode(e.flow,t.uint32(50).fork()).ldelim(),null!=e.reflux&&Object.hasOwnProperty.call(e,"reflux")&&t.uint32(56).bool(e.reflux),null!=e.ph&&Object.hasOwnProperty.call(e,"ph")&&t.uint32(69).float(e.ph),null!=e.conditionsAreDynamic&&Object.hasOwnProperty.call(e,"conditionsAreDynamic")&&t.uint32(72).bool(e.conditionsAreDynamic),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(82).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionConditions;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.temperature=i.ord.TemperatureConditions.decode(e,e.uint32());break;case 2:o.pressure=i.ord.PressureConditions.decode(e,e.uint32());break;case 3:o.stirring=i.ord.StirringConditions.decode(e,e.uint32());break;case 4:o.illumination=i.ord.IlluminationConditions.decode(e,e.uint32());break;case 5:o.electrochemistry=i.ord.ElectrochemistryConditions.decode(e,e.uint32());break;case 6:o.flow=i.ord.FlowConditions.decode(e,e.uint32());break;case 7:o.reflux=e.bool();break;case 8:o.ph=e.float();break;case 9:o.conditionsAreDynamic=e.bool();break;case 10:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.temperature&&e.hasOwnProperty("temperature")){let t=i.ord.TemperatureConditions.verify(e.temperature);if(t)return"temperature."+t}if(null!=e.pressure&&e.hasOwnProperty("pressure")){let t=i.ord.PressureConditions.verify(e.pressure);if(t)return"pressure."+t}if(null!=e.stirring&&e.hasOwnProperty("stirring")){let t=i.ord.StirringConditions.verify(e.stirring);if(t)return"stirring."+t}if(null!=e.illumination&&e.hasOwnProperty("illumination")){let t=i.ord.IlluminationConditions.verify(e.illumination);if(t)return"illumination."+t}if(null!=e.electrochemistry&&e.hasOwnProperty("electrochemistry")){let t=i.ord.ElectrochemistryConditions.verify(e.electrochemistry);if(t)return"electrochemistry."+t}if(null!=e.flow&&e.hasOwnProperty("flow")){let t=i.ord.FlowConditions.verify(e.flow);if(t)return"flow."+t}return null!=e.reflux&&e.hasOwnProperty("reflux")&&(t._reflux=1,"boolean"!=typeof e.reflux)?"reflux: boolean expected":null!=e.ph&&e.hasOwnProperty("ph")&&(t._ph=1,"number"!=typeof e.ph)?"ph: number expected":null!=e.conditionsAreDynamic&&e.hasOwnProperty("conditionsAreDynamic")&&(t._conditionsAreDynamic=1,"boolean"!=typeof e.conditionsAreDynamic)?"conditionsAreDynamic: boolean expected":null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.ReactionConditions)return e;let t=new i.ord.ReactionConditions;if(null!=e.temperature){if("object"!=typeof e.temperature)throw TypeError(".ord.ReactionConditions.temperature: object expected");t.temperature=i.ord.TemperatureConditions.fromObject(e.temperature)}if(null!=e.pressure){if("object"!=typeof e.pressure)throw TypeError(".ord.ReactionConditions.pressure: object expected");t.pressure=i.ord.PressureConditions.fromObject(e.pressure)}if(null!=e.stirring){if("object"!=typeof e.stirring)throw TypeError(".ord.ReactionConditions.stirring: object expected");t.stirring=i.ord.StirringConditions.fromObject(e.stirring)}if(null!=e.illumination){if("object"!=typeof e.illumination)throw TypeError(".ord.ReactionConditions.illumination: object expected");t.illumination=i.ord.IlluminationConditions.fromObject(e.illumination)}if(null!=e.electrochemistry){if("object"!=typeof e.electrochemistry)throw TypeError(".ord.ReactionConditions.electrochemistry: object expected");t.electrochemistry=i.ord.ElectrochemistryConditions.fromObject(e.electrochemistry)}if(null!=e.flow){if("object"!=typeof e.flow)throw TypeError(".ord.ReactionConditions.flow: object expected");t.flow=i.ord.FlowConditions.fromObject(e.flow)}return null!=e.reflux&&(t.reflux=Boolean(e.reflux)),null!=e.ph&&(t.ph=Number(e.ph)),null!=e.conditionsAreDynamic&&(t.conditionsAreDynamic=Boolean(e.conditionsAreDynamic)),null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.temperature=null,n.pressure=null,n.stirring=null,n.illumination=null,n.electrochemistry=null,n.flow=null,n.details=""),null!=e.temperature&&e.hasOwnProperty("temperature")&&(n.temperature=i.ord.TemperatureConditions.toObject(e.temperature,t)),null!=e.pressure&&e.hasOwnProperty("pressure")&&(n.pressure=i.ord.PressureConditions.toObject(e.pressure,t)),null!=e.stirring&&e.hasOwnProperty("stirring")&&(n.stirring=i.ord.StirringConditions.toObject(e.stirring,t)),null!=e.illumination&&e.hasOwnProperty("illumination")&&(n.illumination=i.ord.IlluminationConditions.toObject(e.illumination,t)),null!=e.electrochemistry&&e.hasOwnProperty("electrochemistry")&&(n.electrochemistry=i.ord.ElectrochemistryConditions.toObject(e.electrochemistry,t)),null!=e.flow&&e.hasOwnProperty("flow")&&(n.flow=i.ord.FlowConditions.toObject(e.flow,t)),null!=e.reflux&&e.hasOwnProperty("reflux")&&(n.reflux=e.reflux,t.oneofs&&(n._reflux="reflux")),null!=e.ph&&e.hasOwnProperty("ph")&&(n.ph=t.json&&!isFinite(e.ph)?String(e.ph):e.ph,t.oneofs&&(n._ph="ph")),null!=e.conditionsAreDynamic&&e.hasOwnProperty("conditionsAreDynamic")&&(n.conditionsAreDynamic=e.conditionsAreDynamic,t.oneofs&&(n._conditionsAreDynamic="conditionsAreDynamic")),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionConditions"},n}(),n.TemperatureConditions=function(){function n(e){if(this.measurements=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.control=null,n.prototype.setpoint=null,n.prototype.measurements=o.emptyArray,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.control&&Object.hasOwnProperty.call(e,"control")&&i.ord.TemperatureConditions.TemperatureControl.encode(e.control,t.uint32(10).fork()).ldelim(),null!=e.setpoint&&Object.hasOwnProperty.call(e,"setpoint")&&i.ord.Temperature.encode(e.setpoint,t.uint32(18).fork()).ldelim(),null!=e.measurements&&e.measurements.length)for(let n=0;n<e.measurements.length;++n)i.ord.TemperatureConditions.TemperatureMeasurement.encode(e.measurements[n],t.uint32(26).fork()).ldelim();return t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.TemperatureConditions;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.control=i.ord.TemperatureConditions.TemperatureControl.decode(e,e.uint32());break;case 2:o.setpoint=i.ord.Temperature.decode(e,e.uint32());break;case 3:o.measurements&&o.measurements.length||(o.measurements=[]),o.measurements.push(i.ord.TemperatureConditions.TemperatureMeasurement.decode(e,e.uint32()));break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.control&&e.hasOwnProperty("control")){let t=i.ord.TemperatureConditions.TemperatureControl.verify(e.control);if(t)return"control."+t}if(null!=e.setpoint&&e.hasOwnProperty("setpoint")){let t=i.ord.Temperature.verify(e.setpoint);if(t)return"setpoint."+t}if(null!=e.measurements&&e.hasOwnProperty("measurements")){if(!Array.isArray(e.measurements))return"measurements: array expected";for(let t=0;t<e.measurements.length;++t){let n=i.ord.TemperatureConditions.TemperatureMeasurement.verify(e.measurements[t]);if(n)return"measurements."+n}}return null},n.fromObject=function(e){if(e instanceof i.ord.TemperatureConditions)return e;let t=new i.ord.TemperatureConditions;if(null!=e.control){if("object"!=typeof e.control)throw TypeError(".ord.TemperatureConditions.control: object expected");t.control=i.ord.TemperatureConditions.TemperatureControl.fromObject(e.control)}if(null!=e.setpoint){if("object"!=typeof e.setpoint)throw TypeError(".ord.TemperatureConditions.setpoint: object expected");t.setpoint=i.ord.Temperature.fromObject(e.setpoint)}if(e.measurements){if(!Array.isArray(e.measurements))throw TypeError(".ord.TemperatureConditions.measurements: array expected");t.measurements=[];for(let n=0;n<e.measurements.length;++n){if("object"!=typeof e.measurements[n])throw TypeError(".ord.TemperatureConditions.measurements: object expected");t.measurements[n]=i.ord.TemperatureConditions.TemperatureMeasurement.fromObject(e.measurements[n])}}return t},n.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.measurements=[]),t.defaults&&(n.control=null,n.setpoint=null),null!=e.control&&e.hasOwnProperty("control")&&(n.control=i.ord.TemperatureConditions.TemperatureControl.toObject(e.control,t)),null!=e.setpoint&&e.hasOwnProperty("setpoint")&&(n.setpoint=i.ord.Temperature.toObject(e.setpoint,t)),e.measurements&&e.measurements.length){n.measurements=[];for(let r=0;r<e.measurements.length;++r)n.measurements[r]=i.ord.TemperatureConditions.TemperatureMeasurement.toObject(e.measurements[r],t)}return n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.TemperatureConditions"},n.TemperatureControl=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.TemperatureConditions.TemperatureControl;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.TemperatureConditions.TemperatureControl)return e;let t=new i.ord.TemperatureConditions.TemperatureControl;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"AMBIENT":case 2:t.type=2;break;case"OIL_BATH":case 3:t.type=3;break;case"WATER_BATH":case 4:t.type=4;break;case"SAND_BATH":case 5:t.type=5;break;case"ICE_BATH":case 6:t.type=6;break;case"DRY_ALUMINUM_PLATE":case 7:t.type=7;break;case"MICROWAVE":case 8:t.type=8;break;case"DRY_ICE_BATH":case 9:t.type=9;break;case"AIR_FAN":case 10:t.type=10;break;case"LIQUID_NITROGEN":case 11:t.type=11}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.TemperatureConditions.TemperatureControl.TemperatureControlType[e.type]?e.type:i.ord.TemperatureConditions.TemperatureControl.TemperatureControlType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.TemperatureConditions.TemperatureControl"},n.TemperatureControlType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="AMBIENT"]=2,t[e[3]="OIL_BATH"]=3,t[e[4]="WATER_BATH"]=4,t[e[5]="SAND_BATH"]=5,t[e[6]="ICE_BATH"]=6,t[e[7]="DRY_ALUMINUM_PLATE"]=7,t[e[8]="MICROWAVE"]=8,t[e[9]="DRY_ICE_BATH"]=9,t[e[10]="AIR_FAN"]=10,t[e[11]="LIQUID_NITROGEN"]=11,t}(),n}(),n.TemperatureMeasurement=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.time=null,n.prototype.temperature=null,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.time&&Object.hasOwnProperty.call(e,"time")&&i.ord.Time.encode(e.time,t.uint32(26).fork()).ldelim(),null!=e.temperature&&Object.hasOwnProperty.call(e,"temperature")&&i.ord.Temperature.encode(e.temperature,t.uint32(34).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.TemperatureConditions.TemperatureMeasurement;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.time=i.ord.Time.decode(e,e.uint32());break;case 4:o.temperature=i.ord.Temperature.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.time&&e.hasOwnProperty("time")){let t=i.ord.Time.verify(e.time);if(t)return"time."+t}if(null!=e.temperature&&e.hasOwnProperty("temperature")){let t=i.ord.Temperature.verify(e.temperature);if(t)return"temperature."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.TemperatureConditions.TemperatureMeasurement)return e;let t=new i.ord.TemperatureConditions.TemperatureMeasurement;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"THERMOCOUPLE_INTERNAL":case 2:t.type=2;break;case"THERMOCOUPLE_EXTERNAL":case 3:t.type=3;break;case"INFRARED":case 4:t.type=4}if(null!=e.details&&(t.details=String(e.details)),null!=e.time){if("object"!=typeof e.time)throw TypeError(".ord.TemperatureConditions.TemperatureMeasurement.time: object expected");t.time=i.ord.Time.fromObject(e.time)}if(null!=e.temperature){if("object"!=typeof e.temperature)throw TypeError(".ord.TemperatureConditions.TemperatureMeasurement.temperature: object expected");t.temperature=i.ord.Temperature.fromObject(e.temperature)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.time=null,n.temperature=null),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.TemperatureConditions.TemperatureMeasurement.TemperatureMeasurementType[e.type]?e.type:i.ord.TemperatureConditions.TemperatureMeasurement.TemperatureMeasurementType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.time&&e.hasOwnProperty("time")&&(n.time=i.ord.Time.toObject(e.time,t)),null!=e.temperature&&e.hasOwnProperty("temperature")&&(n.temperature=i.ord.Temperature.toObject(e.temperature,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.TemperatureConditions.TemperatureMeasurement"},n.TemperatureMeasurementType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="THERMOCOUPLE_INTERNAL"]=2,t[e[3]="THERMOCOUPLE_EXTERNAL"]=3,t[e[4]="INFRARED"]=4,t}(),n}(),n}(),n.PressureConditions=function(){function n(e){if(this.measurements=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.control=null,n.prototype.setpoint=null,n.prototype.atmosphere=null,n.prototype.measurements=o.emptyArray,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.control&&Object.hasOwnProperty.call(e,"control")&&i.ord.PressureConditions.PressureControl.encode(e.control,t.uint32(10).fork()).ldelim(),null!=e.setpoint&&Object.hasOwnProperty.call(e,"setpoint")&&i.ord.Pressure.encode(e.setpoint,t.uint32(18).fork()).ldelim(),null!=e.atmosphere&&Object.hasOwnProperty.call(e,"atmosphere")&&i.ord.PressureConditions.Atmosphere.encode(e.atmosphere,t.uint32(26).fork()).ldelim(),null!=e.measurements&&e.measurements.length)for(let n=0;n<e.measurements.length;++n)i.ord.PressureConditions.PressureMeasurement.encode(e.measurements[n],t.uint32(34).fork()).ldelim();return t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.PressureConditions;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.control=i.ord.PressureConditions.PressureControl.decode(e,e.uint32());break;case 2:o.setpoint=i.ord.Pressure.decode(e,e.uint32());break;case 3:o.atmosphere=i.ord.PressureConditions.Atmosphere.decode(e,e.uint32());break;case 4:o.measurements&&o.measurements.length||(o.measurements=[]),o.measurements.push(i.ord.PressureConditions.PressureMeasurement.decode(e,e.uint32()));break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.control&&e.hasOwnProperty("control")){let t=i.ord.PressureConditions.PressureControl.verify(e.control);if(t)return"control."+t}if(null!=e.setpoint&&e.hasOwnProperty("setpoint")){let t=i.ord.Pressure.verify(e.setpoint);if(t)return"setpoint."+t}if(null!=e.atmosphere&&e.hasOwnProperty("atmosphere")){let t=i.ord.PressureConditions.Atmosphere.verify(e.atmosphere);if(t)return"atmosphere."+t}if(null!=e.measurements&&e.hasOwnProperty("measurements")){if(!Array.isArray(e.measurements))return"measurements: array expected";for(let t=0;t<e.measurements.length;++t){let n=i.ord.PressureConditions.PressureMeasurement.verify(e.measurements[t]);if(n)return"measurements."+n}}return null},n.fromObject=function(e){if(e instanceof i.ord.PressureConditions)return e;let t=new i.ord.PressureConditions;if(null!=e.control){if("object"!=typeof e.control)throw TypeError(".ord.PressureConditions.control: object expected");t.control=i.ord.PressureConditions.PressureControl.fromObject(e.control)}if(null!=e.setpoint){if("object"!=typeof e.setpoint)throw TypeError(".ord.PressureConditions.setpoint: object expected");t.setpoint=i.ord.Pressure.fromObject(e.setpoint)}if(null!=e.atmosphere){if("object"!=typeof e.atmosphere)throw TypeError(".ord.PressureConditions.atmosphere: object expected");t.atmosphere=i.ord.PressureConditions.Atmosphere.fromObject(e.atmosphere)}if(e.measurements){if(!Array.isArray(e.measurements))throw TypeError(".ord.PressureConditions.measurements: array expected");t.measurements=[];for(let n=0;n<e.measurements.length;++n){if("object"!=typeof e.measurements[n])throw TypeError(".ord.PressureConditions.measurements: object expected");t.measurements[n]=i.ord.PressureConditions.PressureMeasurement.fromObject(e.measurements[n])}}return t},n.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.measurements=[]),t.defaults&&(n.control=null,n.setpoint=null,n.atmosphere=null),null!=e.control&&e.hasOwnProperty("control")&&(n.control=i.ord.PressureConditions.PressureControl.toObject(e.control,t)),null!=e.setpoint&&e.hasOwnProperty("setpoint")&&(n.setpoint=i.ord.Pressure.toObject(e.setpoint,t)),null!=e.atmosphere&&e.hasOwnProperty("atmosphere")&&(n.atmosphere=i.ord.PressureConditions.Atmosphere.toObject(e.atmosphere,t)),e.measurements&&e.measurements.length){n.measurements=[];for(let r=0;r<e.measurements.length;++r)n.measurements[r]=i.ord.PressureConditions.PressureMeasurement.toObject(e.measurements[r],t)}return n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.PressureConditions"},n.PressureControl=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.PressureConditions.PressureControl;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.PressureConditions.PressureControl)return e;let t=new i.ord.PressureConditions.PressureControl;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"AMBIENT":case 2:t.type=2;break;case"SLIGHT_POSITIVE":case 3:t.type=3;break;case"SEALED":case 4:t.type=4;break;case"PRESSURIZED":case 5:t.type=5}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.PressureConditions.PressureControl.PressureControlType[e.type]?e.type:i.ord.PressureConditions.PressureControl.PressureControlType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.PressureConditions.PressureControl"},n.PressureControlType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="AMBIENT"]=2,t[e[3]="SLIGHT_POSITIVE"]=3,t[e[4]="SEALED"]=4,t[e[5]="PRESSURIZED"]=5,t}(),n}(),n.Atmosphere=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.PressureConditions.Atmosphere;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.PressureConditions.Atmosphere)return e;let t=new i.ord.PressureConditions.Atmosphere;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"AIR":case 2:t.type=2;break;case"NITROGEN":case 3:t.type=3;break;case"ARGON":case 4:t.type=4;break;case"OXYGEN":case 5:t.type=5;break;case"HYDROGEN":case 6:t.type=6;break;case"CARBON_MONOXIDE":case 7:t.type=7;break;case"CARBON_DIOXIDE":case 8:t.type=8;break;case"METHANE":case 9:t.type=9;break;case"AMMONIA":case 10:t.type=10;break;case"OZONE":case 11:t.type=11;break;case"ETHYLENE":case 12:t.type=12;break;case"ACETYLENE":case 13:t.type=13}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.PressureConditions.Atmosphere.AtmosphereType[e.type]?e.type:i.ord.PressureConditions.Atmosphere.AtmosphereType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.PressureConditions.Atmosphere"},n.AtmosphereType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="AIR"]=2,t[e[3]="NITROGEN"]=3,t[e[4]="ARGON"]=4,t[e[5]="OXYGEN"]=5,t[e[6]="HYDROGEN"]=6,t[e[7]="CARBON_MONOXIDE"]=7,t[e[8]="CARBON_DIOXIDE"]=8,t[e[9]="METHANE"]=9,t[e[10]="AMMONIA"]=10,t[e[11]="OZONE"]=11,t[e[12]="ETHYLENE"]=12,t[e[13]="ACETYLENE"]=13,t}(),n}(),n.PressureMeasurement=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.time=null,n.prototype.pressure=null,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.time&&Object.hasOwnProperty.call(e,"time")&&i.ord.Time.encode(e.time,t.uint32(26).fork()).ldelim(),null!=e.pressure&&Object.hasOwnProperty.call(e,"pressure")&&i.ord.Pressure.encode(e.pressure,t.uint32(34).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.PressureConditions.PressureMeasurement;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.time=i.ord.Time.decode(e,e.uint32());break;case 4:o.pressure=i.ord.Pressure.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.time&&e.hasOwnProperty("time")){let t=i.ord.Time.verify(e.time);if(t)return"time."+t}if(null!=e.pressure&&e.hasOwnProperty("pressure")){let t=i.ord.Pressure.verify(e.pressure);if(t)return"pressure."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.PressureConditions.PressureMeasurement)return e;let t=new i.ord.PressureConditions.PressureMeasurement;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"PRESSURE_TRANSDUCER":case 2:t.type=2}if(null!=e.details&&(t.details=String(e.details)),null!=e.time){if("object"!=typeof e.time)throw TypeError(".ord.PressureConditions.PressureMeasurement.time: object expected");t.time=i.ord.Time.fromObject(e.time)}if(null!=e.pressure){if("object"!=typeof e.pressure)throw TypeError(".ord.PressureConditions.PressureMeasurement.pressure: object expected");t.pressure=i.ord.Pressure.fromObject(e.pressure)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.time=null,n.pressure=null),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.PressureConditions.PressureMeasurement.PressureMeasurementType[e.type]?e.type:i.ord.PressureConditions.PressureMeasurement.PressureMeasurementType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.time&&e.hasOwnProperty("time")&&(n.time=i.ord.Time.toObject(e.time,t)),null!=e.pressure&&e.hasOwnProperty("pressure")&&(n.pressure=i.ord.Pressure.toObject(e.pressure,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.PressureConditions.PressureMeasurement"},n.PressureMeasurementType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="PRESSURE_TRANSDUCER"]=2,t}(),n}(),n}(),n.StirringConditions=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.rate=null,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.rate&&Object.hasOwnProperty.call(e,"rate")&&i.ord.StirringConditions.StirringRate.encode(e.rate,t.uint32(26).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.StirringConditions;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.rate=i.ord.StirringConditions.StirringRate.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.rate&&e.hasOwnProperty("rate")){let t=i.ord.StirringConditions.StirringRate.verify(e.rate);if(t)return"rate."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.StirringConditions)return e;let t=new i.ord.StirringConditions;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"NONE":case 2:t.type=2;break;case"STIR_BAR":case 3:t.type=3;break;case"OVERHEAD_MIXER":case 4:t.type=4;break;case"AGITATION":case 5:t.type=5;break;case"BALL_MILLING":case 6:t.type=6;break;case"SONICATION":case 7:t.type=7}if(null!=e.details&&(t.details=String(e.details)),null!=e.rate){if("object"!=typeof e.rate)throw TypeError(".ord.StirringConditions.rate: object expected");t.rate=i.ord.StirringConditions.StirringRate.fromObject(e.rate)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.rate=null),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.StirringConditions.StirringMethodType[e.type]?e.type:i.ord.StirringConditions.StirringMethodType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.rate&&e.hasOwnProperty("rate")&&(n.rate=i.ord.StirringConditions.StirringRate.toObject(e.rate,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.StirringConditions"},n.StirringMethodType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="NONE"]=2,t[e[3]="STIR_BAR"]=3,t[e[4]="OVERHEAD_MIXER"]=4,t[e[5]="AGITATION"]=5,t[e[6]="BALL_MILLING"]=6,t[e[7]="SONICATION"]=7,t}(),n.StirringRate=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.rpm=0,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.rpm&&Object.hasOwnProperty.call(e,"rpm")&&t.uint32(24).int32(e.rpm),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.StirringConditions.StirringRate;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.rpm=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null!=e.rpm&&e.hasOwnProperty("rpm")&&!o.isInteger(e.rpm)?"rpm: integer expected":null},n.fromObject=function(e){if(e instanceof i.ord.StirringConditions.StirringRate)return e;let t=new i.ord.StirringConditions.StirringRate;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"HIGH":case 1:t.type=1;break;case"MEDIUM":case 2:t.type=2;break;case"LOW":case 3:t.type=3}return null!=e.details&&(t.details=String(e.details)),null!=e.rpm&&(t.rpm=0|e.rpm),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.rpm=0),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.StirringConditions.StirringRate.StirringRateType[e.type]?e.type:i.ord.StirringConditions.StirringRate.StirringRateType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.rpm&&e.hasOwnProperty("rpm")&&(n.rpm=e.rpm),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.StirringConditions.StirringRate"},n.StirringRateType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="HIGH"]=1,t[e[2]="MEDIUM"]=2,t[e[3]="LOW"]=3,t}(),n}(),n}(),n.IlluminationConditions=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.peakWavelength=null,n.prototype.color="",n.prototype.distanceToVessel=null,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.peakWavelength&&Object.hasOwnProperty.call(e,"peakWavelength")&&i.ord.Wavelength.encode(e.peakWavelength,t.uint32(26).fork()).ldelim(),null!=e.color&&Object.hasOwnProperty.call(e,"color")&&t.uint32(34).string(e.color),null!=e.distanceToVessel&&Object.hasOwnProperty.call(e,"distanceToVessel")&&i.ord.Length.encode(e.distanceToVessel,t.uint32(42).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.IlluminationConditions;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.peakWavelength=i.ord.Wavelength.decode(e,e.uint32());break;case 4:o.color=e.string();break;case 5:o.distanceToVessel=i.ord.Length.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.peakWavelength&&e.hasOwnProperty("peakWavelength")){let t=i.ord.Wavelength.verify(e.peakWavelength);if(t)return"peakWavelength."+t}if(null!=e.color&&e.hasOwnProperty("color")&&!o.isString(e.color))return"color: string expected";if(null!=e.distanceToVessel&&e.hasOwnProperty("distanceToVessel")){let t=i.ord.Length.verify(e.distanceToVessel);if(t)return"distanceToVessel."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.IlluminationConditions)return e;let t=new i.ord.IlluminationConditions;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"AMBIENT":case 2:t.type=2;break;case"DARK":case 3:t.type=3;break;case"LED":case 4:t.type=4;break;case"HALOGEN_LAMP":case 5:t.type=5;break;case"DEUTERIUM_LAMP":case 6:t.type=6;break;case"SOLAR_SIMULATOR":case 7:t.type=7;break;case"BROAD_SPECTRUM":case 8:t.type=8}if(null!=e.details&&(t.details=String(e.details)),null!=e.peakWavelength){if("object"!=typeof e.peakWavelength)throw TypeError(".ord.IlluminationConditions.peakWavelength: object expected");t.peakWavelength=i.ord.Wavelength.fromObject(e.peakWavelength)}if(null!=e.color&&(t.color=String(e.color)),null!=e.distanceToVessel){if("object"!=typeof e.distanceToVessel)throw TypeError(".ord.IlluminationConditions.distanceToVessel: object expected");t.distanceToVessel=i.ord.Length.fromObject(e.distanceToVessel)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.peakWavelength=null,n.color="",n.distanceToVessel=null),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.IlluminationConditions.IlluminationType[e.type]?e.type:i.ord.IlluminationConditions.IlluminationType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.peakWavelength&&e.hasOwnProperty("peakWavelength")&&(n.peakWavelength=i.ord.Wavelength.toObject(e.peakWavelength,t)),null!=e.color&&e.hasOwnProperty("color")&&(n.color=e.color),null!=e.distanceToVessel&&e.hasOwnProperty("distanceToVessel")&&(n.distanceToVessel=i.ord.Length.toObject(e.distanceToVessel,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.IlluminationConditions"},n.IlluminationType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="AMBIENT"]=2,t[e[3]="DARK"]=3,t[e[4]="LED"]=4,t[e[5]="HALOGEN_LAMP"]=5,t[e[6]="DEUTERIUM_LAMP"]=6,t[e[7]="SOLAR_SIMULATOR"]=7,t[e[8]="BROAD_SPECTRUM"]=8,t}(),n}(),n.ElectrochemistryConditions=function(){function n(e){if(this.measurements=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.current=null,n.prototype.voltage=null,n.prototype.anodeMaterial="",n.prototype.cathodeMaterial="",n.prototype.electrodeSeparation=null,n.prototype.measurements=o.emptyArray,n.prototype.cell=null,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.current&&Object.hasOwnProperty.call(e,"current")&&i.ord.Current.encode(e.current,t.uint32(26).fork()).ldelim(),null!=e.voltage&&Object.hasOwnProperty.call(e,"voltage")&&i.ord.Voltage.encode(e.voltage,t.uint32(34).fork()).ldelim(),null!=e.anodeMaterial&&Object.hasOwnProperty.call(e,"anodeMaterial")&&t.uint32(42).string(e.anodeMaterial),null!=e.cathodeMaterial&&Object.hasOwnProperty.call(e,"cathodeMaterial")&&t.uint32(50).string(e.cathodeMaterial),null!=e.electrodeSeparation&&Object.hasOwnProperty.call(e,"electrodeSeparation")&&i.ord.Length.encode(e.electrodeSeparation,t.uint32(58).fork()).ldelim(),null!=e.measurements&&e.measurements.length)for(let n=0;n<e.measurements.length;++n)i.ord.ElectrochemistryConditions.ElectrochemistryMeasurement.encode(e.measurements[n],t.uint32(66).fork()).ldelim();return null!=e.cell&&Object.hasOwnProperty.call(e,"cell")&&i.ord.ElectrochemistryConditions.ElectrochemistryCell.encode(e.cell,t.uint32(74).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ElectrochemistryConditions;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.current=i.ord.Current.decode(e,e.uint32());break;case 4:o.voltage=i.ord.Voltage.decode(e,e.uint32());break;case 5:o.anodeMaterial=e.string();break;case 6:o.cathodeMaterial=e.string();break;case 7:o.electrodeSeparation=i.ord.Length.decode(e,e.uint32());break;case 8:o.measurements&&o.measurements.length||(o.measurements=[]),o.measurements.push(i.ord.ElectrochemistryConditions.ElectrochemistryMeasurement.decode(e,e.uint32()));break;case 9:o.cell=i.ord.ElectrochemistryConditions.ElectrochemistryCell.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.current&&e.hasOwnProperty("current")){let t=i.ord.Current.verify(e.current);if(t)return"current."+t}if(null!=e.voltage&&e.hasOwnProperty("voltage")){let t=i.ord.Voltage.verify(e.voltage);if(t)return"voltage."+t}if(null!=e.anodeMaterial&&e.hasOwnProperty("anodeMaterial")&&!o.isString(e.anodeMaterial))return"anodeMaterial: string expected";if(null!=e.cathodeMaterial&&e.hasOwnProperty("cathodeMaterial")&&!o.isString(e.cathodeMaterial))return"cathodeMaterial: string expected";if(null!=e.electrodeSeparation&&e.hasOwnProperty("electrodeSeparation")){let t=i.ord.Length.verify(e.electrodeSeparation);if(t)return"electrodeSeparation."+t}if(null!=e.measurements&&e.hasOwnProperty("measurements")){if(!Array.isArray(e.measurements))return"measurements: array expected";for(let t=0;t<e.measurements.length;++t){let n=i.ord.ElectrochemistryConditions.ElectrochemistryMeasurement.verify(e.measurements[t]);if(n)return"measurements."+n}}if(null!=e.cell&&e.hasOwnProperty("cell")){let t=i.ord.ElectrochemistryConditions.ElectrochemistryCell.verify(e.cell);if(t)return"cell."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.ElectrochemistryConditions)return e;let t=new i.ord.ElectrochemistryConditions;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"CONSTANT_CURRENT":case 2:t.type=2;break;case"CONSTANT_VOLTAGE":case 3:t.type=3}if(null!=e.details&&(t.details=String(e.details)),null!=e.current){if("object"!=typeof e.current)throw TypeError(".ord.ElectrochemistryConditions.current: object expected");t.current=i.ord.Current.fromObject(e.current)}if(null!=e.voltage){if("object"!=typeof e.voltage)throw TypeError(".ord.ElectrochemistryConditions.voltage: object expected");t.voltage=i.ord.Voltage.fromObject(e.voltage)}if(null!=e.anodeMaterial&&(t.anodeMaterial=String(e.anodeMaterial)),null!=e.cathodeMaterial&&(t.cathodeMaterial=String(e.cathodeMaterial)),null!=e.electrodeSeparation){if("object"!=typeof e.electrodeSeparation)throw TypeError(".ord.ElectrochemistryConditions.electrodeSeparation: object expected");t.electrodeSeparation=i.ord.Length.fromObject(e.electrodeSeparation)}if(e.measurements){if(!Array.isArray(e.measurements))throw TypeError(".ord.ElectrochemistryConditions.measurements: array expected");t.measurements=[];for(let n=0;n<e.measurements.length;++n){if("object"!=typeof e.measurements[n])throw TypeError(".ord.ElectrochemistryConditions.measurements: object expected");t.measurements[n]=i.ord.ElectrochemistryConditions.ElectrochemistryMeasurement.fromObject(e.measurements[n])}}if(null!=e.cell){if("object"!=typeof e.cell)throw TypeError(".ord.ElectrochemistryConditions.cell: object expected");t.cell=i.ord.ElectrochemistryConditions.ElectrochemistryCell.fromObject(e.cell)}return t},n.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.measurements=[]),t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.current=null,n.voltage=null,n.anodeMaterial="",n.cathodeMaterial="",n.electrodeSeparation=null,n.cell=null),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ElectrochemistryConditions.ElectrochemistryType[e.type]?e.type:i.ord.ElectrochemistryConditions.ElectrochemistryType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.current&&e.hasOwnProperty("current")&&(n.current=i.ord.Current.toObject(e.current,t)),null!=e.voltage&&e.hasOwnProperty("voltage")&&(n.voltage=i.ord.Voltage.toObject(e.voltage,t)),null!=e.anodeMaterial&&e.hasOwnProperty("anodeMaterial")&&(n.anodeMaterial=e.anodeMaterial),null!=e.cathodeMaterial&&e.hasOwnProperty("cathodeMaterial")&&(n.cathodeMaterial=e.cathodeMaterial),null!=e.electrodeSeparation&&e.hasOwnProperty("electrodeSeparation")&&(n.electrodeSeparation=i.ord.Length.toObject(e.electrodeSeparation,t)),e.measurements&&e.measurements.length){n.measurements=[];for(let r=0;r<e.measurements.length;++r)n.measurements[r]=i.ord.ElectrochemistryConditions.ElectrochemistryMeasurement.toObject(e.measurements[r],t)}return null!=e.cell&&e.hasOwnProperty("cell")&&(n.cell=i.ord.ElectrochemistryConditions.ElectrochemistryCell.toObject(e.cell,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ElectrochemistryConditions"},n.ElectrochemistryType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="CONSTANT_CURRENT"]=2,t[e[3]="CONSTANT_VOLTAGE"]=3,t}(),n.ElectrochemistryMeasurement=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.time=null,n.prototype.current=null,n.prototype.voltage=null,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.time&&Object.hasOwnProperty.call(e,"time")&&i.ord.Time.encode(e.time,t.uint32(10).fork()).ldelim(),null!=e.current&&Object.hasOwnProperty.call(e,"current")&&i.ord.Current.encode(e.current,t.uint32(18).fork()).ldelim(),null!=e.voltage&&Object.hasOwnProperty.call(e,"voltage")&&i.ord.Voltage.encode(e.voltage,t.uint32(26).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ElectrochemistryConditions.ElectrochemistryMeasurement;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.time=i.ord.Time.decode(e,e.uint32());break;case 2:o.current=i.ord.Current.decode(e,e.uint32());break;case 3:o.voltage=i.ord.Voltage.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.time&&e.hasOwnProperty("time")){let t=i.ord.Time.verify(e.time);if(t)return"time."+t}if(null!=e.current&&e.hasOwnProperty("current")){let t=i.ord.Current.verify(e.current);if(t)return"current."+t}if(null!=e.voltage&&e.hasOwnProperty("voltage")){let t=i.ord.Voltage.verify(e.voltage);if(t)return"voltage."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.ElectrochemistryConditions.ElectrochemistryMeasurement)return e;let t=new i.ord.ElectrochemistryConditions.ElectrochemistryMeasurement;if(null!=e.time){if("object"!=typeof e.time)throw TypeError(".ord.ElectrochemistryConditions.ElectrochemistryMeasurement.time: object expected");t.time=i.ord.Time.fromObject(e.time)}if(null!=e.current){if("object"!=typeof e.current)throw TypeError(".ord.ElectrochemistryConditions.ElectrochemistryMeasurement.current: object expected");t.current=i.ord.Current.fromObject(e.current)}if(null!=e.voltage){if("object"!=typeof e.voltage)throw TypeError(".ord.ElectrochemistryConditions.ElectrochemistryMeasurement.voltage: object expected");t.voltage=i.ord.Voltage.fromObject(e.voltage)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.time=null,n.current=null,n.voltage=null),null!=e.time&&e.hasOwnProperty("time")&&(n.time=i.ord.Time.toObject(e.time,t)),null!=e.current&&e.hasOwnProperty("current")&&(n.current=i.ord.Current.toObject(e.current,t)),null!=e.voltage&&e.hasOwnProperty("voltage")&&(n.voltage=i.ord.Voltage.toObject(e.voltage,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ElectrochemistryConditions.ElectrochemistryMeasurement"},n}(),n.ElectrochemistryCell=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ElectrochemistryConditions.ElectrochemistryCell;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.ElectrochemistryConditions.ElectrochemistryCell)return e;let t=new i.ord.ElectrochemistryConditions.ElectrochemistryCell;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"DIVIDED_CELL":case 2:t.type=2;break;case"UNDIVIDED_CELL":case 3:t.type=3}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ElectrochemistryConditions.ElectrochemistryCell.ElectrochemistryCellType[e.type]?e.type:i.ord.ElectrochemistryConditions.ElectrochemistryCell.ElectrochemistryCellType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ElectrochemistryConditions.ElectrochemistryCell"},n.ElectrochemistryCellType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="DIVIDED_CELL"]=2,t[e[3]="UNDIVIDED_CELL"]=3,t}(),n}(),n}(),n.FlowConditions=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.pumpType="",n.prototype.tubing=null,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.pumpType&&Object.hasOwnProperty.call(e,"pumpType")&&t.uint32(26).string(e.pumpType),null!=e.tubing&&Object.hasOwnProperty.call(e,"tubing")&&i.ord.FlowConditions.Tubing.encode(e.tubing,t.uint32(34).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.FlowConditions;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.pumpType=e.string();break;case 4:o.tubing=i.ord.FlowConditions.Tubing.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.pumpType&&e.hasOwnProperty("pumpType")&&!o.isString(e.pumpType))return"pumpType: string expected";if(null!=e.tubing&&e.hasOwnProperty("tubing")){let t=i.ord.FlowConditions.Tubing.verify(e.tubing);if(t)return"tubing."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.FlowConditions)return e;let t=new i.ord.FlowConditions;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"PLUG_FLOW_REACTOR":case 2:t.type=2;break;case"CONTINUOUS_STIRRED_TANK_REACTOR":case 3:t.type=3;break;case"PACKED_BED_REACTOR":case 4:t.type=4}if(null!=e.details&&(t.details=String(e.details)),null!=e.pumpType&&(t.pumpType=String(e.pumpType)),null!=e.tubing){if("object"!=typeof e.tubing)throw TypeError(".ord.FlowConditions.tubing: object expected");t.tubing=i.ord.FlowConditions.Tubing.fromObject(e.tubing)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.pumpType="",n.tubing=null),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.FlowConditions.FlowType[e.type]?e.type:i.ord.FlowConditions.FlowType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.pumpType&&e.hasOwnProperty("pumpType")&&(n.pumpType=e.pumpType),null!=e.tubing&&e.hasOwnProperty("tubing")&&(n.tubing=i.ord.FlowConditions.Tubing.toObject(e.tubing,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.FlowConditions"},n.FlowType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="PLUG_FLOW_REACTOR"]=2,t[e[3]="CONTINUOUS_STIRRED_TANK_REACTOR"]=3,t[e[4]="PACKED_BED_REACTOR"]=4,t}(),n.Tubing=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.diameter=null,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.diameter&&Object.hasOwnProperty.call(e,"diameter")&&i.ord.Length.encode(e.diameter,t.uint32(26).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.FlowConditions.Tubing;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.diameter=i.ord.Length.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.diameter&&e.hasOwnProperty("diameter")){let t=i.ord.Length.verify(e.diameter);if(t)return"diameter."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.FlowConditions.Tubing)return e;let t=new i.ord.FlowConditions.Tubing;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"STEEL":case 2:t.type=2;break;case"COPPER":case 3:t.type=3;break;case"PFA":case 4:t.type=4;break;case"FEP":case 5:t.type=5;break;case"TEFLONAF":case 6:t.type=6;break;case"PTFE":case 7:t.type=7;break;case"GLASS":case 8:t.type=8;break;case"QUARTZ":case 9:t.type=9;break;case"SILICON":case 10:t.type=10;break;case"PDMS":case 11:t.type=11}if(null!=e.details&&(t.details=String(e.details)),null!=e.diameter){if("object"!=typeof e.diameter)throw TypeError(".ord.FlowConditions.Tubing.diameter: object expected");t.diameter=i.ord.Length.fromObject(e.diameter)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.diameter=null),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.FlowConditions.Tubing.TubingType[e.type]?e.type:i.ord.FlowConditions.Tubing.TubingType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.diameter&&e.hasOwnProperty("diameter")&&(n.diameter=i.ord.Length.toObject(e.diameter,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.FlowConditions.Tubing"},n.TubingType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="STEEL"]=2,t[e[3]="COPPER"]=3,t[e[4]="PFA"]=4,t[e[5]="FEP"]=5,t[e[6]="TEFLONAF"]=6,t[e[7]="PTFE"]=7,t[e[8]="GLASS"]=8,t[e[9]="QUARTZ"]=9,t[e[10]="SILICON"]=10,t[e[11]="PDMS"]=11,t}(),n}(),n}(),n.ReactionNotes=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.isHeterogeneous=null,n.prototype.formsPrecipitate=null,n.prototype.isExothermic=null,n.prototype.offgasses=null,n.prototype.isSensitiveToMoisture=null,n.prototype.isSensitiveToOxygen=null,n.prototype.isSensitiveToLight=null,n.prototype.safetyNotes="",n.prototype.procedureDetails="",Object.defineProperty(n.prototype,"_isHeterogeneous",{get:o.oneOfGetter(s=["isHeterogeneous"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_formsPrecipitate",{get:o.oneOfGetter(s=["formsPrecipitate"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_isExothermic",{get:o.oneOfGetter(s=["isExothermic"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_offgasses",{get:o.oneOfGetter(s=["offgasses"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_isSensitiveToMoisture",{get:o.oneOfGetter(s=["isSensitiveToMoisture"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_isSensitiveToOxygen",{get:o.oneOfGetter(s=["isSensitiveToOxygen"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_isSensitiveToLight",{get:o.oneOfGetter(s=["isSensitiveToLight"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.isHeterogeneous&&Object.hasOwnProperty.call(e,"isHeterogeneous")&&t.uint32(8).bool(e.isHeterogeneous),null!=e.formsPrecipitate&&Object.hasOwnProperty.call(e,"formsPrecipitate")&&t.uint32(16).bool(e.formsPrecipitate),null!=e.isExothermic&&Object.hasOwnProperty.call(e,"isExothermic")&&t.uint32(24).bool(e.isExothermic),null!=e.offgasses&&Object.hasOwnProperty.call(e,"offgasses")&&t.uint32(32).bool(e.offgasses),null!=e.isSensitiveToMoisture&&Object.hasOwnProperty.call(e,"isSensitiveToMoisture")&&t.uint32(40).bool(e.isSensitiveToMoisture),null!=e.isSensitiveToOxygen&&Object.hasOwnProperty.call(e,"isSensitiveToOxygen")&&t.uint32(48).bool(e.isSensitiveToOxygen),null!=e.isSensitiveToLight&&Object.hasOwnProperty.call(e,"isSensitiveToLight")&&t.uint32(56).bool(e.isSensitiveToLight),null!=e.safetyNotes&&Object.hasOwnProperty.call(e,"safetyNotes")&&t.uint32(66).string(e.safetyNotes),null!=e.procedureDetails&&Object.hasOwnProperty.call(e,"procedureDetails")&&t.uint32(74).string(e.procedureDetails),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionNotes;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.isHeterogeneous=e.bool();break;case 2:o.formsPrecipitate=e.bool();break;case 3:o.isExothermic=e.bool();break;case 4:o.offgasses=e.bool();break;case 5:o.isSensitiveToMoisture=e.bool();break;case 6:o.isSensitiveToOxygen=e.bool();break;case 7:o.isSensitiveToLight=e.bool();break;case 8:o.safetyNotes=e.string();break;case 9:o.procedureDetails=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};return null!=e.isHeterogeneous&&e.hasOwnProperty("isHeterogeneous")&&(t._isHeterogeneous=1,"boolean"!=typeof e.isHeterogeneous)?"isHeterogeneous: boolean expected":null!=e.formsPrecipitate&&e.hasOwnProperty("formsPrecipitate")&&(t._formsPrecipitate=1,"boolean"!=typeof e.formsPrecipitate)?"formsPrecipitate: boolean expected":null!=e.isExothermic&&e.hasOwnProperty("isExothermic")&&(t._isExothermic=1,"boolean"!=typeof e.isExothermic)?"isExothermic: boolean expected":null!=e.offgasses&&e.hasOwnProperty("offgasses")&&(t._offgasses=1,"boolean"!=typeof e.offgasses)?"offgasses: boolean expected":null!=e.isSensitiveToMoisture&&e.hasOwnProperty("isSensitiveToMoisture")&&(t._isSensitiveToMoisture=1,"boolean"!=typeof e.isSensitiveToMoisture)?"isSensitiveToMoisture: boolean expected":null!=e.isSensitiveToOxygen&&e.hasOwnProperty("isSensitiveToOxygen")&&(t._isSensitiveToOxygen=1,"boolean"!=typeof e.isSensitiveToOxygen)?"isSensitiveToOxygen: boolean expected":null!=e.isSensitiveToLight&&e.hasOwnProperty("isSensitiveToLight")&&(t._isSensitiveToLight=1,"boolean"!=typeof e.isSensitiveToLight)?"isSensitiveToLight: boolean expected":null!=e.safetyNotes&&e.hasOwnProperty("safetyNotes")&&!o.isString(e.safetyNotes)?"safetyNotes: string expected":null!=e.procedureDetails&&e.hasOwnProperty("procedureDetails")&&!o.isString(e.procedureDetails)?"procedureDetails: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.ReactionNotes)return e;let t=new i.ord.ReactionNotes;return null!=e.isHeterogeneous&&(t.isHeterogeneous=Boolean(e.isHeterogeneous)),null!=e.formsPrecipitate&&(t.formsPrecipitate=Boolean(e.formsPrecipitate)),null!=e.isExothermic&&(t.isExothermic=Boolean(e.isExothermic)),null!=e.offgasses&&(t.offgasses=Boolean(e.offgasses)),null!=e.isSensitiveToMoisture&&(t.isSensitiveToMoisture=Boolean(e.isSensitiveToMoisture)),null!=e.isSensitiveToOxygen&&(t.isSensitiveToOxygen=Boolean(e.isSensitiveToOxygen)),null!=e.isSensitiveToLight&&(t.isSensitiveToLight=Boolean(e.isSensitiveToLight)),null!=e.safetyNotes&&(t.safetyNotes=String(e.safetyNotes)),null!=e.procedureDetails&&(t.procedureDetails=String(e.procedureDetails)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.safetyNotes="",n.procedureDetails=""),null!=e.isHeterogeneous&&e.hasOwnProperty("isHeterogeneous")&&(n.isHeterogeneous=e.isHeterogeneous,t.oneofs&&(n._isHeterogeneous="isHeterogeneous")),null!=e.formsPrecipitate&&e.hasOwnProperty("formsPrecipitate")&&(n.formsPrecipitate=e.formsPrecipitate,t.oneofs&&(n._formsPrecipitate="formsPrecipitate")),null!=e.isExothermic&&e.hasOwnProperty("isExothermic")&&(n.isExothermic=e.isExothermic,t.oneofs&&(n._isExothermic="isExothermic")),null!=e.offgasses&&e.hasOwnProperty("offgasses")&&(n.offgasses=e.offgasses,t.oneofs&&(n._offgasses="offgasses")),null!=e.isSensitiveToMoisture&&e.hasOwnProperty("isSensitiveToMoisture")&&(n.isSensitiveToMoisture=e.isSensitiveToMoisture,t.oneofs&&(n._isSensitiveToMoisture="isSensitiveToMoisture")),null!=e.isSensitiveToOxygen&&e.hasOwnProperty("isSensitiveToOxygen")&&(n.isSensitiveToOxygen=e.isSensitiveToOxygen,t.oneofs&&(n._isSensitiveToOxygen="isSensitiveToOxygen")),null!=e.isSensitiveToLight&&e.hasOwnProperty("isSensitiveToLight")&&(n.isSensitiveToLight=e.isSensitiveToLight,t.oneofs&&(n._isSensitiveToLight="isSensitiveToLight")),null!=e.safetyNotes&&e.hasOwnProperty("safetyNotes")&&(n.safetyNotes=e.safetyNotes),null!=e.procedureDetails&&e.hasOwnProperty("procedureDetails")&&(n.procedureDetails=e.procedureDetails),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionNotes"},n}(),n.ReactionObservation=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.time=null,n.prototype.comment="",n.prototype.image=null,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.time&&Object.hasOwnProperty.call(e,"time")&&i.ord.Time.encode(e.time,t.uint32(10).fork()).ldelim(),null!=e.comment&&Object.hasOwnProperty.call(e,"comment")&&t.uint32(18).string(e.comment),null!=e.image&&Object.hasOwnProperty.call(e,"image")&&i.ord.Data.encode(e.image,t.uint32(26).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionObservation;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.time=i.ord.Time.decode(e,e.uint32());break;case 2:o.comment=e.string();break;case 3:o.image=i.ord.Data.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.time&&e.hasOwnProperty("time")){let t=i.ord.Time.verify(e.time);if(t)return"time."+t}if(null!=e.comment&&e.hasOwnProperty("comment")&&!o.isString(e.comment))return"comment: string expected";if(null!=e.image&&e.hasOwnProperty("image")){let t=i.ord.Data.verify(e.image);if(t)return"image."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.ReactionObservation)return e;let t=new i.ord.ReactionObservation;if(null!=e.time){if("object"!=typeof e.time)throw TypeError(".ord.ReactionObservation.time: object expected");t.time=i.ord.Time.fromObject(e.time)}if(null!=e.comment&&(t.comment=String(e.comment)),null!=e.image){if("object"!=typeof e.image)throw TypeError(".ord.ReactionObservation.image: object expected");t.image=i.ord.Data.fromObject(e.image)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.time=null,n.comment="",n.image=null),null!=e.time&&e.hasOwnProperty("time")&&(n.time=i.ord.Time.toObject(e.time,t)),null!=e.comment&&e.hasOwnProperty("comment")&&(n.comment=e.comment),null!=e.image&&e.hasOwnProperty("image")&&(n.image=i.ord.Data.toObject(e.image,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionObservation"},n}(),n.ReactionWorkup=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.type=0,n.prototype.details="",n.prototype.duration=null,n.prototype.input=null,n.prototype.amount=null,n.prototype.temperature=null,n.prototype.keepPhase="",n.prototype.stirring=null,n.prototype.targetPh=null,n.prototype.isAutomated=null,Object.defineProperty(n.prototype,"_targetPh",{get:o.oneOfGetter(s=["targetPh"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_isAutomated",{get:o.oneOfGetter(s=["isAutomated"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.duration&&Object.hasOwnProperty.call(e,"duration")&&i.ord.Time.encode(e.duration,t.uint32(26).fork()).ldelim(),null!=e.input&&Object.hasOwnProperty.call(e,"input")&&i.ord.ReactionInput.encode(e.input,t.uint32(34).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&i.ord.Amount.encode(e.amount,t.uint32(42).fork()).ldelim(),null!=e.temperature&&Object.hasOwnProperty.call(e,"temperature")&&i.ord.TemperatureConditions.encode(e.temperature,t.uint32(50).fork()).ldelim(),null!=e.keepPhase&&Object.hasOwnProperty.call(e,"keepPhase")&&t.uint32(58).string(e.keepPhase),null!=e.stirring&&Object.hasOwnProperty.call(e,"stirring")&&i.ord.StirringConditions.encode(e.stirring,t.uint32(66).fork()).ldelim(),null!=e.targetPh&&Object.hasOwnProperty.call(e,"targetPh")&&t.uint32(77).float(e.targetPh),null!=e.isAutomated&&Object.hasOwnProperty.call(e,"isAutomated")&&t.uint32(80).bool(e.isAutomated),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionWorkup;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.duration=i.ord.Time.decode(e,e.uint32());break;case 4:o.input=i.ord.ReactionInput.decode(e,e.uint32());break;case 5:o.amount=i.ord.Amount.decode(e,e.uint32());break;case 6:o.temperature=i.ord.TemperatureConditions.decode(e,e.uint32());break;case 7:o.keepPhase=e.string();break;case 8:o.stirring=i.ord.StirringConditions.decode(e,e.uint32());break;case 9:o.targetPh=e.float();break;case 10:o.isAutomated=e.bool();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.duration&&e.hasOwnProperty("duration")){let t=i.ord.Time.verify(e.duration);if(t)return"duration."+t}if(null!=e.input&&e.hasOwnProperty("input")){let t=i.ord.ReactionInput.verify(e.input);if(t)return"input."+t}if(null!=e.amount&&e.hasOwnProperty("amount")){let t=i.ord.Amount.verify(e.amount);if(t)return"amount."+t}if(null!=e.temperature&&e.hasOwnProperty("temperature")){let t=i.ord.TemperatureConditions.verify(e.temperature);if(t)return"temperature."+t}if(null!=e.keepPhase&&e.hasOwnProperty("keepPhase")&&!o.isString(e.keepPhase))return"keepPhase: string expected";if(null!=e.stirring&&e.hasOwnProperty("stirring")){let t=i.ord.StirringConditions.verify(e.stirring);if(t)return"stirring."+t}return null!=e.targetPh&&e.hasOwnProperty("targetPh")&&(t._targetPh=1,"number"!=typeof e.targetPh)?"targetPh: number expected":null!=e.isAutomated&&e.hasOwnProperty("isAutomated")&&(t._isAutomated=1,"boolean"!=typeof e.isAutomated)?"isAutomated: boolean expected":null},n.fromObject=function(e){if(e instanceof i.ord.ReactionWorkup)return e;let t=new i.ord.ReactionWorkup;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"ADDITION":case 2:t.type=2;break;case"ALIQUOT":case 3:t.type=3;break;case"TEMPERATURE":case 4:t.type=4;break;case"CONCENTRATION":case 5:t.type=5;break;case"EXTRACTION":case 6:t.type=6;break;case"FILTRATION":case 7:t.type=7;break;case"WASH":case 8:t.type=8;break;case"DRY_IN_VACUUM":case 9:t.type=9;break;case"DRY_WITH_MATERIAL":case 10:t.type=10;break;case"FLASH_CHROMATOGRAPHY":case 11:t.type=11;break;case"OTHER_CHROMATOGRAPHY":case 12:t.type=12;break;case"SCAVENGING":case 13:t.type=13;break;case"WAIT":case 14:t.type=14;break;case"STIRRING":case 15:t.type=15;break;case"PH_ADJUST":case 16:t.type=16;break;case"DISSOLUTION":case 17:t.type=17;break;case"DISTILLATION":case 18:t.type=18}if(null!=e.details&&(t.details=String(e.details)),null!=e.duration){if("object"!=typeof e.duration)throw TypeError(".ord.ReactionWorkup.duration: object expected");t.duration=i.ord.Time.fromObject(e.duration)}if(null!=e.input){if("object"!=typeof e.input)throw TypeError(".ord.ReactionWorkup.input: object expected");t.input=i.ord.ReactionInput.fromObject(e.input)}if(null!=e.amount){if("object"!=typeof e.amount)throw TypeError(".ord.ReactionWorkup.amount: object expected");t.amount=i.ord.Amount.fromObject(e.amount)}if(null!=e.temperature){if("object"!=typeof e.temperature)throw TypeError(".ord.ReactionWorkup.temperature: object expected");t.temperature=i.ord.TemperatureConditions.fromObject(e.temperature)}if(null!=e.keepPhase&&(t.keepPhase=String(e.keepPhase)),null!=e.stirring){if("object"!=typeof e.stirring)throw TypeError(".ord.ReactionWorkup.stirring: object expected");t.stirring=i.ord.StirringConditions.fromObject(e.stirring)}return null!=e.targetPh&&(t.targetPh=Number(e.targetPh)),null!=e.isAutomated&&(t.isAutomated=Boolean(e.isAutomated)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.duration=null,n.input=null,n.amount=null,n.temperature=null,n.keepPhase="",n.stirring=null),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ReactionWorkup.ReactionWorkupType[e.type]?e.type:i.ord.ReactionWorkup.ReactionWorkupType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.duration&&e.hasOwnProperty("duration")&&(n.duration=i.ord.Time.toObject(e.duration,t)),null!=e.input&&e.hasOwnProperty("input")&&(n.input=i.ord.ReactionInput.toObject(e.input,t)),null!=e.amount&&e.hasOwnProperty("amount")&&(n.amount=i.ord.Amount.toObject(e.amount,t)),null!=e.temperature&&e.hasOwnProperty("temperature")&&(n.temperature=i.ord.TemperatureConditions.toObject(e.temperature,t)),null!=e.keepPhase&&e.hasOwnProperty("keepPhase")&&(n.keepPhase=e.keepPhase),null!=e.stirring&&e.hasOwnProperty("stirring")&&(n.stirring=i.ord.StirringConditions.toObject(e.stirring,t)),null!=e.targetPh&&e.hasOwnProperty("targetPh")&&(n.targetPh=t.json&&!isFinite(e.targetPh)?String(e.targetPh):e.targetPh,t.oneofs&&(n._targetPh="targetPh")),null!=e.isAutomated&&e.hasOwnProperty("isAutomated")&&(n.isAutomated=e.isAutomated,t.oneofs&&(n._isAutomated="isAutomated")),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionWorkup"},n.ReactionWorkupType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="ADDITION"]=2,t[e[3]="ALIQUOT"]=3,t[e[4]="TEMPERATURE"]=4,t[e[5]="CONCENTRATION"]=5,t[e[6]="EXTRACTION"]=6,t[e[7]="FILTRATION"]=7,t[e[8]="WASH"]=8,t[e[9]="DRY_IN_VACUUM"]=9,t[e[10]="DRY_WITH_MATERIAL"]=10,t[e[11]="FLASH_CHROMATOGRAPHY"]=11,t[e[12]="OTHER_CHROMATOGRAPHY"]=12,t[e[13]="SCAVENGING"]=13,t[e[14]="WAIT"]=14,t[e[15]="STIRRING"]=15,t[e[16]="PH_ADJUST"]=16,t[e[17]="DISSOLUTION"]=17,t[e[18]="DISTILLATION"]=18,t}(),n}(),n.ReactionOutcome=function(){function n(e){if(this.products=[],this.analyses={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.reactionTime=null,n.prototype.conversion=null,n.prototype.products=o.emptyArray,n.prototype.analyses=o.emptyObject,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.reactionTime&&Object.hasOwnProperty.call(e,"reactionTime")&&i.ord.Time.encode(e.reactionTime,t.uint32(10).fork()).ldelim(),null!=e.conversion&&Object.hasOwnProperty.call(e,"conversion")&&i.ord.Percentage.encode(e.conversion,t.uint32(18).fork()).ldelim(),null!=e.products&&e.products.length)for(let n=0;n<e.products.length;++n)i.ord.ProductCompound.encode(e.products[n],t.uint32(26).fork()).ldelim();if(null!=e.analyses&&Object.hasOwnProperty.call(e,"analyses"))for(let n=Object.keys(e.analyses),r=0;r<n.length;++r)t.uint32(34).fork().uint32(10).string(n[r]),i.ord.Analysis.encode(e.analyses[n[r]],t.uint32(18).fork()).ldelim().ldelim();return t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r,s,a=void 0===n?e.len:e.pos+n,l=new i.ord.ReactionOutcome;for(;e.pos<a;){let t=e.uint32();switch(t>>>3){case 1:l.reactionTime=i.ord.Time.decode(e,e.uint32());break;case 2:l.conversion=i.ord.Percentage.decode(e,e.uint32());break;case 3:l.products&&l.products.length||(l.products=[]),l.products.push(i.ord.ProductCompound.decode(e,e.uint32()));break;case 4:{l.analyses===o.emptyObject&&(l.analyses={});let t=e.uint32()+e.pos;for(r="",s=null;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=i.ord.Analysis.decode(e,e.uint32());break;default:e.skipType(7&t)}}l.analyses[r]=s;break}default:e.skipType(7&t)}}return l},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.reactionTime&&e.hasOwnProperty("reactionTime")){let t=i.ord.Time.verify(e.reactionTime);if(t)return"reactionTime."+t}if(null!=e.conversion&&e.hasOwnProperty("conversion")){let t=i.ord.Percentage.verify(e.conversion);if(t)return"conversion."+t}if(null!=e.products&&e.hasOwnProperty("products")){if(!Array.isArray(e.products))return"products: array expected";for(let t=0;t<e.products.length;++t){let n=i.ord.ProductCompound.verify(e.products[t]);if(n)return"products."+n}}if(null!=e.analyses&&e.hasOwnProperty("analyses")){if(!o.isObject(e.analyses))return"analyses: object expected";let t=Object.keys(e.analyses);for(let n=0;n<t.length;++n){let r=i.ord.Analysis.verify(e.analyses[t[n]]);if(r)return"analyses."+r}}return null},n.fromObject=function(e){if(e instanceof i.ord.ReactionOutcome)return e;let t=new i.ord.ReactionOutcome;if(null!=e.reactionTime){if("object"!=typeof e.reactionTime)throw TypeError(".ord.ReactionOutcome.reactionTime: object expected");t.reactionTime=i.ord.Time.fromObject(e.reactionTime)}if(null!=e.conversion){if("object"!=typeof e.conversion)throw TypeError(".ord.ReactionOutcome.conversion: object expected");t.conversion=i.ord.Percentage.fromObject(e.conversion)}if(e.products){if(!Array.isArray(e.products))throw TypeError(".ord.ReactionOutcome.products: array expected");t.products=[];for(let n=0;n<e.products.length;++n){if("object"!=typeof e.products[n])throw TypeError(".ord.ReactionOutcome.products: object expected");t.products[n]=i.ord.ProductCompound.fromObject(e.products[n])}}if(e.analyses){if("object"!=typeof e.analyses)throw TypeError(".ord.ReactionOutcome.analyses: object expected");t.analyses={};for(let n=Object.keys(e.analyses),r=0;r<n.length;++r){if("object"!=typeof e.analyses[n[r]])throw TypeError(".ord.ReactionOutcome.analyses: object expected");t.analyses[n[r]]=i.ord.Analysis.fromObject(e.analyses[n[r]])}}return t},n.toObject=function(e,t){t||(t={});let n,r={};if((t.arrays||t.defaults)&&(r.products=[]),(t.objects||t.defaults)&&(r.analyses={}),t.defaults&&(r.reactionTime=null,r.conversion=null),null!=e.reactionTime&&e.hasOwnProperty("reactionTime")&&(r.reactionTime=i.ord.Time.toObject(e.reactionTime,t)),null!=e.conversion&&e.hasOwnProperty("conversion")&&(r.conversion=i.ord.Percentage.toObject(e.conversion,t)),e.products&&e.products.length){r.products=[];for(let n=0;n<e.products.length;++n)r.products[n]=i.ord.ProductCompound.toObject(e.products[n],t)}if(e.analyses&&(n=Object.keys(e.analyses)).length){r.analyses={};for(let o=0;o<n.length;++o)r.analyses[n[o]]=i.ord.Analysis.toObject(e.analyses[n[o]],t)}return r},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionOutcome"},n}(),n.ProductCompound=function(){function n(e){if(this.identifiers=[],this.measurements=[],this.features={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.identifiers=o.emptyArray,n.prototype.isDesiredProduct=null,n.prototype.measurements=o.emptyArray,n.prototype.isolatedColor="",n.prototype.texture=null,n.prototype.features=o.emptyObject,n.prototype.reactionRole=0,Object.defineProperty(n.prototype,"_isDesiredProduct",{get:o.oneOfGetter(s=["isDesiredProduct"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.identifiers&&e.identifiers.length)for(let n=0;n<e.identifiers.length;++n)i.ord.CompoundIdentifier.encode(e.identifiers[n],t.uint32(10).fork()).ldelim();if(null!=e.isDesiredProduct&&Object.hasOwnProperty.call(e,"isDesiredProduct")&&t.uint32(16).bool(e.isDesiredProduct),null!=e.measurements&&e.measurements.length)for(let n=0;n<e.measurements.length;++n)i.ord.ProductMeasurement.encode(e.measurements[n],t.uint32(26).fork()).ldelim();if(null!=e.isolatedColor&&Object.hasOwnProperty.call(e,"isolatedColor")&&t.uint32(34).string(e.isolatedColor),null!=e.texture&&Object.hasOwnProperty.call(e,"texture")&&i.ord.Texture.encode(e.texture,t.uint32(42).fork()).ldelim(),null!=e.features&&Object.hasOwnProperty.call(e,"features"))for(let n=Object.keys(e.features),r=0;r<n.length;++r)t.uint32(50).fork().uint32(10).string(n[r]),i.ord.Data.encode(e.features[n[r]],t.uint32(18).fork()).ldelim().ldelim();return null!=e.reactionRole&&Object.hasOwnProperty.call(e,"reactionRole")&&t.uint32(56).int32(e.reactionRole),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r,s,a=void 0===n?e.len:e.pos+n,l=new i.ord.ProductCompound;for(;e.pos<a;){let t=e.uint32();switch(t>>>3){case 1:l.identifiers&&l.identifiers.length||(l.identifiers=[]),l.identifiers.push(i.ord.CompoundIdentifier.decode(e,e.uint32()));break;case 2:l.isDesiredProduct=e.bool();break;case 3:l.measurements&&l.measurements.length||(l.measurements=[]),l.measurements.push(i.ord.ProductMeasurement.decode(e,e.uint32()));break;case 4:l.isolatedColor=e.string();break;case 5:l.texture=i.ord.Texture.decode(e,e.uint32());break;case 6:{l.features===o.emptyObject&&(l.features={});let t=e.uint32()+e.pos;for(r="",s=null;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=i.ord.Data.decode(e,e.uint32());break;default:e.skipType(7&t)}}l.features[r]=s;break}case 7:l.reactionRole=e.int32();break;default:e.skipType(7&t)}}return l},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.identifiers&&e.hasOwnProperty("identifiers")){if(!Array.isArray(e.identifiers))return"identifiers: array expected";for(let t=0;t<e.identifiers.length;++t){let n=i.ord.CompoundIdentifier.verify(e.identifiers[t]);if(n)return"identifiers."+n}}if(null!=e.isDesiredProduct&&e.hasOwnProperty("isDesiredProduct")&&"boolean"!=typeof e.isDesiredProduct)return"isDesiredProduct: boolean expected";if(null!=e.measurements&&e.hasOwnProperty("measurements")){if(!Array.isArray(e.measurements))return"measurements: array expected";for(let t=0;t<e.measurements.length;++t){let n=i.ord.ProductMeasurement.verify(e.measurements[t]);if(n)return"measurements."+n}}if(null!=e.isolatedColor&&e.hasOwnProperty("isolatedColor")&&!o.isString(e.isolatedColor))return"isolatedColor: string expected";if(null!=e.texture&&e.hasOwnProperty("texture")){let t=i.ord.Texture.verify(e.texture);if(t)return"texture."+t}if(null!=e.features&&e.hasOwnProperty("features")){if(!o.isObject(e.features))return"features: object expected";let t=Object.keys(e.features);for(let n=0;n<t.length;++n){let r=i.ord.Data.verify(e.features[t[n]]);if(r)return"features."+r}}if(null!=e.reactionRole&&e.hasOwnProperty("reactionRole"))switch(e.reactionRole){default:return"reactionRole: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:}return null},n.fromObject=function(e){if(e instanceof i.ord.ProductCompound)return e;let t=new i.ord.ProductCompound;if(e.identifiers){if(!Array.isArray(e.identifiers))throw TypeError(".ord.ProductCompound.identifiers: array expected");t.identifiers=[];for(let n=0;n<e.identifiers.length;++n){if("object"!=typeof e.identifiers[n])throw TypeError(".ord.ProductCompound.identifiers: object expected");t.identifiers[n]=i.ord.CompoundIdentifier.fromObject(e.identifiers[n])}}if(null!=e.isDesiredProduct&&(t.isDesiredProduct=Boolean(e.isDesiredProduct)),e.measurements){if(!Array.isArray(e.measurements))throw TypeError(".ord.ProductCompound.measurements: array expected");t.measurements=[];for(let n=0;n<e.measurements.length;++n){if("object"!=typeof e.measurements[n])throw TypeError(".ord.ProductCompound.measurements: object expected");t.measurements[n]=i.ord.ProductMeasurement.fromObject(e.measurements[n])}}if(null!=e.isolatedColor&&(t.isolatedColor=String(e.isolatedColor)),null!=e.texture){if("object"!=typeof e.texture)throw TypeError(".ord.ProductCompound.texture: object expected");t.texture=i.ord.Texture.fromObject(e.texture)}if(e.features){if("object"!=typeof e.features)throw TypeError(".ord.ProductCompound.features: object expected");t.features={};for(let n=Object.keys(e.features),r=0;r<n.length;++r){if("object"!=typeof e.features[n[r]])throw TypeError(".ord.ProductCompound.features: object expected");t.features[n[r]]=i.ord.Data.fromObject(e.features[n[r]])}}switch(e.reactionRole){default:if("number"==typeof e.reactionRole){t.reactionRole=e.reactionRole;break}break;case"UNSPECIFIED":case 0:t.reactionRole=0;break;case"REACTANT":case 1:t.reactionRole=1;break;case"REAGENT":case 2:t.reactionRole=2;break;case"SOLVENT":case 3:t.reactionRole=3;break;case"CATALYST":case 4:t.reactionRole=4;break;case"WORKUP":case 5:t.reactionRole=5;break;case"INTERNAL_STANDARD":case 6:t.reactionRole=6;break;case"AUTHENTIC_STANDARD":case 7:t.reactionRole=7;break;case"PRODUCT":case 8:t.reactionRole=8;break;case"BYPRODUCT":case 9:t.reactionRole=9;break;case"SIDE_PRODUCT":case 10:t.reactionRole=10}return t},n.toObject=function(e,t){t||(t={});let n,r={};if((t.arrays||t.defaults)&&(r.identifiers=[],r.measurements=[]),(t.objects||t.defaults)&&(r.features={}),t.defaults&&(r.isolatedColor="",r.texture=null,r.reactionRole=t.enums===String?"UNSPECIFIED":0),e.identifiers&&e.identifiers.length){r.identifiers=[];for(let n=0;n<e.identifiers.length;++n)r.identifiers[n]=i.ord.CompoundIdentifier.toObject(e.identifiers[n],t)}if(null!=e.isDesiredProduct&&e.hasOwnProperty("isDesiredProduct")&&(r.isDesiredProduct=e.isDesiredProduct,t.oneofs&&(r._isDesiredProduct="isDesiredProduct")),e.measurements&&e.measurements.length){r.measurements=[];for(let n=0;n<e.measurements.length;++n)r.measurements[n]=i.ord.ProductMeasurement.toObject(e.measurements[n],t)}if(null!=e.isolatedColor&&e.hasOwnProperty("isolatedColor")&&(r.isolatedColor=e.isolatedColor),null!=e.texture&&e.hasOwnProperty("texture")&&(r.texture=i.ord.Texture.toObject(e.texture,t)),e.features&&(n=Object.keys(e.features)).length){r.features={};for(let o=0;o<n.length;++o)r.features[n[o]]=i.ord.Data.toObject(e.features[n[o]],t)}return null!=e.reactionRole&&e.hasOwnProperty("reactionRole")&&(r.reactionRole=t.enums===String?void 0===i.ord.ReactionRole.ReactionRoleType[e.reactionRole]?e.reactionRole:i.ord.ReactionRole.ReactionRoleType[e.reactionRole]:e.reactionRole),r},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ProductCompound"},n}(),n.ProductMeasurement=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.analysisKey="",n.prototype.type=0,n.prototype.details="",n.prototype.usesInternalStandard=null,n.prototype.isNormalized=null,n.prototype.usesAuthenticStandard=null,n.prototype.authenticStandard=null,n.prototype.percentage=null,n.prototype.floatValue=null,n.prototype.stringValue=null,n.prototype.amount=null,n.prototype.retentionTime=null,n.prototype.massSpecDetails=null,n.prototype.selectivity=null,n.prototype.wavelength=null,Object.defineProperty(n.prototype,"_usesInternalStandard",{get:o.oneOfGetter(s=["usesInternalStandard"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_isNormalized",{get:o.oneOfGetter(s=["isNormalized"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_usesAuthenticStandard",{get:o.oneOfGetter(s=["usesAuthenticStandard"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"value",{get:o.oneOfGetter(s=["percentage","floatValue","stringValue","amount"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.analysisKey&&Object.hasOwnProperty.call(e,"analysisKey")&&t.uint32(10).string(e.analysisKey),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(16).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(26).string(e.details),null!=e.usesInternalStandard&&Object.hasOwnProperty.call(e,"usesInternalStandard")&&t.uint32(32).bool(e.usesInternalStandard),null!=e.isNormalized&&Object.hasOwnProperty.call(e,"isNormalized")&&t.uint32(40).bool(e.isNormalized),null!=e.usesAuthenticStandard&&Object.hasOwnProperty.call(e,"usesAuthenticStandard")&&t.uint32(48).bool(e.usesAuthenticStandard),null!=e.authenticStandard&&Object.hasOwnProperty.call(e,"authenticStandard")&&i.ord.Compound.encode(e.authenticStandard,t.uint32(58).fork()).ldelim(),null!=e.percentage&&Object.hasOwnProperty.call(e,"percentage")&&i.ord.Percentage.encode(e.percentage,t.uint32(66).fork()).ldelim(),null!=e.floatValue&&Object.hasOwnProperty.call(e,"floatValue")&&i.ord.FloatValue.encode(e.floatValue,t.uint32(74).fork()).ldelim(),null!=e.stringValue&&Object.hasOwnProperty.call(e,"stringValue")&&t.uint32(82).string(e.stringValue),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&i.ord.Amount.encode(e.amount,t.uint32(90).fork()).ldelim(),null!=e.retentionTime&&Object.hasOwnProperty.call(e,"retentionTime")&&i.ord.Time.encode(e.retentionTime,t.uint32(98).fork()).ldelim(),null!=e.massSpecDetails&&Object.hasOwnProperty.call(e,"massSpecDetails")&&i.ord.ProductMeasurement.MassSpecMeasurementDetails.encode(e.massSpecDetails,t.uint32(106).fork()).ldelim(),null!=e.selectivity&&Object.hasOwnProperty.call(e,"selectivity")&&i.ord.ProductMeasurement.Selectivity.encode(e.selectivity,t.uint32(114).fork()).ldelim(),null!=e.wavelength&&Object.hasOwnProperty.call(e,"wavelength")&&i.ord.Wavelength.encode(e.wavelength,t.uint32(122).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ProductMeasurement;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.analysisKey=e.string();break;case 2:o.type=e.int32();break;case 3:o.details=e.string();break;case 4:o.usesInternalStandard=e.bool();break;case 5:o.isNormalized=e.bool();break;case 6:o.usesAuthenticStandard=e.bool();break;case 7:o.authenticStandard=i.ord.Compound.decode(e,e.uint32());break;case 8:o.percentage=i.ord.Percentage.decode(e,e.uint32());break;case 9:o.floatValue=i.ord.FloatValue.decode(e,e.uint32());break;case 10:o.stringValue=e.string();break;case 11:o.amount=i.ord.Amount.decode(e,e.uint32());break;case 12:o.retentionTime=i.ord.Time.decode(e,e.uint32());break;case 13:o.massSpecDetails=i.ord.ProductMeasurement.MassSpecMeasurementDetails.decode(e,e.uint32());break;case 14:o.selectivity=i.ord.ProductMeasurement.Selectivity.decode(e,e.uint32());break;case 15:o.wavelength=i.ord.Wavelength.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.analysisKey&&e.hasOwnProperty("analysisKey")&&!o.isString(e.analysisKey))return"analysisKey: string expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.usesInternalStandard&&e.hasOwnProperty("usesInternalStandard")&&(t._usesInternalStandard=1,"boolean"!=typeof e.usesInternalStandard))return"usesInternalStandard: boolean expected";if(null!=e.isNormalized&&e.hasOwnProperty("isNormalized")&&(t._isNormalized=1,"boolean"!=typeof e.isNormalized))return"isNormalized: boolean expected";if(null!=e.usesAuthenticStandard&&e.hasOwnProperty("usesAuthenticStandard")&&(t._usesAuthenticStandard=1,"boolean"!=typeof e.usesAuthenticStandard))return"usesAuthenticStandard: boolean expected";if(null!=e.authenticStandard&&e.hasOwnProperty("authenticStandard")){let t=i.ord.Compound.verify(e.authenticStandard);if(t)return"authenticStandard."+t}if(null!=e.percentage&&e.hasOwnProperty("percentage")){t.value=1;{let t=i.ord.Percentage.verify(e.percentage);if(t)return"percentage."+t}}if(null!=e.floatValue&&e.hasOwnProperty("floatValue")){if(1===t.value)return"value: multiple values";t.value=1;{let t=i.ord.FloatValue.verify(e.floatValue);if(t)return"floatValue."+t}}if(null!=e.stringValue&&e.hasOwnProperty("stringValue")){if(1===t.value)return"value: multiple values";if(t.value=1,!o.isString(e.stringValue))return"stringValue: string expected"}if(null!=e.amount&&e.hasOwnProperty("amount")){if(1===t.value)return"value: multiple values";t.value=1;{let t=i.ord.Amount.verify(e.amount);if(t)return"amount."+t}}if(null!=e.retentionTime&&e.hasOwnProperty("retentionTime")){let t=i.ord.Time.verify(e.retentionTime);if(t)return"retentionTime."+t}if(null!=e.massSpecDetails&&e.hasOwnProperty("massSpecDetails")){let t=i.ord.ProductMeasurement.MassSpecMeasurementDetails.verify(e.massSpecDetails);if(t)return"massSpecDetails."+t}if(null!=e.selectivity&&e.hasOwnProperty("selectivity")){let t=i.ord.ProductMeasurement.Selectivity.verify(e.selectivity);if(t)return"selectivity."+t}if(null!=e.wavelength&&e.hasOwnProperty("wavelength")){let t=i.ord.Wavelength.verify(e.wavelength);if(t)return"wavelength."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.ProductMeasurement)return e;let t=new i.ord.ProductMeasurement;switch(null!=e.analysisKey&&(t.analysisKey=String(e.analysisKey)),e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"IDENTITY":case 2:t.type=2;break;case"YIELD":case 3:t.type=3;break;case"SELECTIVITY":case 4:t.type=4;break;case"PURITY":case 5:t.type=5;break;case"AREA":case 6:t.type=6;break;case"COUNTS":case 7:t.type=7;break;case"INTENSITY":case 8:t.type=8;break;case"AMOUNT":case 9:t.type=9}if(null!=e.details&&(t.details=String(e.details)),null!=e.usesInternalStandard&&(t.usesInternalStandard=Boolean(e.usesInternalStandard)),null!=e.isNormalized&&(t.isNormalized=Boolean(e.isNormalized)),null!=e.usesAuthenticStandard&&(t.usesAuthenticStandard=Boolean(e.usesAuthenticStandard)),null!=e.authenticStandard){if("object"!=typeof e.authenticStandard)throw TypeError(".ord.ProductMeasurement.authenticStandard: object expected");t.authenticStandard=i.ord.Compound.fromObject(e.authenticStandard)}if(null!=e.percentage){if("object"!=typeof e.percentage)throw TypeError(".ord.ProductMeasurement.percentage: object expected");t.percentage=i.ord.Percentage.fromObject(e.percentage)}if(null!=e.floatValue){if("object"!=typeof e.floatValue)throw TypeError(".ord.ProductMeasurement.floatValue: object expected");t.floatValue=i.ord.FloatValue.fromObject(e.floatValue)}if(null!=e.stringValue&&(t.stringValue=String(e.stringValue)),null!=e.amount){if("object"!=typeof e.amount)throw TypeError(".ord.ProductMeasurement.amount: object expected");t.amount=i.ord.Amount.fromObject(e.amount)}if(null!=e.retentionTime){if("object"!=typeof e.retentionTime)throw TypeError(".ord.ProductMeasurement.retentionTime: object expected");t.retentionTime=i.ord.Time.fromObject(e.retentionTime)}if(null!=e.massSpecDetails){if("object"!=typeof e.massSpecDetails)throw TypeError(".ord.ProductMeasurement.massSpecDetails: object expected");t.massSpecDetails=i.ord.ProductMeasurement.MassSpecMeasurementDetails.fromObject(e.massSpecDetails)}if(null!=e.selectivity){if("object"!=typeof e.selectivity)throw TypeError(".ord.ProductMeasurement.selectivity: object expected");t.selectivity=i.ord.ProductMeasurement.Selectivity.fromObject(e.selectivity)}if(null!=e.wavelength){if("object"!=typeof e.wavelength)throw TypeError(".ord.ProductMeasurement.wavelength: object expected");t.wavelength=i.ord.Wavelength.fromObject(e.wavelength)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.analysisKey="",n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.authenticStandard=null,n.retentionTime=null,n.massSpecDetails=null,n.selectivity=null,n.wavelength=null),null!=e.analysisKey&&e.hasOwnProperty("analysisKey")&&(n.analysisKey=e.analysisKey),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ProductMeasurement.ProductMeasurementType[e.type]?e.type:i.ord.ProductMeasurement.ProductMeasurementType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.usesInternalStandard&&e.hasOwnProperty("usesInternalStandard")&&(n.usesInternalStandard=e.usesInternalStandard,t.oneofs&&(n._usesInternalStandard="usesInternalStandard")),null!=e.isNormalized&&e.hasOwnProperty("isNormalized")&&(n.isNormalized=e.isNormalized,t.oneofs&&(n._isNormalized="isNormalized")),null!=e.usesAuthenticStandard&&e.hasOwnProperty("usesAuthenticStandard")&&(n.usesAuthenticStandard=e.usesAuthenticStandard,t.oneofs&&(n._usesAuthenticStandard="usesAuthenticStandard")),null!=e.authenticStandard&&e.hasOwnProperty("authenticStandard")&&(n.authenticStandard=i.ord.Compound.toObject(e.authenticStandard,t)),null!=e.percentage&&e.hasOwnProperty("percentage")&&(n.percentage=i.ord.Percentage.toObject(e.percentage,t),t.oneofs&&(n.value="percentage")),null!=e.floatValue&&e.hasOwnProperty("floatValue")&&(n.floatValue=i.ord.FloatValue.toObject(e.floatValue,t),t.oneofs&&(n.value="floatValue")),null!=e.stringValue&&e.hasOwnProperty("stringValue")&&(n.stringValue=e.stringValue,t.oneofs&&(n.value="stringValue")),null!=e.amount&&e.hasOwnProperty("amount")&&(n.amount=i.ord.Amount.toObject(e.amount,t),t.oneofs&&(n.value="amount")),null!=e.retentionTime&&e.hasOwnProperty("retentionTime")&&(n.retentionTime=i.ord.Time.toObject(e.retentionTime,t)),null!=e.massSpecDetails&&e.hasOwnProperty("massSpecDetails")&&(n.massSpecDetails=i.ord.ProductMeasurement.MassSpecMeasurementDetails.toObject(e.massSpecDetails,t)),null!=e.selectivity&&e.hasOwnProperty("selectivity")&&(n.selectivity=i.ord.ProductMeasurement.Selectivity.toObject(e.selectivity,t)),null!=e.wavelength&&e.hasOwnProperty("wavelength")&&(n.wavelength=i.ord.Wavelength.toObject(e.wavelength,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ProductMeasurement"},n.ProductMeasurementType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="IDENTITY"]=2,t[e[3]="YIELD"]=3,t[e[4]="SELECTIVITY"]=4,t[e[5]="PURITY"]=5,t[e[6]="AREA"]=6,t[e[7]="COUNTS"]=7,t[e[8]="INTENSITY"]=8,t[e[9]="AMOUNT"]=9,t}(),n.MassSpecMeasurementDetails=function(){function n(e){if(this.eicMasses=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.type=0,n.prototype.details="",n.prototype.ticMinimumMz=null,n.prototype.ticMaximumMz=null,n.prototype.eicMasses=o.emptyArray,Object.defineProperty(n.prototype,"_ticMinimumMz",{get:o.oneOfGetter(s=["ticMinimumMz"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_ticMaximumMz",{get:o.oneOfGetter(s=["ticMaximumMz"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.ticMinimumMz&&Object.hasOwnProperty.call(e,"ticMinimumMz")&&t.uint32(29).float(e.ticMinimumMz),null!=e.ticMaximumMz&&Object.hasOwnProperty.call(e,"ticMaximumMz")&&t.uint32(37).float(e.ticMaximumMz),null!=e.eicMasses&&e.eicMasses.length){t.uint32(42).fork();for(let n=0;n<e.eicMasses.length;++n)t.float(e.eicMasses[n]);t.ldelim()}return t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ProductMeasurement.MassSpecMeasurementDetails;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.ticMinimumMz=e.float();break;case 4:o.ticMaximumMz=e.float();break;case 5:if(o.eicMasses&&o.eicMasses.length||(o.eicMasses=[]),2==(7&t)){let t=e.uint32()+e.pos;for(;e.pos<t;)o.eicMasses.push(e.float())}else o.eicMasses.push(e.float());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.ticMinimumMz&&e.hasOwnProperty("ticMinimumMz")&&(t._ticMinimumMz=1,"number"!=typeof e.ticMinimumMz))return"ticMinimumMz: number expected";if(null!=e.ticMaximumMz&&e.hasOwnProperty("ticMaximumMz")&&(t._ticMaximumMz=1,"number"!=typeof e.ticMaximumMz))return"ticMaximumMz: number expected";if(null!=e.eicMasses&&e.hasOwnProperty("eicMasses")){if(!Array.isArray(e.eicMasses))return"eicMasses: array expected";for(let t=0;t<e.eicMasses.length;++t)if("number"!=typeof e.eicMasses[t])return"eicMasses: number[] expected"}return null},n.fromObject=function(e){if(e instanceof i.ord.ProductMeasurement.MassSpecMeasurementDetails)return e;let t=new i.ord.ProductMeasurement.MassSpecMeasurementDetails;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"TIC":case 2:t.type=2;break;case"TIC_POSITIVE":case 3:t.type=3;break;case"TIC_NEGATIVE":case 4:t.type=4;break;case"EIC":case 5:t.type=5}if(null!=e.details&&(t.details=String(e.details)),null!=e.ticMinimumMz&&(t.ticMinimumMz=Number(e.ticMinimumMz)),null!=e.ticMaximumMz&&(t.ticMaximumMz=Number(e.ticMaximumMz)),e.eicMasses){if(!Array.isArray(e.eicMasses))throw TypeError(".ord.ProductMeasurement.MassSpecMeasurementDetails.eicMasses: array expected");t.eicMasses=[];for(let n=0;n<e.eicMasses.length;++n)t.eicMasses[n]=Number(e.eicMasses[n])}return t},n.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.eicMasses=[]),t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ProductMeasurement.MassSpecMeasurementDetails.MassSpecMeasurementType[e.type]?e.type:i.ord.ProductMeasurement.MassSpecMeasurementDetails.MassSpecMeasurementType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.ticMinimumMz&&e.hasOwnProperty("ticMinimumMz")&&(n.ticMinimumMz=t.json&&!isFinite(e.ticMinimumMz)?String(e.ticMinimumMz):e.ticMinimumMz,t.oneofs&&(n._ticMinimumMz="ticMinimumMz")),null!=e.ticMaximumMz&&e.hasOwnProperty("ticMaximumMz")&&(n.ticMaximumMz=t.json&&!isFinite(e.ticMaximumMz)?String(e.ticMaximumMz):e.ticMaximumMz,t.oneofs&&(n._ticMaximumMz="ticMaximumMz")),e.eicMasses&&e.eicMasses.length){n.eicMasses=[];for(let r=0;r<e.eicMasses.length;++r)n.eicMasses[r]=t.json&&!isFinite(e.eicMasses[r])?String(e.eicMasses[r]):e.eicMasses[r]}return n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ProductMeasurement.MassSpecMeasurementDetails"},n.MassSpecMeasurementType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="TIC"]=2,t[e[3]="TIC_POSITIVE"]=3,t[e[4]="TIC_NEGATIVE"]=4,t[e[5]="EIC"]=5,t}(),n}(),n.Selectivity=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ProductMeasurement.Selectivity;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.ProductMeasurement.Selectivity)return e;let t=new i.ord.ProductMeasurement.Selectivity;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"EE":case 2:t.type=2;break;case"ER":case 3:t.type=3;break;case"DR":case 4:t.type=4;break;case"EZ":case 5:t.type=5;break;case"ZE":case 6:t.type=6}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ProductMeasurement.Selectivity.SelectivityType[e.type]?e.type:i.ord.ProductMeasurement.Selectivity.SelectivityType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ProductMeasurement.Selectivity"},n.SelectivityType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="EE"]=2,t[e[3]="ER"]=3,t[e[4]="DR"]=4,t[e[5]="EZ"]=5,t[e[6]="ZE"]=6,t}(),n}(),n}(),n.DateTime=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.value="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(10).string(e.value),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.DateTime;for(;e.pos<r;){let t=e.uint32();t>>>3==1?o.value=e.string():e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.value&&e.hasOwnProperty("value")&&!o.isString(e.value)?"value: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.DateTime)return e;let t=new i.ord.DateTime;return null!=e.value&&(t.value=String(e.value)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.value=""),null!=e.value&&e.hasOwnProperty("value")&&(n.value=e.value),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.DateTime"},n}(),n.Analysis=function(){function n(e){if(this.data={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.type=0,n.prototype.details="",n.prototype.chmoId=0,n.prototype.isOfIsolatedSpecies=null,n.prototype.data=o.emptyObject,n.prototype.instrumentManufacturer="",n.prototype.instrumentLastCalibrated=null,Object.defineProperty(n.prototype,"_isOfIsolatedSpecies",{get:o.oneOfGetter(s=["isOfIsolatedSpecies"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.chmoId&&Object.hasOwnProperty.call(e,"chmoId")&&t.uint32(24).int32(e.chmoId),null!=e.isOfIsolatedSpecies&&Object.hasOwnProperty.call(e,"isOfIsolatedSpecies")&&t.uint32(32).bool(e.isOfIsolatedSpecies),null!=e.data&&Object.hasOwnProperty.call(e,"data"))for(let n=Object.keys(e.data),r=0;r<n.length;++r)t.uint32(42).fork().uint32(10).string(n[r]),i.ord.Data.encode(e.data[n[r]],t.uint32(18).fork()).ldelim().ldelim();return null!=e.instrumentManufacturer&&Object.hasOwnProperty.call(e,"instrumentManufacturer")&&t.uint32(50).string(e.instrumentManufacturer),null!=e.instrumentLastCalibrated&&Object.hasOwnProperty.call(e,"instrumentLastCalibrated")&&i.ord.DateTime.encode(e.instrumentLastCalibrated,t.uint32(58).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r,s,a=void 0===n?e.len:e.pos+n,l=new i.ord.Analysis;for(;e.pos<a;){let t=e.uint32();switch(t>>>3){case 1:l.type=e.int32();break;case 2:l.details=e.string();break;case 3:l.chmoId=e.int32();break;case 4:l.isOfIsolatedSpecies=e.bool();break;case 5:{l.data===o.emptyObject&&(l.data={});let t=e.uint32()+e.pos;for(r="",s=null;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=i.ord.Data.decode(e,e.uint32());break;default:e.skipType(7&t)}}l.data[r]=s;break}case 6:l.instrumentManufacturer=e.string();break;case 7:l.instrumentLastCalibrated=i.ord.DateTime.decode(e,e.uint32());break;default:e.skipType(7&t)}}return l},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.chmoId&&e.hasOwnProperty("chmoId")&&!o.isInteger(e.chmoId))return"chmoId: integer expected";if(null!=e.isOfIsolatedSpecies&&e.hasOwnProperty("isOfIsolatedSpecies")&&"boolean"!=typeof e.isOfIsolatedSpecies)return"isOfIsolatedSpecies: boolean expected";if(null!=e.data&&e.hasOwnProperty("data")){if(!o.isObject(e.data))return"data: object expected";let t=Object.keys(e.data);for(let n=0;n<t.length;++n){let r=i.ord.Data.verify(e.data[t[n]]);if(r)return"data."+r}}if(null!=e.instrumentManufacturer&&e.hasOwnProperty("instrumentManufacturer")&&!o.isString(e.instrumentManufacturer))return"instrumentManufacturer: string expected";if(null!=e.instrumentLastCalibrated&&e.hasOwnProperty("instrumentLastCalibrated")){let t=i.ord.DateTime.verify(e.instrumentLastCalibrated);if(t)return"instrumentLastCalibrated."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.Analysis)return e;let t=new i.ord.Analysis;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"LC":case 2:t.type=2;break;case"GC":case 3:t.type=3;break;case"IR":case 4:t.type=4;break;case"NMR_1H":case 5:t.type=5;break;case"NMR_13C":case 6:t.type=6;break;case"NMR_OTHER":case 7:t.type=7;break;case"MP":case 8:t.type=8;break;case"UV":case 9:t.type=9;break;case"TLC":case 10:t.type=10;break;case"MS":case 11:t.type=11;break;case"HRMS":case 12:t.type=12;break;case"MSMS":case 13:t.type=13;break;case"WEIGHT":case 14:t.type=14;break;case"LCMS":case 15:t.type=15;break;case"GCMS":case 16:t.type=16;break;case"ELSD":case 17:t.type=17;break;case"CD":case 18:t.type=18;break;case"SFC":case 19:t.type=19;break;case"EPR":case 20:t.type=20;break;case"XRD":case 21:t.type=21;break;case"RAMAN":case 22:t.type=22;break;case"ED":case 23:t.type=23;break;case"OPTICAL_ROTATION":case 24:t.type=24;break;case"CAD":case 25:t.type=25}if(null!=e.details&&(t.details=String(e.details)),null!=e.chmoId&&(t.chmoId=0|e.chmoId),null!=e.isOfIsolatedSpecies&&(t.isOfIsolatedSpecies=Boolean(e.isOfIsolatedSpecies)),e.data){if("object"!=typeof e.data)throw TypeError(".ord.Analysis.data: object expected");t.data={};for(let n=Object.keys(e.data),r=0;r<n.length;++r){if("object"!=typeof e.data[n[r]])throw TypeError(".ord.Analysis.data: object expected");t.data[n[r]]=i.ord.Data.fromObject(e.data[n[r]])}}if(null!=e.instrumentManufacturer&&(t.instrumentManufacturer=String(e.instrumentManufacturer)),null!=e.instrumentLastCalibrated){if("object"!=typeof e.instrumentLastCalibrated)throw TypeError(".ord.Analysis.instrumentLastCalibrated: object expected");t.instrumentLastCalibrated=i.ord.DateTime.fromObject(e.instrumentLastCalibrated)}return t},n.toObject=function(e,t){t||(t={});let n,r={};if((t.objects||t.defaults)&&(r.data={}),t.defaults&&(r.type=t.enums===String?"UNSPECIFIED":0,r.details="",r.chmoId=0,r.instrumentManufacturer="",r.instrumentLastCalibrated=null),null!=e.type&&e.hasOwnProperty("type")&&(r.type=t.enums===String?void 0===i.ord.Analysis.AnalysisType[e.type]?e.type:i.ord.Analysis.AnalysisType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(r.details=e.details),null!=e.chmoId&&e.hasOwnProperty("chmoId")&&(r.chmoId=e.chmoId),null!=e.isOfIsolatedSpecies&&e.hasOwnProperty("isOfIsolatedSpecies")&&(r.isOfIsolatedSpecies=e.isOfIsolatedSpecies,t.oneofs&&(r._isOfIsolatedSpecies="isOfIsolatedSpecies")),e.data&&(n=Object.keys(e.data)).length){r.data={};for(let o=0;o<n.length;++o)r.data[n[o]]=i.ord.Data.toObject(e.data[n[o]],t)}return null!=e.instrumentManufacturer&&e.hasOwnProperty("instrumentManufacturer")&&(r.instrumentManufacturer=e.instrumentManufacturer),null!=e.instrumentLastCalibrated&&e.hasOwnProperty("instrumentLastCalibrated")&&(r.instrumentLastCalibrated=i.ord.DateTime.toObject(e.instrumentLastCalibrated,t)),r},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Analysis"},n.AnalysisType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="LC"]=2,t[e[3]="GC"]=3,t[e[4]="IR"]=4,t[e[5]="NMR_1H"]=5,t[e[6]="NMR_13C"]=6,t[e[7]="NMR_OTHER"]=7,t[e[8]="MP"]=8,t[e[9]="UV"]=9,t[e[10]="TLC"]=10,t[e[11]="MS"]=11,t[e[12]="HRMS"]=12,t[e[13]="MSMS"]=13,t[e[14]="WEIGHT"]=14,t[e[15]="LCMS"]=15,t[e[16]="GCMS"]=16,t[e[17]="ELSD"]=17,t[e[18]="CD"]=18,t[e[19]="SFC"]=19,t[e[20]="EPR"]=20,t[e[21]="XRD"]=21,t[e[22]="RAMAN"]=22,t[e[23]="ED"]=23,t[e[24]="OPTICAL_ROTATION"]=24,t[e[25]="CAD"]=25,t}(),n}(),n.ReactionProvenance=function(){function n(e){if(this.recordModified=[],this.reactionMetadata={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.experimenter=null,n.prototype.city="",n.prototype.experimentStart=null,n.prototype.doi="",n.prototype.patent="",n.prototype.publicationUrl="",n.prototype.recordCreated=null,n.prototype.recordModified=o.emptyArray,n.prototype.reactionMetadata=o.emptyObject,n.prototype.isMined=null,Object.defineProperty(n.prototype,"_isMined",{get:o.oneOfGetter(s=["isMined"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.experimenter&&Object.hasOwnProperty.call(e,"experimenter")&&i.ord.Person.encode(e.experimenter,t.uint32(10).fork()).ldelim(),null!=e.city&&Object.hasOwnProperty.call(e,"city")&&t.uint32(18).string(e.city),null!=e.experimentStart&&Object.hasOwnProperty.call(e,"experimentStart")&&i.ord.DateTime.encode(e.experimentStart,t.uint32(26).fork()).ldelim(),null!=e.doi&&Object.hasOwnProperty.call(e,"doi")&&t.uint32(34).string(e.doi),null!=e.patent&&Object.hasOwnProperty.call(e,"patent")&&t.uint32(42).string(e.patent),null!=e.publicationUrl&&Object.hasOwnProperty.call(e,"publicationUrl")&&t.uint32(50).string(e.publicationUrl),null!=e.recordCreated&&Object.hasOwnProperty.call(e,"recordCreated")&&i.ord.RecordEvent.encode(e.recordCreated,t.uint32(58).fork()).ldelim(),null!=e.recordModified&&e.recordModified.length)for(let n=0;n<e.recordModified.length;++n)i.ord.RecordEvent.encode(e.recordModified[n],t.uint32(66).fork()).ldelim();if(null!=e.reactionMetadata&&Object.hasOwnProperty.call(e,"reactionMetadata"))for(let n=Object.keys(e.reactionMetadata),r=0;r<n.length;++r)t.uint32(74).fork().uint32(10).string(n[r]),i.ord.Data.encode(e.reactionMetadata[n[r]],t.uint32(18).fork()).ldelim().ldelim();return null!=e.isMined&&Object.hasOwnProperty.call(e,"isMined")&&t.uint32(80).bool(e.isMined),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r,s,a=void 0===n?e.len:e.pos+n,l=new i.ord.ReactionProvenance;for(;e.pos<a;){let t=e.uint32();switch(t>>>3){case 1:l.experimenter=i.ord.Person.decode(e,e.uint32());break;case 2:l.city=e.string();break;case 3:l.experimentStart=i.ord.DateTime.decode(e,e.uint32());break;case 4:l.doi=e.string();break;case 5:l.patent=e.string();break;case 6:l.publicationUrl=e.string();break;case 7:l.recordCreated=i.ord.RecordEvent.decode(e,e.uint32());break;case 8:l.recordModified&&l.recordModified.length||(l.recordModified=[]),l.recordModified.push(i.ord.RecordEvent.decode(e,e.uint32()));break;case 9:{l.reactionMetadata===o.emptyObject&&(l.reactionMetadata={});let t=e.uint32()+e.pos;for(r="",s=null;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=i.ord.Data.decode(e,e.uint32());break;default:e.skipType(7&t)}}l.reactionMetadata[r]=s;break}case 10:l.isMined=e.bool();break;default:e.skipType(7&t)}}return l},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.experimenter&&e.hasOwnProperty("experimenter")){let t=i.ord.Person.verify(e.experimenter);if(t)return"experimenter."+t}if(null!=e.city&&e.hasOwnProperty("city")&&!o.isString(e.city))return"city: string expected";if(null!=e.experimentStart&&e.hasOwnProperty("experimentStart")){let t=i.ord.DateTime.verify(e.experimentStart);if(t)return"experimentStart."+t}if(null!=e.doi&&e.hasOwnProperty("doi")&&!o.isString(e.doi))return"doi: string expected";if(null!=e.patent&&e.hasOwnProperty("patent")&&!o.isString(e.patent))return"patent: string expected";if(null!=e.publicationUrl&&e.hasOwnProperty("publicationUrl")&&!o.isString(e.publicationUrl))return"publicationUrl: string expected";if(null!=e.recordCreated&&e.hasOwnProperty("recordCreated")){let t=i.ord.RecordEvent.verify(e.recordCreated);if(t)return"recordCreated."+t}if(null!=e.recordModified&&e.hasOwnProperty("recordModified")){if(!Array.isArray(e.recordModified))return"recordModified: array expected";for(let t=0;t<e.recordModified.length;++t){let n=i.ord.RecordEvent.verify(e.recordModified[t]);if(n)return"recordModified."+n}}if(null!=e.reactionMetadata&&e.hasOwnProperty("reactionMetadata")){if(!o.isObject(e.reactionMetadata))return"reactionMetadata: object expected";let t=Object.keys(e.reactionMetadata);for(let n=0;n<t.length;++n){let r=i.ord.Data.verify(e.reactionMetadata[t[n]]);if(r)return"reactionMetadata."+r}}return null!=e.isMined&&e.hasOwnProperty("isMined")&&"boolean"!=typeof e.isMined?"isMined: boolean expected":null},n.fromObject=function(e){if(e instanceof i.ord.ReactionProvenance)return e;let t=new i.ord.ReactionProvenance;if(null!=e.experimenter){if("object"!=typeof e.experimenter)throw TypeError(".ord.ReactionProvenance.experimenter: object expected");t.experimenter=i.ord.Person.fromObject(e.experimenter)}if(null!=e.city&&(t.city=String(e.city)),null!=e.experimentStart){if("object"!=typeof e.experimentStart)throw TypeError(".ord.ReactionProvenance.experimentStart: object expected");t.experimentStart=i.ord.DateTime.fromObject(e.experimentStart)}if(null!=e.doi&&(t.doi=String(e.doi)),null!=e.patent&&(t.patent=String(e.patent)),null!=e.publicationUrl&&(t.publicationUrl=String(e.publicationUrl)),null!=e.recordCreated){if("object"!=typeof e.recordCreated)throw TypeError(".ord.ReactionProvenance.recordCreated: object expected");t.recordCreated=i.ord.RecordEvent.fromObject(e.recordCreated)}if(e.recordModified){if(!Array.isArray(e.recordModified))throw TypeError(".ord.ReactionProvenance.recordModified: array expected");t.recordModified=[];for(let n=0;n<e.recordModified.length;++n){if("object"!=typeof e.recordModified[n])throw TypeError(".ord.ReactionProvenance.recordModified: object expected");t.recordModified[n]=i.ord.RecordEvent.fromObject(e.recordModified[n])}}if(e.reactionMetadata){if("object"!=typeof e.reactionMetadata)throw TypeError(".ord.ReactionProvenance.reactionMetadata: object expected");t.reactionMetadata={};for(let n=Object.keys(e.reactionMetadata),r=0;r<n.length;++r){if("object"!=typeof e.reactionMetadata[n[r]])throw TypeError(".ord.ReactionProvenance.reactionMetadata: object expected");t.reactionMetadata[n[r]]=i.ord.Data.fromObject(e.reactionMetadata[n[r]])}}return null!=e.isMined&&(t.isMined=Boolean(e.isMined)),t},n.toObject=function(e,t){t||(t={});let n,r={};if((t.arrays||t.defaults)&&(r.recordModified=[]),(t.objects||t.defaults)&&(r.reactionMetadata={}),t.defaults&&(r.experimenter=null,r.city="",r.experimentStart=null,r.doi="",r.patent="",r.publicationUrl="",r.recordCreated=null),null!=e.experimenter&&e.hasOwnProperty("experimenter")&&(r.experimenter=i.ord.Person.toObject(e.experimenter,t)),null!=e.city&&e.hasOwnProperty("city")&&(r.city=e.city),null!=e.experimentStart&&e.hasOwnProperty("experimentStart")&&(r.experimentStart=i.ord.DateTime.toObject(e.experimentStart,t)),null!=e.doi&&e.hasOwnProperty("doi")&&(r.doi=e.doi),null!=e.patent&&e.hasOwnProperty("patent")&&(r.patent=e.patent),null!=e.publicationUrl&&e.hasOwnProperty("publicationUrl")&&(r.publicationUrl=e.publicationUrl),null!=e.recordCreated&&e.hasOwnProperty("recordCreated")&&(r.recordCreated=i.ord.RecordEvent.toObject(e.recordCreated,t)),e.recordModified&&e.recordModified.length){r.recordModified=[];for(let n=0;n<e.recordModified.length;++n)r.recordModified[n]=i.ord.RecordEvent.toObject(e.recordModified[n],t)}if(e.reactionMetadata&&(n=Object.keys(e.reactionMetadata)).length){r.reactionMetadata={};for(let o=0;o<n.length;++o)r.reactionMetadata[n[o]]=i.ord.Data.toObject(e.reactionMetadata[n[o]],t)}return null!=e.isMined&&e.hasOwnProperty("isMined")&&(r.isMined=e.isMined,t.oneofs&&(r._isMined="isMined")),r},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionProvenance"},n}(),n.Person=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.username="",n.prototype.name="",n.prototype.orcid="",n.prototype.organization="",n.prototype.email="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.username&&Object.hasOwnProperty.call(e,"username")&&t.uint32(10).string(e.username),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(18).string(e.name),null!=e.orcid&&Object.hasOwnProperty.call(e,"orcid")&&t.uint32(26).string(e.orcid),null!=e.organization&&Object.hasOwnProperty.call(e,"organization")&&t.uint32(34).string(e.organization),null!=e.email&&Object.hasOwnProperty.call(e,"email")&&t.uint32(42).string(e.email),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Person;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.username=e.string();break;case 2:o.name=e.string();break;case 3:o.orcid=e.string();break;case 4:o.organization=e.string();break;case 5:o.email=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.username&&e.hasOwnProperty("username")&&!o.isString(e.username)?"username: string expected":null!=e.name&&e.hasOwnProperty("name")&&!o.isString(e.name)?"name: string expected":null!=e.orcid&&e.hasOwnProperty("orcid")&&!o.isString(e.orcid)?"orcid: string expected":null!=e.organization&&e.hasOwnProperty("organization")&&!o.isString(e.organization)?"organization: string expected":null!=e.email&&e.hasOwnProperty("email")&&!o.isString(e.email)?"email: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.Person)return e;let t=new i.ord.Person;return null!=e.username&&(t.username=String(e.username)),null!=e.name&&(t.name=String(e.name)),null!=e.orcid&&(t.orcid=String(e.orcid)),null!=e.organization&&(t.organization=String(e.organization)),null!=e.email&&(t.email=String(e.email)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.username="",n.name="",n.orcid="",n.organization="",n.email=""),null!=e.username&&e.hasOwnProperty("username")&&(n.username=e.username),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.orcid&&e.hasOwnProperty("orcid")&&(n.orcid=e.orcid),null!=e.organization&&e.hasOwnProperty("organization")&&(n.organization=e.organization),null!=e.email&&e.hasOwnProperty("email")&&(n.email=e.email),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Person"},n}(),n.RecordEvent=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.time=null,n.prototype.person=null,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.time&&Object.hasOwnProperty.call(e,"time")&&i.ord.DateTime.encode(e.time,t.uint32(10).fork()).ldelim(),null!=e.person&&Object.hasOwnProperty.call(e,"person")&&i.ord.Person.encode(e.person,t.uint32(18).fork()).ldelim(),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(26).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.RecordEvent;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.time=i.ord.DateTime.decode(e,e.uint32());break;case 2:o.person=i.ord.Person.decode(e,e.uint32());break;case 3:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.time&&e.hasOwnProperty("time")){let t=i.ord.DateTime.verify(e.time);if(t)return"time."+t}if(null!=e.person&&e.hasOwnProperty("person")){let t=i.ord.Person.verify(e.person);if(t)return"person."+t}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.RecordEvent)return e;let t=new i.ord.RecordEvent;if(null!=e.time){if("object"!=typeof e.time)throw TypeError(".ord.RecordEvent.time: object expected");t.time=i.ord.DateTime.fromObject(e.time)}if(null!=e.person){if("object"!=typeof e.person)throw TypeError(".ord.RecordEvent.person: object expected");t.person=i.ord.Person.fromObject(e.person)}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.time=null,n.person=null,n.details=""),null!=e.time&&e.hasOwnProperty("time")&&(n.time=i.ord.DateTime.toObject(e.time,t)),null!=e.person&&e.hasOwnProperty("person")&&(n.person=i.ord.Person.toObject(e.person,t)),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.RecordEvent"},n}(),n.Time=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Time;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 4:case 1:case 2:case 3:}return null},n.fromObject=function(e){if(e instanceof i.ord.Time)return e;let t=new i.ord.Time;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"DAY":case 4:t.units=4;break;case"HOUR":case 1:t.units=1;break;case"MINUTE":case 2:t.units=2;break;case"SECOND":case 3:t.units=3}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Time.TimeUnit[e.units]?e.units:i.ord.Time.TimeUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Time"},n.TimeUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[4]="DAY"]=4,t[e[1]="HOUR"]=1,t[e[2]="MINUTE"]=2,t[e[3]="SECOND"]=3,t}(),n}(),n.Mass=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Mass;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:case 3:case 4:}return null},n.fromObject=function(e){if(e instanceof i.ord.Mass)return e;let t=new i.ord.Mass;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"KILOGRAM":case 1:t.units=1;break;case"GRAM":case 2:t.units=2;break;case"MILLIGRAM":case 3:t.units=3;break;case"MICROGRAM":case 4:t.units=4}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Mass.MassUnit[e.units]?e.units:i.ord.Mass.MassUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Mass"},n.MassUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="KILOGRAM"]=1,t[e[2]="GRAM"]=2,t[e[3]="MILLIGRAM"]=3,t[e[4]="MICROGRAM"]=4,t}(),n}(),n.Moles=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Moles;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:case 3:case 4:}return null},n.fromObject=function(e){if(e instanceof i.ord.Moles)return e;let t=new i.ord.Moles;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"MOLE":case 1:t.units=1;break;case"MILLIMOLE":case 2:t.units=2;break;case"MICROMOLE":case 3:t.units=3;break;case"NANOMOLE":case 4:t.units=4}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Moles.MolesUnit[e.units]?e.units:i.ord.Moles.MolesUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Moles"},n.MolesUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="MOLE"]=1,t[e[2]="MILLIMOLE"]=2,t[e[3]="MICROMOLE"]=3,t[e[4]="NANOMOLE"]=4,t}(),n}(),n.Volume=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Volume;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:case 3:case 4:}return null},n.fromObject=function(e){if(e instanceof i.ord.Volume)return e;let t=new i.ord.Volume;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"LITER":case 1:t.units=1;break;case"MILLILITER":case 2:t.units=2;break;case"MICROLITER":case 3:t.units=3;break;case"NANOLITER":case 4:t.units=4}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Volume.VolumeUnit[e.units]?e.units:i.ord.Volume.VolumeUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Volume"},n.VolumeUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="LITER"]=1,t[e[2]="MILLILITER"]=2,t[e[3]="MICROLITER"]=3,t[e[4]="NANOLITER"]=4,t}(),n}(),n.Concentration=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Concentration;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:case 3:}return null},n.fromObject=function(e){if(e instanceof i.ord.Concentration)return e;let t=new i.ord.Concentration;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"MOLAR":case 1:t.units=1;break;case"MILLIMOLAR":case 2:t.units=2;break;case"MICROMOLAR":case 3:t.units=3}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Concentration.ConcentrationUnit[e.units]?e.units:i.ord.Concentration.ConcentrationUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Concentration"},n.ConcentrationUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="MOLAR"]=1,t[e[2]="MILLIMOLAR"]=2,t[e[3]="MICROMOLAR"]=3,t}(),n}(),n.Pressure=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Pressure;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:}return null},n.fromObject=function(e){if(e instanceof i.ord.Pressure)return e;let t=new i.ord.Pressure;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"BAR":case 1:t.units=1;break;case"ATMOSPHERE":case 2:t.units=2;break;case"PSI":case 3:t.units=3;break;case"KPSI":case 4:t.units=4;break;case"PASCAL":case 5:t.units=5;break;case"KILOPASCAL":case 6:t.units=6;break;case"TORR":case 7:t.units=7;break;case"MM_HG":case 8:t.units=8}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Pressure.PressureUnit[e.units]?e.units:i.ord.Pressure.PressureUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Pressure"},n.PressureUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="BAR"]=1,t[e[2]="ATMOSPHERE"]=2,t[e[3]="PSI"]=3,t[e[4]="KPSI"]=4,t[e[5]="PASCAL"]=5,t[e[6]="KILOPASCAL"]=6,t[e[7]="TORR"]=7,t[e[8]="MM_HG"]=8,t}(),n}(),n.Temperature=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Temperature;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:case 3:}return null},n.fromObject=function(e){if(e instanceof i.ord.Temperature)return e;let t=new i.ord.Temperature;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"CELSIUS":case 1:t.units=1;break;case"FAHRENHEIT":case 2:t.units=2;break;case"KELVIN":case 3:t.units=3}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Temperature.TemperatureUnit[e.units]?e.units:i.ord.Temperature.TemperatureUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Temperature"},n.TemperatureUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CELSIUS"]=1,t[e[2]="FAHRENHEIT"]=2,t[e[3]="KELVIN"]=3,t}(),n}(),n.Current=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Current;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:}return null},n.fromObject=function(e){if(e instanceof i.ord.Current)return e;let t=new i.ord.Current;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"AMPERE":case 1:t.units=1;break;case"MILLIAMPERE":case 2:t.units=2}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Current.CurrentUnit[e.units]?e.units:i.ord.Current.CurrentUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Current"},n.CurrentUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="AMPERE"]=1,t[e[2]="MILLIAMPERE"]=2,t}(),n}(),n.Voltage=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Voltage;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:}return null},n.fromObject=function(e){if(e instanceof i.ord.Voltage)return e;let t=new i.ord.Voltage;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"VOLT":case 1:t.units=1;break;case"MILLIVOLT":case 2:t.units=2}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Voltage.VoltageUnit[e.units]?e.units:i.ord.Voltage.VoltageUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Voltage"},n.VoltageUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="VOLT"]=1,t[e[2]="MILLIVOLT"]=2,t}(),n}(),n.Length=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Length;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:}return null},n.fromObject=function(e){if(e instanceof i.ord.Length)return e;let t=new i.ord.Length;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"CENTIMETER":case 1:t.units=1;break;case"MILLIMETER":case 2:t.units=2;break;case"METER":case 3:t.units=3;break;case"INCH":case 4:t.units=4;break;case"FOOT":case 5:t.units=5}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Length.LengthUnit[e.units]?e.units:i.ord.Length.LengthUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Length"},n.LengthUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CENTIMETER"]=1,t[e[2]="MILLIMETER"]=2,t[e[3]="METER"]=3,t[e[4]="INCH"]=4,t[e[5]="FOOT"]=5,t}(),n}(),n.Wavelength=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Wavelength;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:}return null},n.fromObject=function(e){if(e instanceof i.ord.Wavelength)return e;let t=new i.ord.Wavelength;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"NANOMETER":case 1:t.units=1;break;case"WAVENUMBER":case 2:t.units=2}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Wavelength.WavelengthUnit[e.units]?e.units:i.ord.Wavelength.WavelengthUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Wavelength"},n.WavelengthUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="NANOMETER"]=1,t[e[2]="WAVENUMBER"]=2,t}(),n}(),n.FlowRate=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.FlowRate;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:}return null},n.fromObject=function(e){if(e instanceof i.ord.FlowRate)return e;let t=new i.ord.FlowRate;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"MICROLITER_PER_MINUTE":case 1:t.units=1;break;case"MICROLITER_PER_SECOND":case 2:t.units=2;break;case"MILLILITER_PER_MINUTE":case 3:t.units=3;break;case"MILLILITER_PER_SECOND":case 4:t.units=4;break;case"MICROLITER_PER_HOUR":case 5:t.units=5}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.FlowRate.FlowRateUnit[e.units]?e.units:i.ord.FlowRate.FlowRateUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.FlowRate"},n.FlowRateUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="MICROLITER_PER_MINUTE"]=1,t[e[2]="MICROLITER_PER_SECOND"]=2,t[e[3]="MILLILITER_PER_MINUTE"]=3,t[e[4]="MILLILITER_PER_SECOND"]=4,t[e[5]="MICROLITER_PER_HOUR"]=5,t}(),n}(),n.Percentage=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Percentage;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};return null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value)?"value: number expected":null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision)?"precision: number expected":null},n.fromObject=function(e){if(e instanceof i.ord.Percentage)return e;let t=new i.ord.Percentage;return null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),t},n.toObject=function(e,t){t||(t={});let n={};return null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Percentage"},n}(),n.FloatValue=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.FloatValue;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};return null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value)?"value: number expected":null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision)?"precision: number expected":null},n.fromObject=function(e){if(e instanceof i.ord.FloatValue)return e;let t=new i.ord.FloatValue;return null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),t},n.toObject=function(e,t){t||(t={});let n={};return null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.FloatValue"},n}(),n.Data=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.floatValue=null,n.prototype.integerValue=null,n.prototype.bytesValue=null,n.prototype.stringValue=null,n.prototype.url=null,n.prototype.description="",n.prototype.format="",Object.defineProperty(n.prototype,"kind",{get:o.oneOfGetter(s=["floatValue","integerValue","bytesValue","stringValue","url"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.floatValue&&Object.hasOwnProperty.call(e,"floatValue")&&t.uint32(13).float(e.floatValue),null!=e.integerValue&&Object.hasOwnProperty.call(e,"integerValue")&&t.uint32(16).int32(e.integerValue),null!=e.bytesValue&&Object.hasOwnProperty.call(e,"bytesValue")&&t.uint32(26).bytes(e.bytesValue),null!=e.stringValue&&Object.hasOwnProperty.call(e,"stringValue")&&t.uint32(34).string(e.stringValue),null!=e.url&&Object.hasOwnProperty.call(e,"url")&&t.uint32(42).string(e.url),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(50).string(e.description),null!=e.format&&Object.hasOwnProperty.call(e,"format")&&t.uint32(58).string(e.format),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Data;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.floatValue=e.float();break;case 2:o.integerValue=e.int32();break;case 3:o.bytesValue=e.bytes();break;case 4:o.stringValue=e.string();break;case 5:o.url=e.string();break;case 6:o.description=e.string();break;case 7:o.format=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.floatValue&&e.hasOwnProperty("floatValue")&&(t.kind=1,"number"!=typeof e.floatValue))return"floatValue: number expected";if(null!=e.integerValue&&e.hasOwnProperty("integerValue")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,!o.isInteger(e.integerValue))return"integerValue: integer expected"}if(null!=e.bytesValue&&e.hasOwnProperty("bytesValue")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,!(e.bytesValue&&"number"==typeof e.bytesValue.length||o.isString(e.bytesValue)))return"bytesValue: buffer expected"}if(null!=e.stringValue&&e.hasOwnProperty("stringValue")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,!o.isString(e.stringValue))return"stringValue: string expected"}if(null!=e.url&&e.hasOwnProperty("url")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,!o.isString(e.url))return"url: string expected"}return null!=e.description&&e.hasOwnProperty("description")&&!o.isString(e.description)?"description: string expected":null!=e.format&&e.hasOwnProperty("format")&&!o.isString(e.format)?"format: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.Data)return e;let t=new i.ord.Data;return null!=e.floatValue&&(t.floatValue=Number(e.floatValue)),null!=e.integerValue&&(t.integerValue=0|e.integerValue),null!=e.bytesValue&&("string"==typeof e.bytesValue?o.base64.decode(e.bytesValue,t.bytesValue=o.newBuffer(o.base64.length(e.bytesValue)),0):e.bytesValue.length>=0&&(t.bytesValue=e.bytesValue)),null!=e.stringValue&&(t.stringValue=String(e.stringValue)),null!=e.url&&(t.url=String(e.url)),null!=e.description&&(t.description=String(e.description)),null!=e.format&&(t.format=String(e.format)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.description="",n.format=""),null!=e.floatValue&&e.hasOwnProperty("floatValue")&&(n.floatValue=t.json&&!isFinite(e.floatValue)?String(e.floatValue):e.floatValue,t.oneofs&&(n.kind="floatValue")),null!=e.integerValue&&e.hasOwnProperty("integerValue")&&(n.integerValue=e.integerValue,t.oneofs&&(n.kind="integerValue")),null!=e.bytesValue&&e.hasOwnProperty("bytesValue")&&(n.bytesValue=t.bytes===String?o.base64.encode(e.bytesValue,0,e.bytesValue.length):t.bytes===Array?Array.prototype.slice.call(e.bytesValue):e.bytesValue,t.oneofs&&(n.kind="bytesValue")),null!=e.stringValue&&e.hasOwnProperty("stringValue")&&(n.stringValue=e.stringValue,t.oneofs&&(n.kind="stringValue")),null!=e.url&&e.hasOwnProperty("url")&&(n.url=e.url,t.oneofs&&(n.kind="url")),null!=e.description&&e.hasOwnProperty("description")&&(n.description=e.description),null!=e.format&&e.hasOwnProperty("format")&&(n.format=e.format),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Data"},n}(),n})(),i.ord_test=(()=>{const n={};return n.Scalar=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.int32Value=0,n.prototype.int64Value=o.Long?o.Long.fromBits(0,0,!1):0,n.prototype.floatValue=null,n.prototype.stringValue="",n.prototype.bytesValue=o.newBuffer([]),n.prototype.boolValue=null,Object.defineProperty(n.prototype,"_floatValue",{get:o.oneOfGetter(s=["floatValue"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_boolValue",{get:o.oneOfGetter(s=["boolValue"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.int32Value&&Object.hasOwnProperty.call(e,"int32Value")&&t.uint32(8).int32(e.int32Value),null!=e.int64Value&&Object.hasOwnProperty.call(e,"int64Value")&&t.uint32(16).int64(e.int64Value),null!=e.floatValue&&Object.hasOwnProperty.call(e,"floatValue")&&t.uint32(29).float(e.floatValue),null!=e.stringValue&&Object.hasOwnProperty.call(e,"stringValue")&&t.uint32(34).string(e.stringValue),null!=e.bytesValue&&Object.hasOwnProperty.call(e,"bytesValue")&&t.uint32(42).bytes(e.bytesValue),null!=e.boolValue&&Object.hasOwnProperty.call(e,"boolValue")&&t.uint32(48).bool(e.boolValue),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord_test.Scalar;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.int32Value=e.int32();break;case 2:o.int64Value=e.int64();break;case 3:o.floatValue=e.float();break;case 4:o.stringValue=e.string();break;case 5:o.bytesValue=e.bytes();break;case 6:o.boolValue=e.bool();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};return null!=e.int32Value&&e.hasOwnProperty("int32Value")&&!o.isInteger(e.int32Value)?"int32Value: integer expected":null!=e.int64Value&&e.hasOwnProperty("int64Value")&&!(o.isInteger(e.int64Value)||e.int64Value&&o.isInteger(e.int64Value.low)&&o.isInteger(e.int64Value.high))?"int64Value: integer|Long expected":null!=e.floatValue&&e.hasOwnProperty("floatValue")&&(t._floatValue=1,"number"!=typeof e.floatValue)?"floatValue: number expected":null!=e.stringValue&&e.hasOwnProperty("stringValue")&&!o.isString(e.stringValue)?"stringValue: string expected":null!=e.bytesValue&&e.hasOwnProperty("bytesValue")&&!(e.bytesValue&&"number"==typeof e.bytesValue.length||o.isString(e.bytesValue))?"bytesValue: buffer expected":null!=e.boolValue&&e.hasOwnProperty("boolValue")&&(t._boolValue=1,"boolean"!=typeof e.boolValue)?"boolValue: boolean expected":null},n.fromObject=function(e){if(e instanceof i.ord_test.Scalar)return e;let t=new i.ord_test.Scalar;return null!=e.int32Value&&(t.int32Value=0|e.int32Value),null!=e.int64Value&&(o.Long?(t.int64Value=o.Long.fromValue(e.int64Value)).unsigned=!1:"string"==typeof e.int64Value?t.int64Value=parseInt(e.int64Value,10):"number"==typeof e.int64Value?t.int64Value=e.int64Value:"object"==typeof e.int64Value&&(t.int64Value=new o.LongBits(e.int64Value.low>>>0,e.int64Value.high>>>0).toNumber())),null!=e.floatValue&&(t.floatValue=Number(e.floatValue)),null!=e.stringValue&&(t.stringValue=String(e.stringValue)),null!=e.bytesValue&&("string"==typeof e.bytesValue?o.base64.decode(e.bytesValue,t.bytesValue=o.newBuffer(o.base64.length(e.bytesValue)),0):e.bytesValue.length>=0&&(t.bytesValue=e.bytesValue)),null!=e.boolValue&&(t.boolValue=Boolean(e.boolValue)),t},n.toObject=function(e,t){t||(t={});let n={};if(t.defaults){if(n.int32Value=0,o.Long){let e=new o.Long(0,0,!1);n.int64Value=t.longs===String?e.toString():t.longs===Number?e.toNumber():e}else n.int64Value=t.longs===String?"0":0;n.stringValue="",t.bytes===String?n.bytesValue="":(n.bytesValue=[],t.bytes!==Array&&(n.bytesValue=o.newBuffer(n.bytesValue)))}return null!=e.int32Value&&e.hasOwnProperty("int32Value")&&(n.int32Value=e.int32Value),null!=e.int64Value&&e.hasOwnProperty("int64Value")&&("number"==typeof e.int64Value?n.int64Value=t.longs===String?String(e.int64Value):e.int64Value:n.int64Value=t.longs===String?o.Long.prototype.toString.call(e.int64Value):t.longs===Number?new o.LongBits(e.int64Value.low>>>0,e.int64Value.high>>>0).toNumber():e.int64Value),null!=e.floatValue&&e.hasOwnProperty("floatValue")&&(n.floatValue=t.json&&!isFinite(e.floatValue)?String(e.floatValue):e.floatValue,t.oneofs&&(n._floatValue="floatValue")),null!=e.stringValue&&e.hasOwnProperty("stringValue")&&(n.stringValue=e.stringValue),null!=e.bytesValue&&e.hasOwnProperty("bytesValue")&&(n.bytesValue=t.bytes===String?o.base64.encode(e.bytesValue,0,e.bytesValue.length):t.bytes===Array?Array.prototype.slice.call(e.bytesValue):e.bytesValue),null!=e.boolValue&&e.hasOwnProperty("boolValue")&&(n.boolValue=e.boolValue,t.oneofs&&(n._boolValue="boolValue")),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.Scalar"},n}(),n.RepeatedScalar=function(){function n(e){if(this.values=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.values=o.emptyArray,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.values&&e.values.length){t.uint32(10).fork();for(let n=0;n<e.values.length;++n)t.float(e.values[n]);t.ldelim()}return t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord_test.RepeatedScalar;for(;e.pos<r;){let t=e.uint32();if(t>>>3==1)if(o.values&&o.values.length||(o.values=[]),2==(7&t)){let t=e.uint32()+e.pos;for(;e.pos<t;)o.values.push(e.float())}else o.values.push(e.float());else e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.values&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(let t=0;t<e.values.length;++t)if("number"!=typeof e.values[t])return"values: number[] expected"}return null},n.fromObject=function(e){if(e instanceof i.ord_test.RepeatedScalar)return e;let t=new i.ord_test.RepeatedScalar;if(e.values){if(!Array.isArray(e.values))throw TypeError(".ord_test.RepeatedScalar.values: array expected");t.values=[];for(let n=0;n<e.values.length;++n)t.values[n]=Number(e.values[n])}return t},n.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.values=[]),e.values&&e.values.length){n.values=[];for(let r=0;r<e.values.length;++r)n.values[r]=t.json&&!isFinite(e.values[r])?String(e.values[r]):e.values[r]}return n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.RepeatedScalar"},n}(),n.Enum=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.value=0,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(8).int32(e.value),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord_test.Enum;for(;e.pos<r;){let t=e.uint32();t>>>3==1?o.value=e.int32():e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.value&&e.hasOwnProperty("value"))switch(e.value){default:return"value: enum value expected";case 0:case 1:case 2:}return null},n.fromObject=function(e){if(e instanceof i.ord_test.Enum)return e;let t=new i.ord_test.Enum;switch(e.value){default:if("number"==typeof e.value){t.value=e.value;break}break;case"UNSPECIFIED":case 0:t.value=0;break;case"FIRST":case 1:t.value=1;break;case"SECOND":case 2:t.value=2}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.value=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.enums===String?void 0===i.ord_test.Enum.EnumValues[e.value]?e.value:i.ord_test.Enum.EnumValues[e.value]:e.value),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.Enum"},n.EnumValues=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="FIRST"]=1,t[e[2]="SECOND"]=2,t}(),n}(),n.RepeatedEnum=function(){function n(e){if(this.values=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.values=o.emptyArray,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.values&&e.values.length){t.uint32(10).fork();for(let n=0;n<e.values.length;++n)t.int32(e.values[n]);t.ldelim()}return t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord_test.RepeatedEnum;for(;e.pos<r;){let t=e.uint32();if(t>>>3==1)if(o.values&&o.values.length||(o.values=[]),2==(7&t)){let t=e.uint32()+e.pos;for(;e.pos<t;)o.values.push(e.int32())}else o.values.push(e.int32());else e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.values&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(let t=0;t<e.values.length;++t)switch(e.values[t]){default:return"values: enum value[] expected";case 0:case 1:case 2:}}return null},n.fromObject=function(e){if(e instanceof i.ord_test.RepeatedEnum)return e;let t=new i.ord_test.RepeatedEnum;if(e.values){if(!Array.isArray(e.values))throw TypeError(".ord_test.RepeatedEnum.values: array expected");t.values=[];for(let n=0;n<e.values.length;++n)switch(e.values[n]){default:if("number"==typeof e.values[n]){t.values[n]=e.values[n];break}case"UNSPECIFIED":case 0:t.values[n]=0;break;case"FIRST":case 1:t.values[n]=1;break;case"SECOND":case 2:t.values[n]=2}}return t},n.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.values=[]),e.values&&e.values.length){n.values=[];for(let r=0;r<e.values.length;++r)n.values[r]=t.enums===String?void 0===i.ord_test.RepeatedEnum.EnumValues[e.values[r]]?e.values[r]:i.ord_test.RepeatedEnum.EnumValues[e.values[r]]:e.values[r]}return n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.RepeatedEnum"},n.EnumValues=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="FIRST"]=1,t[e[2]="SECOND"]=2,t}(),n}(),n.Nested=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.child=null,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.child&&Object.hasOwnProperty.call(e,"child")&&i.ord_test.Nested.Child.encode(e.child,t.uint32(10).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord_test.Nested;for(;e.pos<r;){let t=e.uint32();t>>>3==1?o.child=i.ord_test.Nested.Child.decode(e,e.uint32()):e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.child&&e.hasOwnProperty("child")){let t=i.ord_test.Nested.Child.verify(e.child);if(t)return"child."+t}return null},n.fromObject=function(e){if(e instanceof i.ord_test.Nested)return e;let t=new i.ord_test.Nested;if(null!=e.child){if("object"!=typeof e.child)throw TypeError(".ord_test.Nested.child: object expected");t.child=i.ord_test.Nested.Child.fromObject(e.child)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.child=null),null!=e.child&&e.hasOwnProperty("child")&&(n.child=i.ord_test.Nested.Child.toObject(e.child,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.Nested"},n.Child=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord_test.Nested.Child;for(;e.pos<r;){let t=e.uint32();t>>>3==1?o.value=e.float():e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";return null!=e.value&&e.hasOwnProperty("value")&&"number"!=typeof e.value?"value: number expected":null},n.fromObject=function(e){if(e instanceof i.ord_test.Nested.Child)return e;let t=new i.ord_test.Nested.Child;return null!=e.value&&(t.value=Number(e.value)),t},n.toObject=function(e,t){t||(t={});let n={};return null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.Nested.Child"},n}(),n}(),n.RepeatedNested=function(){function n(e){if(this.children=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.children=o.emptyArray,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.children&&e.children.length)for(let n=0;n<e.children.length;++n)i.ord_test.RepeatedNested.Child.encode(e.children[n],t.uint32(10).fork()).ldelim();return t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord_test.RepeatedNested;for(;e.pos<r;){let t=e.uint32();t>>>3==1?(o.children&&o.children.length||(o.children=[]),o.children.push(i.ord_test.RepeatedNested.Child.decode(e,e.uint32()))):e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.children&&e.hasOwnProperty("children")){if(!Array.isArray(e.children))return"children: array expected";for(let t=0;t<e.children.length;++t){let n=i.ord_test.RepeatedNested.Child.verify(e.children[t]);if(n)return"children."+n}}return null},n.fromObject=function(e){if(e instanceof i.ord_test.RepeatedNested)return e;let t=new i.ord_test.RepeatedNested;if(e.children){if(!Array.isArray(e.children))throw TypeError(".ord_test.RepeatedNested.children: array expected");t.children=[];for(let n=0;n<e.children.length;++n){if("object"!=typeof e.children[n])throw TypeError(".ord_test.RepeatedNested.children: object expected");t.children[n]=i.ord_test.RepeatedNested.Child.fromObject(e.children[n])}}return t},n.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.children=[]),e.children&&e.children.length){n.children=[];for(let r=0;r<e.children.length;++r)n.children[r]=i.ord_test.RepeatedNested.Child.toObject(e.children[r],t)}return n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.RepeatedNested"},n.Child=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord_test.RepeatedNested.Child;for(;e.pos<r;){let t=e.uint32();t>>>3==1?o.value=e.float():e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";return null!=e.value&&e.hasOwnProperty("value")&&"number"!=typeof e.value?"value: number expected":null},n.fromObject=function(e){if(e instanceof i.ord_test.RepeatedNested.Child)return e;let t=new i.ord_test.RepeatedNested.Child;return null!=e.value&&(t.value=Number(e.value)),t},n.toObject=function(e,t){t||(t={});let n={};return null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.RepeatedNested.Child"},n}(),n}(),n.Map=function(){function n(e){if(this.values={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.values=o.emptyObject,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.values&&Object.hasOwnProperty.call(e,"values"))for(let n=Object.keys(e.values),r=0;r<n.length;++r)t.uint32(10).fork().uint32(10).string(n[r]).uint32(21).float(e.values[n[r]]).ldelim();return t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r,s,a=void 0===n?e.len:e.pos+n,l=new i.ord_test.Map;for(;e.pos<a;){let t=e.uint32();switch(t>>>3){case 1:{l.values===o.emptyObject&&(l.values={});let t=e.uint32()+e.pos;for(r="",s=0;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=e.float();break;default:e.skipType(7&t)}}l.values[r]=s;break}default:e.skipType(7&t)}}return l},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.values&&e.hasOwnProperty("values")){if(!o.isObject(e.values))return"values: object expected";let t=Object.keys(e.values);for(let n=0;n<t.length;++n)if("number"!=typeof e.values[t[n]])return"values: number{k:string} expected"}return null},n.fromObject=function(e){if(e instanceof i.ord_test.Map)return e;let t=new i.ord_test.Map;if(e.values){if("object"!=typeof e.values)throw TypeError(".ord_test.Map.values: object expected");t.values={};for(let n=Object.keys(e.values),r=0;r<n.length;++r)t.values[n[r]]=Number(e.values[n[r]])}return t},n.toObject=function(e,t){t||(t={});let n,r={};if((t.objects||t.defaults)&&(r.values={}),e.values&&(n=Object.keys(e.values)).length){r.values={};for(let o=0;o<n.length;++o)r.values[n[o]]=t.json&&!isFinite(e.values[n[o]])?String(e.values[n[o]]):e.values[n[o]]}return r},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.Map"},n}(),n.MapNested=function(){function n(e){if(this.children={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.children=o.emptyObject,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.children&&Object.hasOwnProperty.call(e,"children"))for(let n=Object.keys(e.children),r=0;r<n.length;++r)t.uint32(10).fork().uint32(10).string(n[r]),i.ord_test.MapNested.Child.encode(e.children[n[r]],t.uint32(18).fork()).ldelim().ldelim();return t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r,s,a=void 0===n?e.len:e.pos+n,l=new i.ord_test.MapNested;for(;e.pos<a;){let t=e.uint32();switch(t>>>3){case 1:{l.children===o.emptyObject&&(l.children={});let t=e.uint32()+e.pos;for(r="",s=null;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=i.ord_test.MapNested.Child.decode(e,e.uint32());break;default:e.skipType(7&t)}}l.children[r]=s;break}default:e.skipType(7&t)}}return l},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.children&&e.hasOwnProperty("children")){if(!o.isObject(e.children))return"children: object expected";let t=Object.keys(e.children);for(let n=0;n<t.length;++n){let r=i.ord_test.MapNested.Child.verify(e.children[t[n]]);if(r)return"children."+r}}return null},n.fromObject=function(e){if(e instanceof i.ord_test.MapNested)return e;let t=new i.ord_test.MapNested;if(e.children){if("object"!=typeof e.children)throw TypeError(".ord_test.MapNested.children: object expected");t.children={};for(let n=Object.keys(e.children),r=0;r<n.length;++r){if("object"!=typeof e.children[n[r]])throw TypeError(".ord_test.MapNested.children: object expected");t.children[n[r]]=i.ord_test.MapNested.Child.fromObject(e.children[n[r]])}}return t},n.toObject=function(e,t){t||(t={});let n,r={};if((t.objects||t.defaults)&&(r.children={}),e.children&&(n=Object.keys(e.children)).length){r.children={};for(let o=0;o<n.length;++o)r.children[n[o]]=i.ord_test.MapNested.Child.toObject(e.children[n[o]],t)}return r},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.MapNested"},n.Child=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord_test.MapNested.Child;for(;e.pos<r;){let t=e.uint32();t>>>3==1?o.value=e.float():e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";return null!=e.value&&e.hasOwnProperty("value")&&"number"!=typeof e.value?"value: number expected":null},n.fromObject=function(e){if(e instanceof i.ord_test.MapNested.Child)return e;let t=new i.ord_test.MapNested.Child;return null!=e.value&&(t.value=Number(e.value)),t},n.toObject=function(e,t){t||(t={});let n={};return null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.MapNested.Child"},n}(),n}(),n})()})()})();
2
+ (()=>{var e={45(e){"use strict";e.exports=function(e,t){for(var n=new Array(arguments.length-1),r=0,o=2,i=!0;o<arguments.length;)n[r++]=arguments[o++];return new Promise(function(o,s){n[r]=function(e){if(i)if(i=!1,e)s(e);else{for(var t=new Array(arguments.length-1),n=0;n<t.length;)t[n++]=arguments[n];o.apply(null,t)}};try{e.apply(t||null,n)}catch(e){i&&(i=!1,s(e))}})}},839(e,t){"use strict";var n=t;n.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&"="===e.charAt(t);)++n;return Math.ceil(3*e.length)/4-n};for(var r=new Array(64),o=new Array(123),i=0;i<64;)o[r[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;n.encode=function(e,t,n){for(var o,i=null,s=[],a=0,l=0;t<n;){var u=e[t++];switch(l){case 0:s[a++]=r[u>>2],o=(3&u)<<4,l=1;break;case 1:s[a++]=r[o|u>>4],o=(15&u)<<2,l=2;break;case 2:s[a++]=r[o|u>>6],s[a++]=r[63&u],l=0}a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),a=0)}return l&&(s[a++]=r[o],s[a++]=61,1===l&&(s[a++]=61)),i?(a&&i.push(String.fromCharCode.apply(String,s.slice(0,a))),i.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var s="invalid encoding";n.decode=function(e,t,n){for(var r,i=n,a=0,l=0;l<e.length;){var u=e.charCodeAt(l++);if(61===u&&a>1)break;if(void 0===(u=o[u]))throw Error(s);switch(a){case 0:r=u,a=1;break;case 1:t[n++]=r<<2|(48&u)>>4,r=u,a=2;break;case 2:t[n++]=(15&r)<<4|(60&u)>>2,r=u,a=3;break;case 3:t[n++]=(3&r)<<6|u,a=0}}if(1===a)throw Error(s);return n-i},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},358(e){"use strict";function t(){this._listeners=Object.create(null)}e.exports=t,t.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners=Object.create(null);else if(void 0===t)this._listeners[e]=[];else{var n=this._listeners[e];if(!n)return this;for(var r=0;r<n.length;)n[r].fn===t?n.splice(r,1):++r}return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,n)}return this}},410(e){"use strict";function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),r=128===n[3];function o(e,r,o){t[0]=e,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3]}function i(e,r,o){t[0]=e,r[o]=n[3],r[o+1]=n[2],r[o+2]=n[1],r[o+3]=n[0]}function s(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],t[0]}function a(e,r){return n[3]=e[r],n[2]=e[r+1],n[1]=e[r+2],n[0]=e[r+3],t[0]}e.writeFloatLE=r?o:i,e.writeFloatBE=r?i:o,e.readFloatLE=r?s:a,e.readFloatBE=r?a:s}():function(){function t(e,t,n,r){var o=t<0?1:0;if(o&&(t=-t),0===t)e(1/t>0?0:2147483648,n,r);else if(isNaN(t))e(2143289344,n,r);else if(t>34028234663852886e22)e((o<<31|2139095040)>>>0,n,r);else if(t<11754943508222875e-54)e((o<<31|Math.round(t/1401298464324817e-60))>>>0,n,r);else{var i=Math.floor(Math.log(t)/Math.LN2);e((o<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,n,r)}}function s(e,t,n){var r=e(t,n),o=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:o*(1/0):0===i?1401298464324817e-60*o*s:o*Math.pow(2,i-150)*(s+8388608)}e.writeFloatLE=t.bind(null,n),e.writeFloatBE=t.bind(null,r),e.readFloatLE=s.bind(null,o),e.readFloatBE=s.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),r=128===n[7];function o(e,r,o){t[0]=e,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3],r[o+4]=n[4],r[o+5]=n[5],r[o+6]=n[6],r[o+7]=n[7]}function i(e,r,o){t[0]=e,r[o]=n[7],r[o+1]=n[6],r[o+2]=n[5],r[o+3]=n[4],r[o+4]=n[3],r[o+5]=n[2],r[o+6]=n[1],r[o+7]=n[0]}function s(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],n[4]=e[r+4],n[5]=e[r+5],n[6]=e[r+6],n[7]=e[r+7],t[0]}function a(e,r){return n[7]=e[r],n[6]=e[r+1],n[5]=e[r+2],n[4]=e[r+3],n[3]=e[r+4],n[2]=e[r+5],n[1]=e[r+6],n[0]=e[r+7],t[0]}e.writeDoubleLE=r?o:i,e.writeDoubleBE=r?i:o,e.readDoubleLE=r?s:a,e.readDoubleBE=r?a:s}():function(){function t(e,t,n,r,o,i){var s=r<0?1:0;if(s&&(r=-r),0===r)e(0,o,i+t),e(1/r>0?0:2147483648,o,i+n);else if(isNaN(r))e(0,o,i+t),e(2146959360,o,i+n);else if(r>17976931348623157e292)e(0,o,i+t),e((s<<31|2146435072)>>>0,o,i+n);else{var a;if(r<22250738585072014e-324)e((a=r/5e-324)>>>0,o,i+t),e((s<<31|a/4294967296)>>>0,o,i+n);else{var l=Math.floor(Math.log(r)/Math.LN2);1024===l&&(l=1023),e(4503599627370496*(a=r*Math.pow(2,-l))>>>0,o,i+t),e((s<<31|l+1023<<20|1048576*a&1048575)>>>0,o,i+n)}}}function s(e,t,n,r,o){var i=e(r,o+t),s=e(r,o+n),a=2*(s>>31)+1,l=s>>>20&2047,u=4294967296*(1048575&s)+i;return 2047===l?u?NaN:a*(1/0):0===l?5e-324*a*u:a*Math.pow(2,l-1075)*(u+4503599627370496)}e.writeDoubleLE=t.bind(null,n,0,4),e.writeDoubleBE=t.bind(null,r,4,0),e.readDoubleLE=s.bind(null,o,0,4),e.readDoubleBE=s.bind(null,i,4,0)}(),e}function n(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function r(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function i(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},390(e){"use strict";e.exports=function(e,t,n){var r=n||8192,o=r>>>1,i=null,s=r;return function(n){if(n<1||n>o)return e(n);s+n>r&&(i=e(r),s=0);var a=t.call(i,s,s+=n);return 7&s&&(s=1+(7|s)),a}}},447(e,t){"use strict";var n=t;n.length=function(e){for(var t=0,n=0,r=0;r<e.length;++r)(n=e.charCodeAt(r))<128?t+=1:n<2048?t+=2:55296==(64512&n)&&56320==(64512&e.charCodeAt(r+1))?(++r,t+=4):t+=3;return t},n.read=function(e,t,n){if(n-t<1)return"";for(var r="",o=t;o<n;){var i=e[o++];if(i<=127)r+=String.fromCharCode(i);else if(i>=192&&i<224){var s=(31&i)<<6|63&e[o++];r+=s>=128?String.fromCharCode(s):"�"}else if(i>=224&&i<240){var a=(15&i)<<12|(63&e[o++])<<6|63&e[o++];r+=a>=2048?String.fromCharCode(a):"�"}else if(i>=240){var l=(7&i)<<18|(63&e[o++])<<12|(63&e[o++])<<6|63&e[o++];l<65536||l>1114111?r+="�":(l-=65536,r+=String.fromCharCode(55296+(l>>10)),r+=String.fromCharCode(56320+(1023&l)))}}return r},n.write=function(e,t,n){for(var r,o,i=n,s=0;s<e.length;++s)(r=e.charCodeAt(s))<128?t[n++]=r:r<2048?(t[n++]=r>>6|192,t[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(o=e.charCodeAt(s+1)))?(r=65536+((1023&r)<<10)+(1023&o),++s,t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=63&r|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=63&r|128);return n-i}},946(e,t,n){"use strict";e.exports=n(394)},394(e,t,n){"use strict";var r=t;function o(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(449),r.BufferWriter=n(818),r.Reader=n(618),r.BufferReader=n(158),r.util=n(610),r.rpc=n(47),r.roots=n(529),r.configure=o,o()},618(e,t,n){"use strict";e.exports=l;var r,o=n(610),i=o.LongBits,s=o.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var u,c="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")},p=function(){return o.Buffer?function(e){return(l.create=function(e){return o.Buffer.isBuffer(e)?new r(e):c(e)})(e)}:c};function d(){var e=new i(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function y(){if(this.pos+8>this.len)throw a(this,8);return new i(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}l.create=p(),l.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,l.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return u}),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return f(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|f(this.buf,this.pos+=4)},l.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},l.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw a(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,n);if(t===n){var r=o.Buffer;return r?r.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,n)},l.prototype.string=function(){var e=this.bytes();return s.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},l.recursionLimit=o.recursionLimit,l.prototype.skipType=function(e,t){if(void 0===t&&(t=0),t>l.recursionLimit)throw Error("maximum nesting depth exceeded");switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e,t+1);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){r=e,l.create=p(),r._configure();var t=o.Long?"toLong":"toNumber";o.merge(l.prototype,{int64:function(){return d.call(this)[t](!1)},uint64:function(){return d.call(this)[t](!0)},sint64:function(){return d.call(this).zzDecode()[t](!1)},fixed64:function(){return y.call(this)[t](!0)},sfixed64:function(){return y.call(this)[t](!1)}})}},158(e,t,n){"use strict";e.exports=i;var r=n(618);(i.prototype=Object.create(r.prototype)).constructor=i;var o=n(610);function i(e){r.call(this,e)}i._configure=function(){o.Buffer&&(i.prototype._slice=o.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},529(e){"use strict";e.exports=Object.create(null)},47(e,t,n){"use strict";t.Service=n(595)},595(e,t,n){"use strict";e.exports=o;var r=n(610);function o(e,t,n){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(o.prototype=Object.create(r.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,n,o,i,s){if(!i)throw TypeError("request must be specified");var a=this;if(!s)return r.asPromise(e,a,t,n,o,i);if(a.rpcImpl)try{return a.rpcImpl(t,n[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),function(e,n){if(e)return a.emit("error",e,t),s(e);if(null!==n){if(!(n instanceof o))try{n=o[a.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return a.emit("error",e,t),s(e)}return a.emit("data",n,t),s(null,n)}a.end(!0)})}catch(e){return a.emit("error",e,t),void setTimeout(function(){s(e)},0)}else setTimeout(function(){s(Error("already ended"))},0)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},239(e,t,n){"use strict";e.exports=o;var r=n(610);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=o.zero=new o(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var s=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var n=e>>>0,r=(e-n)/4294967296>>>0;return t&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new o(n,r)},o.from=function(e){if("number"==typeof e)return o.fromNumber(e);if(r.isString(e)){if(!r.Long)return o.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):i},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;o.fromHash=function(e){return e===s?i:new o((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},610(e,t,n){"use strict";var r=t;function o(e){return"__proto__"===e||"prototype"===e||"constructor"===e}function i(e){var t="boolean"==typeof arguments[arguments.length-1],n=t?arguments.length-1:arguments.length;t=t&&arguments[arguments.length-1];for(var r=1;r<n;++r){var i=arguments[r];if(i)for(var s=Object.keys(i),a=0;a<s.length;++a)o(s[a])||void 0!==e[s[a]]&&t||(e[s[a]]=i[s[a]])}return e}function s(e){function t(e,n){if(!(this instanceof t))return new t(e,n);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&i(this,n)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}r.asPromise=n(45),r.base64=n(839),r.EventEmitter=n(358),r.float=n(410),r.utf8=n(447),r.pool=n(390),r.LongBits=n(239),r.isUnsafeProperty=o,r.isNode=Boolean(void 0!==n.g&&n.g&&n.g.process&&n.g.process.versions&&n.g.process.versions.node),r.global=r.isNode&&n.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},r.isString=function(e){return"string"==typeof e||e instanceof String},r.isObject=function(e){return e&&"object"==typeof e},r.isset=r.isSet=function(e,t){var n=e[t];return!(null==n||!Object.hasOwnProperty.call(e,t))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},r.Buffer=function(){try{var e=r.global.Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"==typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||function(){try{var e=n(17);return e&&e.isLong?e:null}catch(e){return null}}(),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){var n=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},r.merge=i,r.nestingLimit=32,r.recursionLimit=100,r.makeProp=function(e,t){Object.defineProperty(e,t,{enumerable:!0,configurable:!0,writable:!0})},r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=s,r.ProtocolError=s("ProtocolError"),r.oneOfGetter=function(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=1;return function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},r.oneOfSetter=function(e){return function(t){for(var n=0;n<e.length;++n)e[n]!==t&&delete this[e[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var e=r.Buffer;e?(r._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,n){return new e(t,n)},r._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},449(e,t,n){"use strict";e.exports=p;var r,o=n(610),i=o.LongBits,s=o.base64,a=o.utf8;function l(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function u(){}function c(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function p(){this.len=0,this.head=new l(u,0,0),this.tail=this.head,this.states=null}var d=function(){return o.Buffer?function(){return(p.create=function(){return new r})()}:function(){return new p}};function f(e,t,n){t[n]=255&e}function y(e,t){this.len=e,this.next=void 0,this.val=t}function h(e,t,n){for(var r=e.lo,o=e.hi;o;)t[n++]=127&r|128,r=(r>>>7|o<<25)>>>0,o>>>=7;for(;r>127;)t[n++]=127&r|128,r>>>=7;t[n++]=r}function m(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}p.create=d(),p.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(p.alloc=o.pool(p.alloc,o.Array.prototype.subarray)),p.prototype._push=function(e,t,n){return this.tail=this.tail.next=new l(e,t,n),this.len+=t,this},y.prototype=Object.create(l.prototype),y.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},p.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new y((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},p.prototype.int32=function(e){return(e|=0)<0?this._push(h,10,i.fromNumber(e)):this.uint32(e)},p.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},p.prototype.uint64=function(e){var t=i.from(e);return this._push(h,t.length(),t)},p.prototype.int64=p.prototype.uint64,p.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(h,t.length(),t)},p.prototype.bool=function(e){return this._push(f,1,e?1:0)},p.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},p.prototype.sfixed32=p.prototype.fixed32,p.prototype.fixed64=function(e){var t=i.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},p.prototype.sfixed64=p.prototype.fixed64,p.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},p.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var b=o.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r<e.length;++r)t[n+r]=e[r]};p.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(f,1,0);if(o.isString(e)){var n=p.alloc(t=s.length(e));s.decode(e,n,0),e=n}return this.uint32(t)._push(b,t,e)},p.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(f,1,0)},p.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new l(u,0,0),this.len=0,this},p.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(u,0,0),this.len=0),this},p.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},p.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},p._configure=function(e){r=e,p.create=d(),r._configure()}},818(e,t,n){"use strict";e.exports=i;var r=n(449);(i.prototype=Object.create(r.prototype)).constructor=i;var o=n(610);function i(){r.call(this)}function s(e,t,n){e.length<40?o.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}i._configure=function(){i.alloc=o._Buffer_allocUnsafe,i.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r<e.length;)t[n++]=e[r++]}},i.prototype.bytes=function(e){o.isString(e)&&(e=o._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(s,t,e),this},i._configure()},17(e,t){var n;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,n=function(){var e={};return function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function n(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function r(e){return!0===(e&&e.__isLong__)}function o(e){var t=Math.clz32(e&-e);return e?31-t:t}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0}),n.isLong=r;var i={},s={};function a(e,t){var n,r,o;return t?(o=0<=(e>>>=0)&&e<256)&&(r=s[e])?r:(n=u(e,0,!0),o&&(s[e]=n),n):(o=-128<=(e|=0)&&e<128)&&(r=i[e])?r:(n=u(e,e<0?-1:0,!1),o&&(i[e]=n),n)}function l(e,t){if(isNaN(e))return t?O:b;if(t){if(e<0)return O;if(e>=y)return j}else{if(e<=-h)return S;if(e+1>=h)return P}return e<0?l(-e,t).neg():u(e%f|0,e/f|0,t)}function u(e,t,r){return new n(e,t,r)}n.fromInt=a,n.fromNumber=l,n.fromBits=u;var c=Math.pow;function p(e,t,n){if(0===e.length)throw Error("empty string");if("number"==typeof t?(n=t,t=!1):t=!!t,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t?O:b;if((n=n||10)<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return p(e.substring(1),t,n).neg();for(var o=l(c(n,8)),i=b,s=0;s<e.length;s+=8){var a=Math.min(8,e.length-s),u=parseInt(e.substring(s,s+a),n);if(a<8){var d=l(c(n,a));i=i.mul(d).add(l(u))}else i=(i=i.mul(o)).add(l(u))}return i.unsigned=t,i}function d(e,t){return"number"==typeof e?l(e,t):"string"==typeof e?p(e,t):u(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}n.fromString=p,n.fromValue=d;var f=4294967296,y=f*f,h=y/2,m=a(1<<24),b=a(0);n.ZERO=b;var O=a(0,!0);n.UZERO=O;var g=a(1);n.ONE=g;var w=a(1,!0);n.UONE=w;var v=a(-1);n.NEG_ONE=v;var P=u(-1,2147483647,!1);n.MAX_VALUE=P;var j=u(-1,-1,!0);n.MAX_UNSIGNED_VALUE=j;var S=u(0,-2147483648,!1);n.MIN_VALUE=S;var T=n.prototype;T.toInt=function(){return this.unsigned?this.low>>>0:this.low},T.toNumber=function(){return this.unsigned?(this.high>>>0)*f+(this.low>>>0):this.high*f+(this.low>>>0)},T.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(S)){var t=l(e),n=this.div(t),r=n.mul(t).sub(this);return n.toString(e)+r.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var o=l(c(e,6),this.unsigned),i=this,s="";;){var a=i.div(o),u=(i.sub(a.mul(o)).toInt()>>>0).toString(e);if((i=a).isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}},T.getHighBits=function(){return this.high},T.getHighBitsUnsigned=function(){return this.high>>>0},T.getLowBits=function(){return this.low},T.getLowBitsUnsigned=function(){return this.low>>>0},T.getNumBitsAbs=function(){if(this.isNegative())return this.eq(S)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&!(e&1<<t);t--);return 0!=this.high?t+33:t+1},T.isSafeInteger=function(){var e=this.high>>21;return!e||!this.unsigned&&-1===e&&!(0===this.low&&-2097152===this.high)},T.isZero=function(){return 0===this.high&&0===this.low},T.eqz=T.isZero,T.isNegative=function(){return!this.unsigned&&this.high<0},T.isPositive=function(){return this.unsigned||this.high>=0},T.isOdd=function(){return!(1&~this.low)},T.isEven=function(){return!(1&this.low)},T.equals=function(e){return r(e)||(e=d(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},T.eq=T.equals,T.notEquals=function(e){return!this.eq(e)},T.neq=T.notEquals,T.ne=T.notEquals,T.lessThan=function(e){return this.comp(e)<0},T.lt=T.lessThan,T.lessThanOrEqual=function(e){return this.comp(e)<=0},T.lte=T.lessThanOrEqual,T.le=T.lessThanOrEqual,T.greaterThan=function(e){return this.comp(e)>0},T.gt=T.greaterThan,T.greaterThanOrEqual=function(e){return this.comp(e)>=0},T.gte=T.greaterThanOrEqual,T.ge=T.greaterThanOrEqual,T.compare=function(e){if(r(e)||(e=d(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},T.comp=T.compare,T.negate=function(){return!this.unsigned&&this.eq(S)?S:this.not().add(g)},T.neg=T.negate,T.add=function(e){r(e)||(e=d(e));var t=this.high>>>16,n=65535&this.high,o=this.low>>>16,i=65535&this.low,s=e.high>>>16,a=65535&e.high,l=e.low>>>16,c=0,p=0,f=0,y=0;return f+=(y+=i+(65535&e.low))>>>16,p+=(f+=o+l)>>>16,c+=(p+=n+a)>>>16,c+=t+s,u((f&=65535)<<16|(y&=65535),(c&=65535)<<16|(p&=65535),this.unsigned)},T.subtract=function(e){return r(e)||(e=d(e)),this.add(e.neg())},T.sub=T.subtract,T.multiply=function(e){if(this.isZero())return this;if(r(e)||(e=d(e)),t)return u(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return this.unsigned?O:b;if(this.eq(S))return e.isOdd()?S:b;if(e.eq(S))return this.isOdd()?S:b;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(m)&&e.lt(m))return l(this.toNumber()*e.toNumber(),this.unsigned);var n=this.high>>>16,o=65535&this.high,i=this.low>>>16,s=65535&this.low,a=e.high>>>16,c=65535&e.high,p=e.low>>>16,f=65535&e.low,y=0,h=0,g=0,w=0;return g+=(w+=s*f)>>>16,h+=(g+=i*f)>>>16,g&=65535,h+=(g+=s*p)>>>16,y+=(h+=o*f)>>>16,h&=65535,y+=(h+=i*p)>>>16,h&=65535,y+=(h+=s*c)>>>16,y+=n*f+o*p+i*c+s*a,u((g&=65535)<<16|(w&=65535),(y&=65535)<<16|(h&=65535),this.unsigned)},T.mul=T.multiply,T.divide=function(e){if(r(e)||(e=d(e)),e.isZero())throw Error("division by zero");var n,o,i;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?u((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?O:b;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return O;if(e.gt(this.shru(1)))return w;i=O}else{if(this.eq(S))return e.eq(g)||e.eq(v)?S:e.eq(S)?g:(n=this.shr(1).div(e).shl(1)).eq(b)?e.isNegative()?g:v:(o=this.sub(e.mul(n)),i=n.add(o.div(e)));if(e.eq(S))return this.unsigned?O:b;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();i=b}for(o=this;o.gte(e);){n=Math.max(1,Math.floor(o.toNumber()/e.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),a=s<=48?1:c(2,s-48),p=l(n),f=p.mul(e);f.isNegative()||f.gt(o);)f=(p=l(n-=a,this.unsigned)).mul(e);p.isZero()&&(p=g),i=i.add(p),o=o.sub(f)}return i},T.div=T.divide,T.modulo=function(e){return r(e)||(e=d(e)),t?u((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},T.mod=T.modulo,T.rem=T.modulo,T.not=function(){return u(~this.low,~this.high,this.unsigned)},T.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},T.clz=T.countLeadingZeros,T.countTrailingZeros=function(){return this.low?o(this.low):o(this.high)+32},T.ctz=T.countTrailingZeros,T.and=function(e){return r(e)||(e=d(e)),u(this.low&e.low,this.high&e.high,this.unsigned)},T.or=function(e){return r(e)||(e=d(e)),u(this.low|e.low,this.high|e.high,this.unsigned)},T.xor=function(e){return r(e)||(e=d(e)),u(this.low^e.low,this.high^e.high,this.unsigned)},T.shiftLeft=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?u(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):u(0,this.low<<e-32,this.unsigned)},T.shl=T.shiftLeft,T.shiftRight=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?u(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):u(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},T.shr=T.shiftRight,T.shiftRightUnsigned=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?u(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):u(32===e?this.high:this.high>>>e-32,0,this.unsigned)},T.shru=T.shiftRightUnsigned,T.shr_u=T.shiftRightUnsigned,T.rotateLeft=function(e){var t;return r(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?u(this.high,this.low,this.unsigned):e<32?(t=32-e,u(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned)):(t=32-(e-=32),u(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned))},T.rotl=T.rotateLeft,T.rotateRight=function(e){var t;return r(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?u(this.high,this.low,this.unsigned):e<32?(t=32-e,u(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned)):(t=32-(e-=32),u(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned))},T.rotr=T.rotateRight,T.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},T.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},T.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},T.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},T.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},n.fromBytes=function(e,t,r){return r?n.fromBytesLE(e,t):n.fromBytesBE(e,t)},n.fromBytesLE=function(e,t){return new n(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},n.fromBytesBE=function(e,t){return new n(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)},"function"==typeof BigInt&&(n.fromBigInt=function(e,t){return u(Number(BigInt.asIntN(32,e)),Number(BigInt.asIntN(32,e>>BigInt(32))),t)},n.fromValue=function(e,t){return"bigint"==typeof e?n.fromBigInt(e,t):d(e,t)},T.toBigInt=function(){var e=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|e}),e.default=n}(e),function(e){return e.default||e}(e)}.apply(t,[]),void 0===n||(e.exports=n)}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=n(946);const t=e.Reader,r=e.Writer,o=e.util,i=e.roots.default||(e.roots.default={});i.ord=(()=>{const n={};return n.Reaction=function(){function n(e){if(this.identifiers=[],this.inputs={},this.observations=[],this.workups=[],this.outcomes=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.identifiers=o.emptyArray,n.prototype.inputs=o.emptyObject,n.prototype.setup=null,n.prototype.conditions=null,n.prototype.notes=null,n.prototype.observations=o.emptyArray,n.prototype.workups=o.emptyArray,n.prototype.outcomes=o.emptyArray,n.prototype.provenance=null,n.prototype.reactionId="",n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.identifiers&&e.identifiers.length)for(let n=0;n<e.identifiers.length;++n)i.ord.ReactionIdentifier.encode(e.identifiers[n],t.uint32(10).fork()).ldelim();if(null!=e.inputs&&Object.hasOwnProperty.call(e,"inputs"))for(let n=Object.keys(e.inputs),r=0;r<n.length;++r)t.uint32(18).fork().uint32(10).string(n[r]),i.ord.ReactionInput.encode(e.inputs[n[r]],t.uint32(18).fork()).ldelim().ldelim();if(null!=e.setup&&Object.hasOwnProperty.call(e,"setup")&&i.ord.ReactionSetup.encode(e.setup,t.uint32(26).fork()).ldelim(),null!=e.conditions&&Object.hasOwnProperty.call(e,"conditions")&&i.ord.ReactionConditions.encode(e.conditions,t.uint32(34).fork()).ldelim(),null!=e.notes&&Object.hasOwnProperty.call(e,"notes")&&i.ord.ReactionNotes.encode(e.notes,t.uint32(42).fork()).ldelim(),null!=e.observations&&e.observations.length)for(let n=0;n<e.observations.length;++n)i.ord.ReactionObservation.encode(e.observations[n],t.uint32(50).fork()).ldelim();if(null!=e.workups&&e.workups.length)for(let n=0;n<e.workups.length;++n)i.ord.ReactionWorkup.encode(e.workups[n],t.uint32(58).fork()).ldelim();if(null!=e.outcomes&&e.outcomes.length)for(let n=0;n<e.outcomes.length;++n)i.ord.ReactionOutcome.encode(e.outcomes[n],t.uint32(66).fork()).ldelim();return null!=e.provenance&&Object.hasOwnProperty.call(e,"provenance")&&i.ord.ReactionProvenance.encode(e.provenance,t.uint32(74).fork()).ldelim(),null!=e.reactionId&&Object.hasOwnProperty.call(e,"reactionId")&&t.uint32(82).string(e.reactionId),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r,s,a=void 0===n?e.len:e.pos+n,l=new i.ord.Reaction;for(;e.pos<a;){let t=e.uint32();switch(t>>>3){case 1:l.identifiers&&l.identifiers.length||(l.identifiers=[]),l.identifiers.push(i.ord.ReactionIdentifier.decode(e,e.uint32()));break;case 2:{l.inputs===o.emptyObject&&(l.inputs={});let t=e.uint32()+e.pos;for(r="",s=null;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=i.ord.ReactionInput.decode(e,e.uint32());break;default:e.skipType(7&t)}}l.inputs[r]=s;break}case 3:l.setup=i.ord.ReactionSetup.decode(e,e.uint32());break;case 4:l.conditions=i.ord.ReactionConditions.decode(e,e.uint32());break;case 5:l.notes=i.ord.ReactionNotes.decode(e,e.uint32());break;case 6:l.observations&&l.observations.length||(l.observations=[]),l.observations.push(i.ord.ReactionObservation.decode(e,e.uint32()));break;case 7:l.workups&&l.workups.length||(l.workups=[]),l.workups.push(i.ord.ReactionWorkup.decode(e,e.uint32()));break;case 8:l.outcomes&&l.outcomes.length||(l.outcomes=[]),l.outcomes.push(i.ord.ReactionOutcome.decode(e,e.uint32()));break;case 9:l.provenance=i.ord.ReactionProvenance.decode(e,e.uint32());break;case 10:l.reactionId=e.string();break;default:e.skipType(7&t)}}return l},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.identifiers&&e.hasOwnProperty("identifiers")){if(!Array.isArray(e.identifiers))return"identifiers: array expected";for(let t=0;t<e.identifiers.length;++t){let n=i.ord.ReactionIdentifier.verify(e.identifiers[t]);if(n)return"identifiers."+n}}if(null!=e.inputs&&e.hasOwnProperty("inputs")){if(!o.isObject(e.inputs))return"inputs: object expected";let t=Object.keys(e.inputs);for(let n=0;n<t.length;++n){let r=i.ord.ReactionInput.verify(e.inputs[t[n]]);if(r)return"inputs."+r}}if(null!=e.setup&&e.hasOwnProperty("setup")){let t=i.ord.ReactionSetup.verify(e.setup);if(t)return"setup."+t}if(null!=e.conditions&&e.hasOwnProperty("conditions")){let t=i.ord.ReactionConditions.verify(e.conditions);if(t)return"conditions."+t}if(null!=e.notes&&e.hasOwnProperty("notes")){let t=i.ord.ReactionNotes.verify(e.notes);if(t)return"notes."+t}if(null!=e.observations&&e.hasOwnProperty("observations")){if(!Array.isArray(e.observations))return"observations: array expected";for(let t=0;t<e.observations.length;++t){let n=i.ord.ReactionObservation.verify(e.observations[t]);if(n)return"observations."+n}}if(null!=e.workups&&e.hasOwnProperty("workups")){if(!Array.isArray(e.workups))return"workups: array expected";for(let t=0;t<e.workups.length;++t){let n=i.ord.ReactionWorkup.verify(e.workups[t]);if(n)return"workups."+n}}if(null!=e.outcomes&&e.hasOwnProperty("outcomes")){if(!Array.isArray(e.outcomes))return"outcomes: array expected";for(let t=0;t<e.outcomes.length;++t){let n=i.ord.ReactionOutcome.verify(e.outcomes[t]);if(n)return"outcomes."+n}}if(null!=e.provenance&&e.hasOwnProperty("provenance")){let t=i.ord.ReactionProvenance.verify(e.provenance);if(t)return"provenance."+t}return null!=e.reactionId&&e.hasOwnProperty("reactionId")&&!o.isString(e.reactionId)?"reactionId: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.Reaction)return e;let t=new i.ord.Reaction;if(e.identifiers){if(!Array.isArray(e.identifiers))throw TypeError(".ord.Reaction.identifiers: array expected");t.identifiers=[];for(let n=0;n<e.identifiers.length;++n){if("object"!=typeof e.identifiers[n])throw TypeError(".ord.Reaction.identifiers: object expected");t.identifiers[n]=i.ord.ReactionIdentifier.fromObject(e.identifiers[n])}}if(e.inputs){if("object"!=typeof e.inputs)throw TypeError(".ord.Reaction.inputs: object expected");t.inputs={};for(let n=Object.keys(e.inputs),r=0;r<n.length;++r){if("object"!=typeof e.inputs[n[r]])throw TypeError(".ord.Reaction.inputs: object expected");t.inputs[n[r]]=i.ord.ReactionInput.fromObject(e.inputs[n[r]])}}if(null!=e.setup){if("object"!=typeof e.setup)throw TypeError(".ord.Reaction.setup: object expected");t.setup=i.ord.ReactionSetup.fromObject(e.setup)}if(null!=e.conditions){if("object"!=typeof e.conditions)throw TypeError(".ord.Reaction.conditions: object expected");t.conditions=i.ord.ReactionConditions.fromObject(e.conditions)}if(null!=e.notes){if("object"!=typeof e.notes)throw TypeError(".ord.Reaction.notes: object expected");t.notes=i.ord.ReactionNotes.fromObject(e.notes)}if(e.observations){if(!Array.isArray(e.observations))throw TypeError(".ord.Reaction.observations: array expected");t.observations=[];for(let n=0;n<e.observations.length;++n){if("object"!=typeof e.observations[n])throw TypeError(".ord.Reaction.observations: object expected");t.observations[n]=i.ord.ReactionObservation.fromObject(e.observations[n])}}if(e.workups){if(!Array.isArray(e.workups))throw TypeError(".ord.Reaction.workups: array expected");t.workups=[];for(let n=0;n<e.workups.length;++n){if("object"!=typeof e.workups[n])throw TypeError(".ord.Reaction.workups: object expected");t.workups[n]=i.ord.ReactionWorkup.fromObject(e.workups[n])}}if(e.outcomes){if(!Array.isArray(e.outcomes))throw TypeError(".ord.Reaction.outcomes: array expected");t.outcomes=[];for(let n=0;n<e.outcomes.length;++n){if("object"!=typeof e.outcomes[n])throw TypeError(".ord.Reaction.outcomes: object expected");t.outcomes[n]=i.ord.ReactionOutcome.fromObject(e.outcomes[n])}}if(null!=e.provenance){if("object"!=typeof e.provenance)throw TypeError(".ord.Reaction.provenance: object expected");t.provenance=i.ord.ReactionProvenance.fromObject(e.provenance)}return null!=e.reactionId&&(t.reactionId=String(e.reactionId)),t},n.toObject=function(e,t){t||(t={});let n,r={};if((t.arrays||t.defaults)&&(r.identifiers=[],r.observations=[],r.workups=[],r.outcomes=[]),(t.objects||t.defaults)&&(r.inputs={}),t.defaults&&(r.setup=null,r.conditions=null,r.notes=null,r.provenance=null,r.reactionId=""),e.identifiers&&e.identifiers.length){r.identifiers=[];for(let n=0;n<e.identifiers.length;++n)r.identifiers[n]=i.ord.ReactionIdentifier.toObject(e.identifiers[n],t)}if(e.inputs&&(n=Object.keys(e.inputs)).length){r.inputs={};for(let o=0;o<n.length;++o)r.inputs[n[o]]=i.ord.ReactionInput.toObject(e.inputs[n[o]],t)}if(null!=e.setup&&e.hasOwnProperty("setup")&&(r.setup=i.ord.ReactionSetup.toObject(e.setup,t)),null!=e.conditions&&e.hasOwnProperty("conditions")&&(r.conditions=i.ord.ReactionConditions.toObject(e.conditions,t)),null!=e.notes&&e.hasOwnProperty("notes")&&(r.notes=i.ord.ReactionNotes.toObject(e.notes,t)),e.observations&&e.observations.length){r.observations=[];for(let n=0;n<e.observations.length;++n)r.observations[n]=i.ord.ReactionObservation.toObject(e.observations[n],t)}if(e.workups&&e.workups.length){r.workups=[];for(let n=0;n<e.workups.length;++n)r.workups[n]=i.ord.ReactionWorkup.toObject(e.workups[n],t)}if(e.outcomes&&e.outcomes.length){r.outcomes=[];for(let n=0;n<e.outcomes.length;++n)r.outcomes[n]=i.ord.ReactionOutcome.toObject(e.outcomes[n],t)}return null!=e.provenance&&e.hasOwnProperty("provenance")&&(r.provenance=i.ord.ReactionProvenance.toObject(e.provenance,t)),null!=e.reactionId&&e.hasOwnProperty("reactionId")&&(r.reactionId=e.reactionId),r},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Reaction"},n}(),n.ReactionIdentifier=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.type=0,n.prototype.details="",n.prototype.value="",n.prototype.isMapped=null,Object.defineProperty(n.prototype,"_isMapped",{get:o.oneOfGetter(s=["isMapped"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(26).string(e.value),null!=e.isMapped&&Object.hasOwnProperty.call(e,"isMapped")&&t.uint32(32).bool(e.isMapped),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionIdentifier;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.value=e.string();break;case 4:o.isMapped=e.bool();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 6:case 3:case 4:case 5:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null!=e.value&&e.hasOwnProperty("value")&&!o.isString(e.value)?"value: string expected":null!=e.isMapped&&e.hasOwnProperty("isMapped")&&"boolean"!=typeof e.isMapped?"isMapped: boolean expected":null},n.fromObject=function(e){if(e instanceof i.ord.ReactionIdentifier)return e;let t=new i.ord.ReactionIdentifier;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"REACTION_SMILES":case 2:t.type=2;break;case"REACTION_CXSMILES":case 6:t.type=6;break;case"RDFILE":case 3:t.type=3;break;case"RINCHI":case 4:t.type=4;break;case"REACTION_TYPE":case 5:t.type=5}return null!=e.details&&(t.details=String(e.details)),null!=e.value&&(t.value=String(e.value)),null!=e.isMapped&&(t.isMapped=Boolean(e.isMapped)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.value=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ReactionIdentifier.ReactionIdentifierType[e.type]?e.type:i.ord.ReactionIdentifier.ReactionIdentifierType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.value&&e.hasOwnProperty("value")&&(n.value=e.value),null!=e.isMapped&&e.hasOwnProperty("isMapped")&&(n.isMapped=e.isMapped,t.oneofs&&(n._isMapped="isMapped")),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionIdentifier"},n.ReactionIdentifierType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="REACTION_SMILES"]=2,t[e[6]="REACTION_CXSMILES"]=6,t[e[3]="RDFILE"]=3,t[e[4]="RINCHI"]=4,t[e[5]="REACTION_TYPE"]=5,t}(),n}(),n.ReactionInput=function(){function n(e){if(this.components=[],this.crudeComponents=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.components=o.emptyArray,n.prototype.crudeComponents=o.emptyArray,n.prototype.additionOrder=0,n.prototype.additionTime=null,n.prototype.additionSpeed=null,n.prototype.additionDuration=null,n.prototype.flowRate=null,n.prototype.additionDevice=null,n.prototype.additionTemperature=null,n.prototype.texture=null,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.components&&e.components.length)for(let n=0;n<e.components.length;++n)i.ord.Compound.encode(e.components[n],t.uint32(10).fork()).ldelim();if(null!=e.crudeComponents&&e.crudeComponents.length)for(let n=0;n<e.crudeComponents.length;++n)i.ord.CrudeComponent.encode(e.crudeComponents[n],t.uint32(18).fork()).ldelim();return null!=e.additionOrder&&Object.hasOwnProperty.call(e,"additionOrder")&&t.uint32(24).int32(e.additionOrder),null!=e.additionTime&&Object.hasOwnProperty.call(e,"additionTime")&&i.ord.Time.encode(e.additionTime,t.uint32(34).fork()).ldelim(),null!=e.additionSpeed&&Object.hasOwnProperty.call(e,"additionSpeed")&&i.ord.ReactionInput.AdditionSpeed.encode(e.additionSpeed,t.uint32(42).fork()).ldelim(),null!=e.additionDuration&&Object.hasOwnProperty.call(e,"additionDuration")&&i.ord.Time.encode(e.additionDuration,t.uint32(50).fork()).ldelim(),null!=e.flowRate&&Object.hasOwnProperty.call(e,"flowRate")&&i.ord.FlowRate.encode(e.flowRate,t.uint32(58).fork()).ldelim(),null!=e.additionDevice&&Object.hasOwnProperty.call(e,"additionDevice")&&i.ord.ReactionInput.AdditionDevice.encode(e.additionDevice,t.uint32(66).fork()).ldelim(),null!=e.additionTemperature&&Object.hasOwnProperty.call(e,"additionTemperature")&&i.ord.Temperature.encode(e.additionTemperature,t.uint32(74).fork()).ldelim(),null!=e.texture&&Object.hasOwnProperty.call(e,"texture")&&i.ord.Texture.encode(e.texture,t.uint32(82).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionInput;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.components&&o.components.length||(o.components=[]),o.components.push(i.ord.Compound.decode(e,e.uint32()));break;case 2:o.crudeComponents&&o.crudeComponents.length||(o.crudeComponents=[]),o.crudeComponents.push(i.ord.CrudeComponent.decode(e,e.uint32()));break;case 3:o.additionOrder=e.int32();break;case 4:o.additionTime=i.ord.Time.decode(e,e.uint32());break;case 5:o.additionSpeed=i.ord.ReactionInput.AdditionSpeed.decode(e,e.uint32());break;case 6:o.additionDuration=i.ord.Time.decode(e,e.uint32());break;case 7:o.flowRate=i.ord.FlowRate.decode(e,e.uint32());break;case 8:o.additionDevice=i.ord.ReactionInput.AdditionDevice.decode(e,e.uint32());break;case 9:o.additionTemperature=i.ord.Temperature.decode(e,e.uint32());break;case 10:o.texture=i.ord.Texture.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.components&&e.hasOwnProperty("components")){if(!Array.isArray(e.components))return"components: array expected";for(let t=0;t<e.components.length;++t){let n=i.ord.Compound.verify(e.components[t]);if(n)return"components."+n}}if(null!=e.crudeComponents&&e.hasOwnProperty("crudeComponents")){if(!Array.isArray(e.crudeComponents))return"crudeComponents: array expected";for(let t=0;t<e.crudeComponents.length;++t){let n=i.ord.CrudeComponent.verify(e.crudeComponents[t]);if(n)return"crudeComponents."+n}}if(null!=e.additionOrder&&e.hasOwnProperty("additionOrder")&&!o.isInteger(e.additionOrder))return"additionOrder: integer expected";if(null!=e.additionTime&&e.hasOwnProperty("additionTime")){let t=i.ord.Time.verify(e.additionTime);if(t)return"additionTime."+t}if(null!=e.additionSpeed&&e.hasOwnProperty("additionSpeed")){let t=i.ord.ReactionInput.AdditionSpeed.verify(e.additionSpeed);if(t)return"additionSpeed."+t}if(null!=e.additionDuration&&e.hasOwnProperty("additionDuration")){let t=i.ord.Time.verify(e.additionDuration);if(t)return"additionDuration."+t}if(null!=e.flowRate&&e.hasOwnProperty("flowRate")){let t=i.ord.FlowRate.verify(e.flowRate);if(t)return"flowRate."+t}if(null!=e.additionDevice&&e.hasOwnProperty("additionDevice")){let t=i.ord.ReactionInput.AdditionDevice.verify(e.additionDevice);if(t)return"additionDevice."+t}if(null!=e.additionTemperature&&e.hasOwnProperty("additionTemperature")){let t=i.ord.Temperature.verify(e.additionTemperature);if(t)return"additionTemperature."+t}if(null!=e.texture&&e.hasOwnProperty("texture")){let t=i.ord.Texture.verify(e.texture);if(t)return"texture."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.ReactionInput)return e;let t=new i.ord.ReactionInput;if(e.components){if(!Array.isArray(e.components))throw TypeError(".ord.ReactionInput.components: array expected");t.components=[];for(let n=0;n<e.components.length;++n){if("object"!=typeof e.components[n])throw TypeError(".ord.ReactionInput.components: object expected");t.components[n]=i.ord.Compound.fromObject(e.components[n])}}if(e.crudeComponents){if(!Array.isArray(e.crudeComponents))throw TypeError(".ord.ReactionInput.crudeComponents: array expected");t.crudeComponents=[];for(let n=0;n<e.crudeComponents.length;++n){if("object"!=typeof e.crudeComponents[n])throw TypeError(".ord.ReactionInput.crudeComponents: object expected");t.crudeComponents[n]=i.ord.CrudeComponent.fromObject(e.crudeComponents[n])}}if(null!=e.additionOrder&&(t.additionOrder=0|e.additionOrder),null!=e.additionTime){if("object"!=typeof e.additionTime)throw TypeError(".ord.ReactionInput.additionTime: object expected");t.additionTime=i.ord.Time.fromObject(e.additionTime)}if(null!=e.additionSpeed){if("object"!=typeof e.additionSpeed)throw TypeError(".ord.ReactionInput.additionSpeed: object expected");t.additionSpeed=i.ord.ReactionInput.AdditionSpeed.fromObject(e.additionSpeed)}if(null!=e.additionDuration){if("object"!=typeof e.additionDuration)throw TypeError(".ord.ReactionInput.additionDuration: object expected");t.additionDuration=i.ord.Time.fromObject(e.additionDuration)}if(null!=e.flowRate){if("object"!=typeof e.flowRate)throw TypeError(".ord.ReactionInput.flowRate: object expected");t.flowRate=i.ord.FlowRate.fromObject(e.flowRate)}if(null!=e.additionDevice){if("object"!=typeof e.additionDevice)throw TypeError(".ord.ReactionInput.additionDevice: object expected");t.additionDevice=i.ord.ReactionInput.AdditionDevice.fromObject(e.additionDevice)}if(null!=e.additionTemperature){if("object"!=typeof e.additionTemperature)throw TypeError(".ord.ReactionInput.additionTemperature: object expected");t.additionTemperature=i.ord.Temperature.fromObject(e.additionTemperature)}if(null!=e.texture){if("object"!=typeof e.texture)throw TypeError(".ord.ReactionInput.texture: object expected");t.texture=i.ord.Texture.fromObject(e.texture)}return t},n.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.components=[],n.crudeComponents=[]),t.defaults&&(n.additionOrder=0,n.additionTime=null,n.additionSpeed=null,n.additionDuration=null,n.flowRate=null,n.additionDevice=null,n.additionTemperature=null,n.texture=null),e.components&&e.components.length){n.components=[];for(let r=0;r<e.components.length;++r)n.components[r]=i.ord.Compound.toObject(e.components[r],t)}if(e.crudeComponents&&e.crudeComponents.length){n.crudeComponents=[];for(let r=0;r<e.crudeComponents.length;++r)n.crudeComponents[r]=i.ord.CrudeComponent.toObject(e.crudeComponents[r],t)}return null!=e.additionOrder&&e.hasOwnProperty("additionOrder")&&(n.additionOrder=e.additionOrder),null!=e.additionTime&&e.hasOwnProperty("additionTime")&&(n.additionTime=i.ord.Time.toObject(e.additionTime,t)),null!=e.additionSpeed&&e.hasOwnProperty("additionSpeed")&&(n.additionSpeed=i.ord.ReactionInput.AdditionSpeed.toObject(e.additionSpeed,t)),null!=e.additionDuration&&e.hasOwnProperty("additionDuration")&&(n.additionDuration=i.ord.Time.toObject(e.additionDuration,t)),null!=e.flowRate&&e.hasOwnProperty("flowRate")&&(n.flowRate=i.ord.FlowRate.toObject(e.flowRate,t)),null!=e.additionDevice&&e.hasOwnProperty("additionDevice")&&(n.additionDevice=i.ord.ReactionInput.AdditionDevice.toObject(e.additionDevice,t)),null!=e.additionTemperature&&e.hasOwnProperty("additionTemperature")&&(n.additionTemperature=i.ord.Temperature.toObject(e.additionTemperature,t)),null!=e.texture&&e.hasOwnProperty("texture")&&(n.texture=i.ord.Texture.toObject(e.texture,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionInput"},n.AdditionSpeed=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionInput.AdditionSpeed;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.ReactionInput.AdditionSpeed)return e;let t=new i.ord.ReactionInput.AdditionSpeed;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"ALL_AT_ONCE":case 1:t.type=1;break;case"FAST":case 2:t.type=2;break;case"SLOW":case 3:t.type=3;break;case"DROPWISE":case 4:t.type=4;break;case"CONTINUOUS":case 5:t.type=5;break;case"PORTIONWISE":case 6:t.type=6}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ReactionInput.AdditionSpeed.AdditionSpeedType[e.type]?e.type:i.ord.ReactionInput.AdditionSpeed.AdditionSpeedType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionInput.AdditionSpeed"},n.AdditionSpeedType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="ALL_AT_ONCE"]=1,t[e[2]="FAST"]=2,t[e[3]="SLOW"]=3,t[e[4]="DROPWISE"]=4,t[e[5]="CONTINUOUS"]=5,t[e[6]="PORTIONWISE"]=6,t}(),n}(),n.AdditionDevice=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionInput.AdditionDevice;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.ReactionInput.AdditionDevice)return e;let t=new i.ord.ReactionInput.AdditionDevice;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"NONE":case 2:t.type=2;break;case"SYRINGE":case 3:t.type=3;break;case"CANNULA":case 4:t.type=4;break;case"ADDITION_FUNNEL":case 5:t.type=5;break;case"PIPETTE":case 6:t.type=6;break;case"POSITIVE_DISPLACEMENT_PIPETTE":case 7:t.type=7;break;case"PISTON_PUMP":case 8:t.type=8;break;case"SYRINGE_PUMP":case 9:t.type=9;break;case"PERISTALTIC_PUMP":case 10:t.type=10}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ReactionInput.AdditionDevice.AdditionDeviceType[e.type]?e.type:i.ord.ReactionInput.AdditionDevice.AdditionDeviceType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionInput.AdditionDevice"},n.AdditionDeviceType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="NONE"]=2,t[e[3]="SYRINGE"]=3,t[e[4]="CANNULA"]=4,t[e[5]="ADDITION_FUNNEL"]=5,t[e[6]="PIPETTE"]=6,t[e[7]="POSITIVE_DISPLACEMENT_PIPETTE"]=7,t[e[8]="PISTON_PUMP"]=8,t[e[9]="SYRINGE_PUMP"]=9,t[e[10]="PERISTALTIC_PUMP"]=10,t}(),n}(),n}(),n.Amount=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.mass=null,n.prototype.moles=null,n.prototype.volume=null,n.prototype.unmeasured=null,n.prototype.volumeIncludesSolutes=null,Object.defineProperty(n.prototype,"kind",{get:o.oneOfGetter(s=["mass","moles","volume","unmeasured"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_volumeIncludesSolutes",{get:o.oneOfGetter(s=["volumeIncludesSolutes"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.mass&&Object.hasOwnProperty.call(e,"mass")&&i.ord.Mass.encode(e.mass,t.uint32(10).fork()).ldelim(),null!=e.moles&&Object.hasOwnProperty.call(e,"moles")&&i.ord.Moles.encode(e.moles,t.uint32(18).fork()).ldelim(),null!=e.volume&&Object.hasOwnProperty.call(e,"volume")&&i.ord.Volume.encode(e.volume,t.uint32(26).fork()).ldelim(),null!=e.volumeIncludesSolutes&&Object.hasOwnProperty.call(e,"volumeIncludesSolutes")&&t.uint32(32).bool(e.volumeIncludesSolutes),null!=e.unmeasured&&Object.hasOwnProperty.call(e,"unmeasured")&&i.ord.UnmeasuredAmount.encode(e.unmeasured,t.uint32(42).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Amount;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.mass=i.ord.Mass.decode(e,e.uint32());break;case 2:o.moles=i.ord.Moles.decode(e,e.uint32());break;case 3:o.volume=i.ord.Volume.decode(e,e.uint32());break;case 5:o.unmeasured=i.ord.UnmeasuredAmount.decode(e,e.uint32());break;case 4:o.volumeIncludesSolutes=e.bool();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.mass&&e.hasOwnProperty("mass")){t.kind=1;{let t=i.ord.Mass.verify(e.mass);if(t)return"mass."+t}}if(null!=e.moles&&e.hasOwnProperty("moles")){if(1===t.kind)return"kind: multiple values";t.kind=1;{let t=i.ord.Moles.verify(e.moles);if(t)return"moles."+t}}if(null!=e.volume&&e.hasOwnProperty("volume")){if(1===t.kind)return"kind: multiple values";t.kind=1;{let t=i.ord.Volume.verify(e.volume);if(t)return"volume."+t}}if(null!=e.unmeasured&&e.hasOwnProperty("unmeasured")){if(1===t.kind)return"kind: multiple values";t.kind=1;{let t=i.ord.UnmeasuredAmount.verify(e.unmeasured);if(t)return"unmeasured."+t}}return null!=e.volumeIncludesSolutes&&e.hasOwnProperty("volumeIncludesSolutes")&&(t._volumeIncludesSolutes=1,"boolean"!=typeof e.volumeIncludesSolutes)?"volumeIncludesSolutes: boolean expected":null},n.fromObject=function(e){if(e instanceof i.ord.Amount)return e;let t=new i.ord.Amount;if(null!=e.mass){if("object"!=typeof e.mass)throw TypeError(".ord.Amount.mass: object expected");t.mass=i.ord.Mass.fromObject(e.mass)}if(null!=e.moles){if("object"!=typeof e.moles)throw TypeError(".ord.Amount.moles: object expected");t.moles=i.ord.Moles.fromObject(e.moles)}if(null!=e.volume){if("object"!=typeof e.volume)throw TypeError(".ord.Amount.volume: object expected");t.volume=i.ord.Volume.fromObject(e.volume)}if(null!=e.unmeasured){if("object"!=typeof e.unmeasured)throw TypeError(".ord.Amount.unmeasured: object expected");t.unmeasured=i.ord.UnmeasuredAmount.fromObject(e.unmeasured)}return null!=e.volumeIncludesSolutes&&(t.volumeIncludesSolutes=Boolean(e.volumeIncludesSolutes)),t},n.toObject=function(e,t){t||(t={});let n={};return null!=e.mass&&e.hasOwnProperty("mass")&&(n.mass=i.ord.Mass.toObject(e.mass,t),t.oneofs&&(n.kind="mass")),null!=e.moles&&e.hasOwnProperty("moles")&&(n.moles=i.ord.Moles.toObject(e.moles,t),t.oneofs&&(n.kind="moles")),null!=e.volume&&e.hasOwnProperty("volume")&&(n.volume=i.ord.Volume.toObject(e.volume,t),t.oneofs&&(n.kind="volume")),null!=e.volumeIncludesSolutes&&e.hasOwnProperty("volumeIncludesSolutes")&&(n.volumeIncludesSolutes=e.volumeIncludesSolutes,t.oneofs&&(n._volumeIncludesSolutes="volumeIncludesSolutes")),null!=e.unmeasured&&e.hasOwnProperty("unmeasured")&&(n.unmeasured=i.ord.UnmeasuredAmount.toObject(e.unmeasured,t),t.oneofs&&(n.kind="unmeasured")),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Amount"},n}(),n.UnmeasuredAmount=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.UnmeasuredAmount;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.UnmeasuredAmount)return e;let t=new i.ord.UnmeasuredAmount;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"SATURATED":case 2:t.type=2;break;case"CATALYTIC":case 3:t.type=3;break;case"TITRATED":case 4:t.type=4}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.UnmeasuredAmount.UnmeasuredAmountType[e.type]?e.type:i.ord.UnmeasuredAmount.UnmeasuredAmountType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.UnmeasuredAmount"},n.UnmeasuredAmountType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="SATURATED"]=2,t[e[3]="CATALYTIC"]=3,t[e[4]="TITRATED"]=4,t}(),n}(),n.Texture=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Texture;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.Texture)return e;let t=new i.ord.Texture;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"POWDER":case 2:t.type=2;break;case"CRYSTAL":case 3:t.type=3;break;case"OIL":case 4:t.type=4;break;case"AMORPHOUS_SOLID":case 5:t.type=5;break;case"FOAM":case 6:t.type=6;break;case"WAX":case 7:t.type=7;break;case"SEMI_SOLID":case 8:t.type=8;break;case"SOLID":case 9:t.type=9;break;case"LIQUID":case 10:t.type=10;break;case"GAS":case 11:t.type=11}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.Texture.TextureType[e.type]?e.type:i.ord.Texture.TextureType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Texture"},n.TextureType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="POWDER"]=2,t[e[3]="CRYSTAL"]=3,t[e[4]="OIL"]=4,t[e[5]="AMORPHOUS_SOLID"]=5,t[e[6]="FOAM"]=6,t[e[7]="WAX"]=7,t[e[8]="SEMI_SOLID"]=8,t[e[9]="SOLID"]=9,t[e[10]="LIQUID"]=10,t[e[11]="GAS"]=11,t}(),n}(),n.CrudeComponent=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.reactionId="",n.prototype.includesWorkup=null,n.prototype.hasDerivedAmount=null,n.prototype.amount=null,n.prototype.texture=null,Object.defineProperty(n.prototype,"_includesWorkup",{get:o.oneOfGetter(s=["includesWorkup"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_hasDerivedAmount",{get:o.oneOfGetter(s=["hasDerivedAmount"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.reactionId&&Object.hasOwnProperty.call(e,"reactionId")&&t.uint32(10).string(e.reactionId),null!=e.includesWorkup&&Object.hasOwnProperty.call(e,"includesWorkup")&&t.uint32(16).bool(e.includesWorkup),null!=e.hasDerivedAmount&&Object.hasOwnProperty.call(e,"hasDerivedAmount")&&t.uint32(24).bool(e.hasDerivedAmount),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&i.ord.Amount.encode(e.amount,t.uint32(34).fork()).ldelim(),null!=e.texture&&Object.hasOwnProperty.call(e,"texture")&&i.ord.Texture.encode(e.texture,t.uint32(42).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.CrudeComponent;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.reactionId=e.string();break;case 2:o.includesWorkup=e.bool();break;case 3:o.hasDerivedAmount=e.bool();break;case 4:o.amount=i.ord.Amount.decode(e,e.uint32());break;case 5:o.texture=i.ord.Texture.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.reactionId&&e.hasOwnProperty("reactionId")&&!o.isString(e.reactionId))return"reactionId: string expected";if(null!=e.includesWorkup&&e.hasOwnProperty("includesWorkup")&&(t._includesWorkup=1,"boolean"!=typeof e.includesWorkup))return"includesWorkup: boolean expected";if(null!=e.hasDerivedAmount&&e.hasOwnProperty("hasDerivedAmount")&&(t._hasDerivedAmount=1,"boolean"!=typeof e.hasDerivedAmount))return"hasDerivedAmount: boolean expected";if(null!=e.amount&&e.hasOwnProperty("amount")){let t=i.ord.Amount.verify(e.amount);if(t)return"amount."+t}if(null!=e.texture&&e.hasOwnProperty("texture")){let t=i.ord.Texture.verify(e.texture);if(t)return"texture."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.CrudeComponent)return e;let t=new i.ord.CrudeComponent;if(null!=e.reactionId&&(t.reactionId=String(e.reactionId)),null!=e.includesWorkup&&(t.includesWorkup=Boolean(e.includesWorkup)),null!=e.hasDerivedAmount&&(t.hasDerivedAmount=Boolean(e.hasDerivedAmount)),null!=e.amount){if("object"!=typeof e.amount)throw TypeError(".ord.CrudeComponent.amount: object expected");t.amount=i.ord.Amount.fromObject(e.amount)}if(null!=e.texture){if("object"!=typeof e.texture)throw TypeError(".ord.CrudeComponent.texture: object expected");t.texture=i.ord.Texture.fromObject(e.texture)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.reactionId="",n.amount=null,n.texture=null),null!=e.reactionId&&e.hasOwnProperty("reactionId")&&(n.reactionId=e.reactionId),null!=e.includesWorkup&&e.hasOwnProperty("includesWorkup")&&(n.includesWorkup=e.includesWorkup,t.oneofs&&(n._includesWorkup="includesWorkup")),null!=e.hasDerivedAmount&&e.hasOwnProperty("hasDerivedAmount")&&(n.hasDerivedAmount=e.hasDerivedAmount,t.oneofs&&(n._hasDerivedAmount="hasDerivedAmount")),null!=e.amount&&e.hasOwnProperty("amount")&&(n.amount=i.ord.Amount.toObject(e.amount,t)),null!=e.texture&&e.hasOwnProperty("texture")&&(n.texture=i.ord.Texture.toObject(e.texture,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.CrudeComponent"},n}(),n.Compound=function(){function n(e){if(this.identifiers=[],this.preparations=[],this.features={},this.analyses={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.identifiers=o.emptyArray,n.prototype.amount=null,n.prototype.reactionRole=0,n.prototype.isLimiting=null,n.prototype.preparations=o.emptyArray,n.prototype.source=null,n.prototype.features=o.emptyObject,n.prototype.analyses=o.emptyObject,n.prototype.texture=null,Object.defineProperty(n.prototype,"_isLimiting",{get:o.oneOfGetter(s=["isLimiting"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.identifiers&&e.identifiers.length)for(let n=0;n<e.identifiers.length;++n)i.ord.CompoundIdentifier.encode(e.identifiers[n],t.uint32(10).fork()).ldelim();if(null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&i.ord.Amount.encode(e.amount,t.uint32(18).fork()).ldelim(),null!=e.reactionRole&&Object.hasOwnProperty.call(e,"reactionRole")&&t.uint32(24).int32(e.reactionRole),null!=e.isLimiting&&Object.hasOwnProperty.call(e,"isLimiting")&&t.uint32(32).bool(e.isLimiting),null!=e.preparations&&e.preparations.length)for(let n=0;n<e.preparations.length;++n)i.ord.CompoundPreparation.encode(e.preparations[n],t.uint32(42).fork()).ldelim();if(null!=e.source&&Object.hasOwnProperty.call(e,"source")&&i.ord.Compound.Source.encode(e.source,t.uint32(50).fork()).ldelim(),null!=e.features&&Object.hasOwnProperty.call(e,"features"))for(let n=Object.keys(e.features),r=0;r<n.length;++r)t.uint32(58).fork().uint32(10).string(n[r]),i.ord.Data.encode(e.features[n[r]],t.uint32(18).fork()).ldelim().ldelim();if(null!=e.analyses&&Object.hasOwnProperty.call(e,"analyses"))for(let n=Object.keys(e.analyses),r=0;r<n.length;++r)t.uint32(66).fork().uint32(10).string(n[r]),i.ord.Analysis.encode(e.analyses[n[r]],t.uint32(18).fork()).ldelim().ldelim();return null!=e.texture&&Object.hasOwnProperty.call(e,"texture")&&i.ord.Texture.encode(e.texture,t.uint32(74).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r,s,a=void 0===n?e.len:e.pos+n,l=new i.ord.Compound;for(;e.pos<a;){let t=e.uint32();switch(t>>>3){case 1:l.identifiers&&l.identifiers.length||(l.identifiers=[]),l.identifiers.push(i.ord.CompoundIdentifier.decode(e,e.uint32()));break;case 2:l.amount=i.ord.Amount.decode(e,e.uint32());break;case 3:l.reactionRole=e.int32();break;case 4:l.isLimiting=e.bool();break;case 5:l.preparations&&l.preparations.length||(l.preparations=[]),l.preparations.push(i.ord.CompoundPreparation.decode(e,e.uint32()));break;case 6:l.source=i.ord.Compound.Source.decode(e,e.uint32());break;case 7:{l.features===o.emptyObject&&(l.features={});let t=e.uint32()+e.pos;for(r="",s=null;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=i.ord.Data.decode(e,e.uint32());break;default:e.skipType(7&t)}}l.features[r]=s;break}case 8:{l.analyses===o.emptyObject&&(l.analyses={});let t=e.uint32()+e.pos;for(r="",s=null;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=i.ord.Analysis.decode(e,e.uint32());break;default:e.skipType(7&t)}}l.analyses[r]=s;break}case 9:l.texture=i.ord.Texture.decode(e,e.uint32());break;default:e.skipType(7&t)}}return l},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.identifiers&&e.hasOwnProperty("identifiers")){if(!Array.isArray(e.identifiers))return"identifiers: array expected";for(let t=0;t<e.identifiers.length;++t){let n=i.ord.CompoundIdentifier.verify(e.identifiers[t]);if(n)return"identifiers."+n}}if(null!=e.amount&&e.hasOwnProperty("amount")){let t=i.ord.Amount.verify(e.amount);if(t)return"amount."+t}if(null!=e.reactionRole&&e.hasOwnProperty("reactionRole"))switch(e.reactionRole){default:return"reactionRole: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:}if(null!=e.isLimiting&&e.hasOwnProperty("isLimiting")&&"boolean"!=typeof e.isLimiting)return"isLimiting: boolean expected";if(null!=e.preparations&&e.hasOwnProperty("preparations")){if(!Array.isArray(e.preparations))return"preparations: array expected";for(let t=0;t<e.preparations.length;++t){let n=i.ord.CompoundPreparation.verify(e.preparations[t]);if(n)return"preparations."+n}}if(null!=e.source&&e.hasOwnProperty("source")){let t=i.ord.Compound.Source.verify(e.source);if(t)return"source."+t}if(null!=e.features&&e.hasOwnProperty("features")){if(!o.isObject(e.features))return"features: object expected";let t=Object.keys(e.features);for(let n=0;n<t.length;++n){let r=i.ord.Data.verify(e.features[t[n]]);if(r)return"features."+r}}if(null!=e.analyses&&e.hasOwnProperty("analyses")){if(!o.isObject(e.analyses))return"analyses: object expected";let t=Object.keys(e.analyses);for(let n=0;n<t.length;++n){let r=i.ord.Analysis.verify(e.analyses[t[n]]);if(r)return"analyses."+r}}if(null!=e.texture&&e.hasOwnProperty("texture")){let t=i.ord.Texture.verify(e.texture);if(t)return"texture."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.Compound)return e;let t=new i.ord.Compound;if(e.identifiers){if(!Array.isArray(e.identifiers))throw TypeError(".ord.Compound.identifiers: array expected");t.identifiers=[];for(let n=0;n<e.identifiers.length;++n){if("object"!=typeof e.identifiers[n])throw TypeError(".ord.Compound.identifiers: object expected");t.identifiers[n]=i.ord.CompoundIdentifier.fromObject(e.identifiers[n])}}if(null!=e.amount){if("object"!=typeof e.amount)throw TypeError(".ord.Compound.amount: object expected");t.amount=i.ord.Amount.fromObject(e.amount)}switch(e.reactionRole){default:if("number"==typeof e.reactionRole){t.reactionRole=e.reactionRole;break}break;case"UNSPECIFIED":case 0:t.reactionRole=0;break;case"REACTANT":case 1:t.reactionRole=1;break;case"REAGENT":case 2:t.reactionRole=2;break;case"SOLVENT":case 3:t.reactionRole=3;break;case"CATALYST":case 4:t.reactionRole=4;break;case"WORKUP":case 5:t.reactionRole=5;break;case"INTERNAL_STANDARD":case 6:t.reactionRole=6;break;case"AUTHENTIC_STANDARD":case 7:t.reactionRole=7;break;case"PRODUCT":case 8:t.reactionRole=8;break;case"BYPRODUCT":case 9:t.reactionRole=9;break;case"SIDE_PRODUCT":case 10:t.reactionRole=10}if(null!=e.isLimiting&&(t.isLimiting=Boolean(e.isLimiting)),e.preparations){if(!Array.isArray(e.preparations))throw TypeError(".ord.Compound.preparations: array expected");t.preparations=[];for(let n=0;n<e.preparations.length;++n){if("object"!=typeof e.preparations[n])throw TypeError(".ord.Compound.preparations: object expected");t.preparations[n]=i.ord.CompoundPreparation.fromObject(e.preparations[n])}}if(null!=e.source){if("object"!=typeof e.source)throw TypeError(".ord.Compound.source: object expected");t.source=i.ord.Compound.Source.fromObject(e.source)}if(e.features){if("object"!=typeof e.features)throw TypeError(".ord.Compound.features: object expected");t.features={};for(let n=Object.keys(e.features),r=0;r<n.length;++r){if("object"!=typeof e.features[n[r]])throw TypeError(".ord.Compound.features: object expected");t.features[n[r]]=i.ord.Data.fromObject(e.features[n[r]])}}if(e.analyses){if("object"!=typeof e.analyses)throw TypeError(".ord.Compound.analyses: object expected");t.analyses={};for(let n=Object.keys(e.analyses),r=0;r<n.length;++r){if("object"!=typeof e.analyses[n[r]])throw TypeError(".ord.Compound.analyses: object expected");t.analyses[n[r]]=i.ord.Analysis.fromObject(e.analyses[n[r]])}}if(null!=e.texture){if("object"!=typeof e.texture)throw TypeError(".ord.Compound.texture: object expected");t.texture=i.ord.Texture.fromObject(e.texture)}return t},n.toObject=function(e,t){t||(t={});let n,r={};if((t.arrays||t.defaults)&&(r.identifiers=[],r.preparations=[]),(t.objects||t.defaults)&&(r.features={},r.analyses={}),t.defaults&&(r.amount=null,r.reactionRole=t.enums===String?"UNSPECIFIED":0,r.source=null,r.texture=null),e.identifiers&&e.identifiers.length){r.identifiers=[];for(let n=0;n<e.identifiers.length;++n)r.identifiers[n]=i.ord.CompoundIdentifier.toObject(e.identifiers[n],t)}if(null!=e.amount&&e.hasOwnProperty("amount")&&(r.amount=i.ord.Amount.toObject(e.amount,t)),null!=e.reactionRole&&e.hasOwnProperty("reactionRole")&&(r.reactionRole=t.enums===String?void 0===i.ord.ReactionRole.ReactionRoleType[e.reactionRole]?e.reactionRole:i.ord.ReactionRole.ReactionRoleType[e.reactionRole]:e.reactionRole),null!=e.isLimiting&&e.hasOwnProperty("isLimiting")&&(r.isLimiting=e.isLimiting,t.oneofs&&(r._isLimiting="isLimiting")),e.preparations&&e.preparations.length){r.preparations=[];for(let n=0;n<e.preparations.length;++n)r.preparations[n]=i.ord.CompoundPreparation.toObject(e.preparations[n],t)}if(null!=e.source&&e.hasOwnProperty("source")&&(r.source=i.ord.Compound.Source.toObject(e.source,t)),e.features&&(n=Object.keys(e.features)).length){r.features={};for(let o=0;o<n.length;++o)r.features[n[o]]=i.ord.Data.toObject(e.features[n[o]],t)}if(e.analyses&&(n=Object.keys(e.analyses)).length){r.analyses={};for(let o=0;o<n.length;++o)r.analyses[n[o]]=i.ord.Analysis.toObject(e.analyses[n[o]],t)}return null!=e.texture&&e.hasOwnProperty("texture")&&(r.texture=i.ord.Texture.toObject(e.texture,t)),r},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Compound"},n.Source=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.vendor="",n.prototype.catalogId="",n.prototype.lot="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.vendor&&Object.hasOwnProperty.call(e,"vendor")&&t.uint32(10).string(e.vendor),null!=e.catalogId&&Object.hasOwnProperty.call(e,"catalogId")&&t.uint32(18).string(e.catalogId),null!=e.lot&&Object.hasOwnProperty.call(e,"lot")&&t.uint32(26).string(e.lot),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Compound.Source;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.vendor=e.string();break;case 2:o.catalogId=e.string();break;case 3:o.lot=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.vendor&&e.hasOwnProperty("vendor")&&!o.isString(e.vendor)?"vendor: string expected":null!=e.catalogId&&e.hasOwnProperty("catalogId")&&!o.isString(e.catalogId)?"catalogId: string expected":null!=e.lot&&e.hasOwnProperty("lot")&&!o.isString(e.lot)?"lot: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.Compound.Source)return e;let t=new i.ord.Compound.Source;return null!=e.vendor&&(t.vendor=String(e.vendor)),null!=e.catalogId&&(t.catalogId=String(e.catalogId)),null!=e.lot&&(t.lot=String(e.lot)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.vendor="",n.catalogId="",n.lot=""),null!=e.vendor&&e.hasOwnProperty("vendor")&&(n.vendor=e.vendor),null!=e.catalogId&&e.hasOwnProperty("catalogId")&&(n.catalogId=e.catalogId),null!=e.lot&&e.hasOwnProperty("lot")&&(n.lot=e.lot),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Compound.Source"},n}(),n}(),n.ReactionRole=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionRole;for(;e.pos<r;){let t=e.uint32();e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){return"object"!=typeof e||null===e?"object expected":null},n.fromObject=function(e){return e instanceof i.ord.ReactionRole?e:new i.ord.ReactionRole},n.toObject=function(){return{}},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionRole"},n.ReactionRoleType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="REACTANT"]=1,t[e[2]="REAGENT"]=2,t[e[3]="SOLVENT"]=3,t[e[4]="CATALYST"]=4,t[e[5]="WORKUP"]=5,t[e[6]="INTERNAL_STANDARD"]=6,t[e[7]="AUTHENTIC_STANDARD"]=7,t[e[8]="PRODUCT"]=8,t[e[9]="BYPRODUCT"]=9,t[e[10]="SIDE_PRODUCT"]=10,t}(),n}(),n.CompoundPreparation=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.reactionId="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.reactionId&&Object.hasOwnProperty.call(e,"reactionId")&&t.uint32(26).string(e.reactionId),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.CompoundPreparation;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.reactionId=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null!=e.reactionId&&e.hasOwnProperty("reactionId")&&!o.isString(e.reactionId)?"reactionId: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.CompoundPreparation)return e;let t=new i.ord.CompoundPreparation;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"NONE":case 2:t.type=2;break;case"REPURIFIED":case 3:t.type=3;break;case"SPARGED":case 4:t.type=4;break;case"DRIED":case 5:t.type=5;break;case"SYNTHESIZED":case 6:t.type=6}return null!=e.details&&(t.details=String(e.details)),null!=e.reactionId&&(t.reactionId=String(e.reactionId)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.reactionId=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.CompoundPreparation.CompoundPreparationType[e.type]?e.type:i.ord.CompoundPreparation.CompoundPreparationType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.reactionId&&e.hasOwnProperty("reactionId")&&(n.reactionId=e.reactionId),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.CompoundPreparation"},n.CompoundPreparationType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="NONE"]=2,t[e[3]="REPURIFIED"]=3,t[e[4]="SPARGED"]=4,t[e[5]="DRIED"]=5,t[e[6]="SYNTHESIZED"]=6,t}(),n}(),n.CompoundIdentifier=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.value="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(26).string(e.value),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.CompoundIdentifier;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.value=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null!=e.value&&e.hasOwnProperty("value")&&!o.isString(e.value)?"value: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.CompoundIdentifier)return e;let t=new i.ord.CompoundIdentifier;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"SMILES":case 2:t.type=2;break;case"INCHI":case 3:t.type=3;break;case"MOLBLOCK":case 4:t.type=4;break;case"IUPAC_NAME":case 5:t.type=5;break;case"NAME":case 6:t.type=6;break;case"CAS_NUMBER":case 7:t.type=7;break;case"PUBCHEM_CID":case 8:t.type=8;break;case"CHEMSPIDER_ID":case 9:t.type=9;break;case"CXSMILES":case 10:t.type=10;break;case"INCHI_KEY":case 11:t.type=11;break;case"XYZ":case 12:t.type=12;break;case"UNIPROT_ID":case 13:t.type=13;break;case"PDB_ID":case 14:t.type=14;break;case"AMINO_ACID_SEQUENCE":case 15:t.type=15;break;case"HELM":case 16:t.type=16;break;case"MDL":case 17:t.type=17}return null!=e.details&&(t.details=String(e.details)),null!=e.value&&(t.value=String(e.value)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.value=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.CompoundIdentifier.CompoundIdentifierType[e.type]?e.type:i.ord.CompoundIdentifier.CompoundIdentifierType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.value&&e.hasOwnProperty("value")&&(n.value=e.value),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.CompoundIdentifier"},n.CompoundIdentifierType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="SMILES"]=2,t[e[3]="INCHI"]=3,t[e[4]="MOLBLOCK"]=4,t[e[5]="IUPAC_NAME"]=5,t[e[6]="NAME"]=6,t[e[7]="CAS_NUMBER"]=7,t[e[8]="PUBCHEM_CID"]=8,t[e[9]="CHEMSPIDER_ID"]=9,t[e[10]="CXSMILES"]=10,t[e[11]="INCHI_KEY"]=11,t[e[12]="XYZ"]=12,t[e[13]="UNIPROT_ID"]=13,t[e[14]="PDB_ID"]=14,t[e[15]="AMINO_ACID_SEQUENCE"]=15,t[e[16]="HELM"]=16,t[e[17]="MDL"]=17,t}(),n}(),n.Vessel=function(){function n(e){if(this.preparations=[],this.attachments=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.material=null,n.prototype.preparations=o.emptyArray,n.prototype.attachments=o.emptyArray,n.prototype.volume=null,n.prototype.vesselId="",n.prototype.position="",n.prototype.row="",n.prototype.col="",n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.material&&Object.hasOwnProperty.call(e,"material")&&i.ord.VesselMaterial.encode(e.material,t.uint32(26).fork()).ldelim(),null!=e.preparations&&e.preparations.length)for(let n=0;n<e.preparations.length;++n)i.ord.VesselPreparation.encode(e.preparations[n],t.uint32(34).fork()).ldelim();if(null!=e.attachments&&e.attachments.length)for(let n=0;n<e.attachments.length;++n)i.ord.VesselAttachment.encode(e.attachments[n],t.uint32(42).fork()).ldelim();return null!=e.volume&&Object.hasOwnProperty.call(e,"volume")&&i.ord.Volume.encode(e.volume,t.uint32(50).fork()).ldelim(),null!=e.vesselId&&Object.hasOwnProperty.call(e,"vesselId")&&t.uint32(58).string(e.vesselId),null!=e.position&&Object.hasOwnProperty.call(e,"position")&&t.uint32(66).string(e.position),null!=e.row&&Object.hasOwnProperty.call(e,"row")&&t.uint32(74).string(e.row),null!=e.col&&Object.hasOwnProperty.call(e,"col")&&t.uint32(82).string(e.col),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Vessel;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.material=i.ord.VesselMaterial.decode(e,e.uint32());break;case 4:o.preparations&&o.preparations.length||(o.preparations=[]),o.preparations.push(i.ord.VesselPreparation.decode(e,e.uint32()));break;case 5:o.attachments&&o.attachments.length||(o.attachments=[]),o.attachments.push(i.ord.VesselAttachment.decode(e,e.uint32()));break;case 6:o.volume=i.ord.Volume.decode(e,e.uint32());break;case 7:o.vesselId=e.string();break;case 8:o.position=e.string();break;case 9:o.row=e.string();break;case 10:o.col=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.material&&e.hasOwnProperty("material")){let t=i.ord.VesselMaterial.verify(e.material);if(t)return"material."+t}if(null!=e.preparations&&e.hasOwnProperty("preparations")){if(!Array.isArray(e.preparations))return"preparations: array expected";for(let t=0;t<e.preparations.length;++t){let n=i.ord.VesselPreparation.verify(e.preparations[t]);if(n)return"preparations."+n}}if(null!=e.attachments&&e.hasOwnProperty("attachments")){if(!Array.isArray(e.attachments))return"attachments: array expected";for(let t=0;t<e.attachments.length;++t){let n=i.ord.VesselAttachment.verify(e.attachments[t]);if(n)return"attachments."+n}}if(null!=e.volume&&e.hasOwnProperty("volume")){let t=i.ord.Volume.verify(e.volume);if(t)return"volume."+t}return null!=e.vesselId&&e.hasOwnProperty("vesselId")&&!o.isString(e.vesselId)?"vesselId: string expected":null!=e.position&&e.hasOwnProperty("position")&&!o.isString(e.position)?"position: string expected":null!=e.row&&e.hasOwnProperty("row")&&!o.isString(e.row)?"row: string expected":null!=e.col&&e.hasOwnProperty("col")&&!o.isString(e.col)?"col: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.Vessel)return e;let t=new i.ord.Vessel;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"ROUND_BOTTOM_FLASK":case 2:t.type=2;break;case"VIAL":case 3:t.type=3;break;case"WELL_PLATE":case 4:t.type=4;break;case"MICROWAVE_VIAL":case 5:t.type=5;break;case"TUBE":case 6:t.type=6;break;case"CONTINUOUS_STIRRED_TANK_REACTOR":case 7:t.type=7;break;case"PACKED_BED_REACTOR":case 8:t.type=8;break;case"NMR_TUBE":case 9:t.type=9;break;case"PRESSURE_FLASK":case 10:t.type=10;break;case"PRESSURE_REACTOR":case 11:t.type=11;break;case"ELECTROCHEMICAL_CELL":case 12:t.type=12}if(null!=e.details&&(t.details=String(e.details)),null!=e.material){if("object"!=typeof e.material)throw TypeError(".ord.Vessel.material: object expected");t.material=i.ord.VesselMaterial.fromObject(e.material)}if(e.preparations){if(!Array.isArray(e.preparations))throw TypeError(".ord.Vessel.preparations: array expected");t.preparations=[];for(let n=0;n<e.preparations.length;++n){if("object"!=typeof e.preparations[n])throw TypeError(".ord.Vessel.preparations: object expected");t.preparations[n]=i.ord.VesselPreparation.fromObject(e.preparations[n])}}if(e.attachments){if(!Array.isArray(e.attachments))throw TypeError(".ord.Vessel.attachments: array expected");t.attachments=[];for(let n=0;n<e.attachments.length;++n){if("object"!=typeof e.attachments[n])throw TypeError(".ord.Vessel.attachments: object expected");t.attachments[n]=i.ord.VesselAttachment.fromObject(e.attachments[n])}}if(null!=e.volume){if("object"!=typeof e.volume)throw TypeError(".ord.Vessel.volume: object expected");t.volume=i.ord.Volume.fromObject(e.volume)}return null!=e.vesselId&&(t.vesselId=String(e.vesselId)),null!=e.position&&(t.position=String(e.position)),null!=e.row&&(t.row=String(e.row)),null!=e.col&&(t.col=String(e.col)),t},n.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.preparations=[],n.attachments=[]),t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.material=null,n.volume=null,n.vesselId="",n.position="",n.row="",n.col=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.Vessel.VesselType[e.type]?e.type:i.ord.Vessel.VesselType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.material&&e.hasOwnProperty("material")&&(n.material=i.ord.VesselMaterial.toObject(e.material,t)),e.preparations&&e.preparations.length){n.preparations=[];for(let r=0;r<e.preparations.length;++r)n.preparations[r]=i.ord.VesselPreparation.toObject(e.preparations[r],t)}if(e.attachments&&e.attachments.length){n.attachments=[];for(let r=0;r<e.attachments.length;++r)n.attachments[r]=i.ord.VesselAttachment.toObject(e.attachments[r],t)}return null!=e.volume&&e.hasOwnProperty("volume")&&(n.volume=i.ord.Volume.toObject(e.volume,t)),null!=e.vesselId&&e.hasOwnProperty("vesselId")&&(n.vesselId=e.vesselId),null!=e.position&&e.hasOwnProperty("position")&&(n.position=e.position),null!=e.row&&e.hasOwnProperty("row")&&(n.row=e.row),null!=e.col&&e.hasOwnProperty("col")&&(n.col=e.col),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Vessel"},n.VesselType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="ROUND_BOTTOM_FLASK"]=2,t[e[3]="VIAL"]=3,t[e[4]="WELL_PLATE"]=4,t[e[5]="MICROWAVE_VIAL"]=5,t[e[6]="TUBE"]=6,t[e[7]="CONTINUOUS_STIRRED_TANK_REACTOR"]=7,t[e[8]="PACKED_BED_REACTOR"]=8,t[e[9]="NMR_TUBE"]=9,t[e[10]="PRESSURE_FLASK"]=10,t[e[11]="PRESSURE_REACTOR"]=11,t[e[12]="ELECTROCHEMICAL_CELL"]=12,t}(),n}(),n.VesselMaterial=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.VesselMaterial;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.VesselMaterial)return e;let t=new i.ord.VesselMaterial;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"GLASS":case 2:t.type=2;break;case"POLYPROPYLENE":case 3:t.type=3;break;case"PLASTIC":case 4:t.type=4;break;case"METAL":case 5:t.type=5;break;case"QUARTZ":case 6:t.type=6}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.VesselMaterial.VesselMaterialType[e.type]?e.type:i.ord.VesselMaterial.VesselMaterialType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.VesselMaterial"},n.VesselMaterialType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="GLASS"]=2,t[e[3]="POLYPROPYLENE"]=3,t[e[4]="PLASTIC"]=4,t[e[5]="METAL"]=5,t[e[6]="QUARTZ"]=6,t}(),n}(),n.VesselAttachment=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.VesselAttachment;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.VesselAttachment)return e;let t=new i.ord.VesselAttachment;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"NONE":case 1:t.type=1;break;case"CUSTOM":case 2:t.type=2;break;case"SEPTUM":case 3:t.type=3;break;case"CAP":case 4:t.type=4;break;case"MAT":case 5:t.type=5;break;case"REFLUX_CONDENSER":case 6:t.type=6;break;case"VENT_NEEDLE":case 7:t.type=7;break;case"DEAN_STARK":case 8:t.type=8;break;case"VACUUM_TUBE":case 9:t.type=9;break;case"ADDITION_FUNNEL":case 10:t.type=10;break;case"DRYING_TUBE":case 11:t.type=11;break;case"ALUMINUM_FOIL":case 12:t.type=12;break;case"THERMOCOUPLE":case 13:t.type=13;break;case"BALLOON":case 14:t.type=14;break;case"GAS_ADAPTER":case 15:t.type=15;break;case"PRESSURE_REGULATOR":case 16:t.type=16;break;case"RELEASE_VALVE":case 17:t.type=17}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.VesselAttachment.VesselAttachmentType[e.type]?e.type:i.ord.VesselAttachment.VesselAttachmentType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.VesselAttachment"},n.VesselAttachmentType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="NONE"]=1,t[e[2]="CUSTOM"]=2,t[e[3]="SEPTUM"]=3,t[e[4]="CAP"]=4,t[e[5]="MAT"]=5,t[e[6]="REFLUX_CONDENSER"]=6,t[e[7]="VENT_NEEDLE"]=7,t[e[8]="DEAN_STARK"]=8,t[e[9]="VACUUM_TUBE"]=9,t[e[10]="ADDITION_FUNNEL"]=10,t[e[11]="DRYING_TUBE"]=11,t[e[12]="ALUMINUM_FOIL"]=12,t[e[13]="THERMOCOUPLE"]=13,t[e[14]="BALLOON"]=14,t[e[15]="GAS_ADAPTER"]=15,t[e[16]="PRESSURE_REGULATOR"]=16,t[e[17]="RELEASE_VALVE"]=17,t}(),n}(),n.VesselPreparation=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.VesselPreparation;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.VesselPreparation)return e;let t=new i.ord.VesselPreparation;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"NONE":case 2:t.type=2;break;case"OVEN_DRIED":case 3:t.type=3;break;case"FLAME_DRIED":case 4:t.type=4;break;case"EVACUATED_BACKFILLED":case 5:t.type=5;break;case"PURGED":case 6:t.type=6}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.VesselPreparation.VesselPreparationType[e.type]?e.type:i.ord.VesselPreparation.VesselPreparationType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.VesselPreparation"},n.VesselPreparationType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="NONE"]=2,t[e[3]="OVEN_DRIED"]=3,t[e[4]="FLAME_DRIED"]=4,t[e[5]="EVACUATED_BACKFILLED"]=5,t[e[6]="PURGED"]=6,t}(),n}(),n.ReactionSetup=function(){function n(e){if(this.automationCode={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.vessel=null,n.prototype.isAutomated=null,n.prototype.automationPlatform="",n.prototype.automationCode=o.emptyObject,n.prototype.environment=null,Object.defineProperty(n.prototype,"_isAutomated",{get:o.oneOfGetter(s=["isAutomated"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.vessel&&Object.hasOwnProperty.call(e,"vessel")&&i.ord.Vessel.encode(e.vessel,t.uint32(10).fork()).ldelim(),null!=e.isAutomated&&Object.hasOwnProperty.call(e,"isAutomated")&&t.uint32(16).bool(e.isAutomated),null!=e.automationPlatform&&Object.hasOwnProperty.call(e,"automationPlatform")&&t.uint32(26).string(e.automationPlatform),null!=e.automationCode&&Object.hasOwnProperty.call(e,"automationCode"))for(let n=Object.keys(e.automationCode),r=0;r<n.length;++r)t.uint32(34).fork().uint32(10).string(n[r]),i.ord.Data.encode(e.automationCode[n[r]],t.uint32(18).fork()).ldelim().ldelim();return null!=e.environment&&Object.hasOwnProperty.call(e,"environment")&&i.ord.ReactionSetup.ReactionEnvironment.encode(e.environment,t.uint32(42).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r,s,a=void 0===n?e.len:e.pos+n,l=new i.ord.ReactionSetup;for(;e.pos<a;){let t=e.uint32();switch(t>>>3){case 1:l.vessel=i.ord.Vessel.decode(e,e.uint32());break;case 2:l.isAutomated=e.bool();break;case 3:l.automationPlatform=e.string();break;case 4:{l.automationCode===o.emptyObject&&(l.automationCode={});let t=e.uint32()+e.pos;for(r="",s=null;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=i.ord.Data.decode(e,e.uint32());break;default:e.skipType(7&t)}}l.automationCode[r]=s;break}case 5:l.environment=i.ord.ReactionSetup.ReactionEnvironment.decode(e,e.uint32());break;default:e.skipType(7&t)}}return l},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.vessel&&e.hasOwnProperty("vessel")){let t=i.ord.Vessel.verify(e.vessel);if(t)return"vessel."+t}if(null!=e.isAutomated&&e.hasOwnProperty("isAutomated")&&"boolean"!=typeof e.isAutomated)return"isAutomated: boolean expected";if(null!=e.automationPlatform&&e.hasOwnProperty("automationPlatform")&&!o.isString(e.automationPlatform))return"automationPlatform: string expected";if(null!=e.automationCode&&e.hasOwnProperty("automationCode")){if(!o.isObject(e.automationCode))return"automationCode: object expected";let t=Object.keys(e.automationCode);for(let n=0;n<t.length;++n){let r=i.ord.Data.verify(e.automationCode[t[n]]);if(r)return"automationCode."+r}}if(null!=e.environment&&e.hasOwnProperty("environment")){let t=i.ord.ReactionSetup.ReactionEnvironment.verify(e.environment);if(t)return"environment."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.ReactionSetup)return e;let t=new i.ord.ReactionSetup;if(null!=e.vessel){if("object"!=typeof e.vessel)throw TypeError(".ord.ReactionSetup.vessel: object expected");t.vessel=i.ord.Vessel.fromObject(e.vessel)}if(null!=e.isAutomated&&(t.isAutomated=Boolean(e.isAutomated)),null!=e.automationPlatform&&(t.automationPlatform=String(e.automationPlatform)),e.automationCode){if("object"!=typeof e.automationCode)throw TypeError(".ord.ReactionSetup.automationCode: object expected");t.automationCode={};for(let n=Object.keys(e.automationCode),r=0;r<n.length;++r){if("object"!=typeof e.automationCode[n[r]])throw TypeError(".ord.ReactionSetup.automationCode: object expected");t.automationCode[n[r]]=i.ord.Data.fromObject(e.automationCode[n[r]])}}if(null!=e.environment){if("object"!=typeof e.environment)throw TypeError(".ord.ReactionSetup.environment: object expected");t.environment=i.ord.ReactionSetup.ReactionEnvironment.fromObject(e.environment)}return t},n.toObject=function(e,t){t||(t={});let n,r={};if((t.objects||t.defaults)&&(r.automationCode={}),t.defaults&&(r.vessel=null,r.automationPlatform="",r.environment=null),null!=e.vessel&&e.hasOwnProperty("vessel")&&(r.vessel=i.ord.Vessel.toObject(e.vessel,t)),null!=e.isAutomated&&e.hasOwnProperty("isAutomated")&&(r.isAutomated=e.isAutomated,t.oneofs&&(r._isAutomated="isAutomated")),null!=e.automationPlatform&&e.hasOwnProperty("automationPlatform")&&(r.automationPlatform=e.automationPlatform),e.automationCode&&(n=Object.keys(e.automationCode)).length){r.automationCode={};for(let o=0;o<n.length;++o)r.automationCode[n[o]]=i.ord.Data.toObject(e.automationCode[n[o]],t)}return null!=e.environment&&e.hasOwnProperty("environment")&&(r.environment=i.ord.ReactionSetup.ReactionEnvironment.toObject(e.environment,t)),r},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionSetup"},n.ReactionEnvironment=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionSetup.ReactionEnvironment;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.ReactionSetup.ReactionEnvironment)return e;let t=new i.ord.ReactionSetup.ReactionEnvironment;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"FUME_HOOD":case 2:t.type=2;break;case"BENCH_TOP":case 3:t.type=3;break;case"GLOVE_BOX":case 4:t.type=4;break;case"GLOVE_BAG":case 5:t.type=5}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ReactionSetup.ReactionEnvironment.ReactionEnvironmentType[e.type]?e.type:i.ord.ReactionSetup.ReactionEnvironment.ReactionEnvironmentType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionSetup.ReactionEnvironment"},n.ReactionEnvironmentType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="FUME_HOOD"]=2,t[e[3]="BENCH_TOP"]=3,t[e[4]="GLOVE_BOX"]=4,t[e[5]="GLOVE_BAG"]=5,t}(),n}(),n}(),n.ReactionConditions=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.temperature=null,n.prototype.pressure=null,n.prototype.stirring=null,n.prototype.illumination=null,n.prototype.electrochemistry=null,n.prototype.flow=null,n.prototype.reflux=null,n.prototype.ph=null,n.prototype.conditionsAreDynamic=null,n.prototype.details="",Object.defineProperty(n.prototype,"_reflux",{get:o.oneOfGetter(s=["reflux"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_ph",{get:o.oneOfGetter(s=["ph"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_conditionsAreDynamic",{get:o.oneOfGetter(s=["conditionsAreDynamic"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.temperature&&Object.hasOwnProperty.call(e,"temperature")&&i.ord.TemperatureConditions.encode(e.temperature,t.uint32(10).fork()).ldelim(),null!=e.pressure&&Object.hasOwnProperty.call(e,"pressure")&&i.ord.PressureConditions.encode(e.pressure,t.uint32(18).fork()).ldelim(),null!=e.stirring&&Object.hasOwnProperty.call(e,"stirring")&&i.ord.StirringConditions.encode(e.stirring,t.uint32(26).fork()).ldelim(),null!=e.illumination&&Object.hasOwnProperty.call(e,"illumination")&&i.ord.IlluminationConditions.encode(e.illumination,t.uint32(34).fork()).ldelim(),null!=e.electrochemistry&&Object.hasOwnProperty.call(e,"electrochemistry")&&i.ord.ElectrochemistryConditions.encode(e.electrochemistry,t.uint32(42).fork()).ldelim(),null!=e.flow&&Object.hasOwnProperty.call(e,"flow")&&i.ord.FlowConditions.encode(e.flow,t.uint32(50).fork()).ldelim(),null!=e.reflux&&Object.hasOwnProperty.call(e,"reflux")&&t.uint32(56).bool(e.reflux),null!=e.ph&&Object.hasOwnProperty.call(e,"ph")&&t.uint32(69).float(e.ph),null!=e.conditionsAreDynamic&&Object.hasOwnProperty.call(e,"conditionsAreDynamic")&&t.uint32(72).bool(e.conditionsAreDynamic),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(82).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionConditions;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.temperature=i.ord.TemperatureConditions.decode(e,e.uint32());break;case 2:o.pressure=i.ord.PressureConditions.decode(e,e.uint32());break;case 3:o.stirring=i.ord.StirringConditions.decode(e,e.uint32());break;case 4:o.illumination=i.ord.IlluminationConditions.decode(e,e.uint32());break;case 5:o.electrochemistry=i.ord.ElectrochemistryConditions.decode(e,e.uint32());break;case 6:o.flow=i.ord.FlowConditions.decode(e,e.uint32());break;case 7:o.reflux=e.bool();break;case 8:o.ph=e.float();break;case 9:o.conditionsAreDynamic=e.bool();break;case 10:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.temperature&&e.hasOwnProperty("temperature")){let t=i.ord.TemperatureConditions.verify(e.temperature);if(t)return"temperature."+t}if(null!=e.pressure&&e.hasOwnProperty("pressure")){let t=i.ord.PressureConditions.verify(e.pressure);if(t)return"pressure."+t}if(null!=e.stirring&&e.hasOwnProperty("stirring")){let t=i.ord.StirringConditions.verify(e.stirring);if(t)return"stirring."+t}if(null!=e.illumination&&e.hasOwnProperty("illumination")){let t=i.ord.IlluminationConditions.verify(e.illumination);if(t)return"illumination."+t}if(null!=e.electrochemistry&&e.hasOwnProperty("electrochemistry")){let t=i.ord.ElectrochemistryConditions.verify(e.electrochemistry);if(t)return"electrochemistry."+t}if(null!=e.flow&&e.hasOwnProperty("flow")){let t=i.ord.FlowConditions.verify(e.flow);if(t)return"flow."+t}return null!=e.reflux&&e.hasOwnProperty("reflux")&&(t._reflux=1,"boolean"!=typeof e.reflux)?"reflux: boolean expected":null!=e.ph&&e.hasOwnProperty("ph")&&(t._ph=1,"number"!=typeof e.ph)?"ph: number expected":null!=e.conditionsAreDynamic&&e.hasOwnProperty("conditionsAreDynamic")&&(t._conditionsAreDynamic=1,"boolean"!=typeof e.conditionsAreDynamic)?"conditionsAreDynamic: boolean expected":null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.ReactionConditions)return e;let t=new i.ord.ReactionConditions;if(null!=e.temperature){if("object"!=typeof e.temperature)throw TypeError(".ord.ReactionConditions.temperature: object expected");t.temperature=i.ord.TemperatureConditions.fromObject(e.temperature)}if(null!=e.pressure){if("object"!=typeof e.pressure)throw TypeError(".ord.ReactionConditions.pressure: object expected");t.pressure=i.ord.PressureConditions.fromObject(e.pressure)}if(null!=e.stirring){if("object"!=typeof e.stirring)throw TypeError(".ord.ReactionConditions.stirring: object expected");t.stirring=i.ord.StirringConditions.fromObject(e.stirring)}if(null!=e.illumination){if("object"!=typeof e.illumination)throw TypeError(".ord.ReactionConditions.illumination: object expected");t.illumination=i.ord.IlluminationConditions.fromObject(e.illumination)}if(null!=e.electrochemistry){if("object"!=typeof e.electrochemistry)throw TypeError(".ord.ReactionConditions.electrochemistry: object expected");t.electrochemistry=i.ord.ElectrochemistryConditions.fromObject(e.electrochemistry)}if(null!=e.flow){if("object"!=typeof e.flow)throw TypeError(".ord.ReactionConditions.flow: object expected");t.flow=i.ord.FlowConditions.fromObject(e.flow)}return null!=e.reflux&&(t.reflux=Boolean(e.reflux)),null!=e.ph&&(t.ph=Number(e.ph)),null!=e.conditionsAreDynamic&&(t.conditionsAreDynamic=Boolean(e.conditionsAreDynamic)),null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.temperature=null,n.pressure=null,n.stirring=null,n.illumination=null,n.electrochemistry=null,n.flow=null,n.details=""),null!=e.temperature&&e.hasOwnProperty("temperature")&&(n.temperature=i.ord.TemperatureConditions.toObject(e.temperature,t)),null!=e.pressure&&e.hasOwnProperty("pressure")&&(n.pressure=i.ord.PressureConditions.toObject(e.pressure,t)),null!=e.stirring&&e.hasOwnProperty("stirring")&&(n.stirring=i.ord.StirringConditions.toObject(e.stirring,t)),null!=e.illumination&&e.hasOwnProperty("illumination")&&(n.illumination=i.ord.IlluminationConditions.toObject(e.illumination,t)),null!=e.electrochemistry&&e.hasOwnProperty("electrochemistry")&&(n.electrochemistry=i.ord.ElectrochemistryConditions.toObject(e.electrochemistry,t)),null!=e.flow&&e.hasOwnProperty("flow")&&(n.flow=i.ord.FlowConditions.toObject(e.flow,t)),null!=e.reflux&&e.hasOwnProperty("reflux")&&(n.reflux=e.reflux,t.oneofs&&(n._reflux="reflux")),null!=e.ph&&e.hasOwnProperty("ph")&&(n.ph=t.json&&!isFinite(e.ph)?String(e.ph):e.ph,t.oneofs&&(n._ph="ph")),null!=e.conditionsAreDynamic&&e.hasOwnProperty("conditionsAreDynamic")&&(n.conditionsAreDynamic=e.conditionsAreDynamic,t.oneofs&&(n._conditionsAreDynamic="conditionsAreDynamic")),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionConditions"},n}(),n.TemperatureConditions=function(){function n(e){if(this.measurements=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.control=null,n.prototype.setpoint=null,n.prototype.measurements=o.emptyArray,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.control&&Object.hasOwnProperty.call(e,"control")&&i.ord.TemperatureConditions.TemperatureControl.encode(e.control,t.uint32(10).fork()).ldelim(),null!=e.setpoint&&Object.hasOwnProperty.call(e,"setpoint")&&i.ord.Temperature.encode(e.setpoint,t.uint32(18).fork()).ldelim(),null!=e.measurements&&e.measurements.length)for(let n=0;n<e.measurements.length;++n)i.ord.TemperatureConditions.TemperatureMeasurement.encode(e.measurements[n],t.uint32(26).fork()).ldelim();return t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.TemperatureConditions;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.control=i.ord.TemperatureConditions.TemperatureControl.decode(e,e.uint32());break;case 2:o.setpoint=i.ord.Temperature.decode(e,e.uint32());break;case 3:o.measurements&&o.measurements.length||(o.measurements=[]),o.measurements.push(i.ord.TemperatureConditions.TemperatureMeasurement.decode(e,e.uint32()));break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.control&&e.hasOwnProperty("control")){let t=i.ord.TemperatureConditions.TemperatureControl.verify(e.control);if(t)return"control."+t}if(null!=e.setpoint&&e.hasOwnProperty("setpoint")){let t=i.ord.Temperature.verify(e.setpoint);if(t)return"setpoint."+t}if(null!=e.measurements&&e.hasOwnProperty("measurements")){if(!Array.isArray(e.measurements))return"measurements: array expected";for(let t=0;t<e.measurements.length;++t){let n=i.ord.TemperatureConditions.TemperatureMeasurement.verify(e.measurements[t]);if(n)return"measurements."+n}}return null},n.fromObject=function(e){if(e instanceof i.ord.TemperatureConditions)return e;let t=new i.ord.TemperatureConditions;if(null!=e.control){if("object"!=typeof e.control)throw TypeError(".ord.TemperatureConditions.control: object expected");t.control=i.ord.TemperatureConditions.TemperatureControl.fromObject(e.control)}if(null!=e.setpoint){if("object"!=typeof e.setpoint)throw TypeError(".ord.TemperatureConditions.setpoint: object expected");t.setpoint=i.ord.Temperature.fromObject(e.setpoint)}if(e.measurements){if(!Array.isArray(e.measurements))throw TypeError(".ord.TemperatureConditions.measurements: array expected");t.measurements=[];for(let n=0;n<e.measurements.length;++n){if("object"!=typeof e.measurements[n])throw TypeError(".ord.TemperatureConditions.measurements: object expected");t.measurements[n]=i.ord.TemperatureConditions.TemperatureMeasurement.fromObject(e.measurements[n])}}return t},n.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.measurements=[]),t.defaults&&(n.control=null,n.setpoint=null),null!=e.control&&e.hasOwnProperty("control")&&(n.control=i.ord.TemperatureConditions.TemperatureControl.toObject(e.control,t)),null!=e.setpoint&&e.hasOwnProperty("setpoint")&&(n.setpoint=i.ord.Temperature.toObject(e.setpoint,t)),e.measurements&&e.measurements.length){n.measurements=[];for(let r=0;r<e.measurements.length;++r)n.measurements[r]=i.ord.TemperatureConditions.TemperatureMeasurement.toObject(e.measurements[r],t)}return n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.TemperatureConditions"},n.TemperatureControl=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.TemperatureConditions.TemperatureControl;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.TemperatureConditions.TemperatureControl)return e;let t=new i.ord.TemperatureConditions.TemperatureControl;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"AMBIENT":case 2:t.type=2;break;case"OIL_BATH":case 3:t.type=3;break;case"WATER_BATH":case 4:t.type=4;break;case"SAND_BATH":case 5:t.type=5;break;case"ICE_BATH":case 6:t.type=6;break;case"DRY_ALUMINUM_PLATE":case 7:t.type=7;break;case"MICROWAVE":case 8:t.type=8;break;case"DRY_ICE_BATH":case 9:t.type=9;break;case"AIR_FAN":case 10:t.type=10;break;case"LIQUID_NITROGEN":case 11:t.type=11}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.TemperatureConditions.TemperatureControl.TemperatureControlType[e.type]?e.type:i.ord.TemperatureConditions.TemperatureControl.TemperatureControlType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.TemperatureConditions.TemperatureControl"},n.TemperatureControlType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="AMBIENT"]=2,t[e[3]="OIL_BATH"]=3,t[e[4]="WATER_BATH"]=4,t[e[5]="SAND_BATH"]=5,t[e[6]="ICE_BATH"]=6,t[e[7]="DRY_ALUMINUM_PLATE"]=7,t[e[8]="MICROWAVE"]=8,t[e[9]="DRY_ICE_BATH"]=9,t[e[10]="AIR_FAN"]=10,t[e[11]="LIQUID_NITROGEN"]=11,t}(),n}(),n.TemperatureMeasurement=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.time=null,n.prototype.temperature=null,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.time&&Object.hasOwnProperty.call(e,"time")&&i.ord.Time.encode(e.time,t.uint32(26).fork()).ldelim(),null!=e.temperature&&Object.hasOwnProperty.call(e,"temperature")&&i.ord.Temperature.encode(e.temperature,t.uint32(34).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.TemperatureConditions.TemperatureMeasurement;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.time=i.ord.Time.decode(e,e.uint32());break;case 4:o.temperature=i.ord.Temperature.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.time&&e.hasOwnProperty("time")){let t=i.ord.Time.verify(e.time);if(t)return"time."+t}if(null!=e.temperature&&e.hasOwnProperty("temperature")){let t=i.ord.Temperature.verify(e.temperature);if(t)return"temperature."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.TemperatureConditions.TemperatureMeasurement)return e;let t=new i.ord.TemperatureConditions.TemperatureMeasurement;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"THERMOCOUPLE_INTERNAL":case 2:t.type=2;break;case"THERMOCOUPLE_EXTERNAL":case 3:t.type=3;break;case"INFRARED":case 4:t.type=4}if(null!=e.details&&(t.details=String(e.details)),null!=e.time){if("object"!=typeof e.time)throw TypeError(".ord.TemperatureConditions.TemperatureMeasurement.time: object expected");t.time=i.ord.Time.fromObject(e.time)}if(null!=e.temperature){if("object"!=typeof e.temperature)throw TypeError(".ord.TemperatureConditions.TemperatureMeasurement.temperature: object expected");t.temperature=i.ord.Temperature.fromObject(e.temperature)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.time=null,n.temperature=null),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.TemperatureConditions.TemperatureMeasurement.TemperatureMeasurementType[e.type]?e.type:i.ord.TemperatureConditions.TemperatureMeasurement.TemperatureMeasurementType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.time&&e.hasOwnProperty("time")&&(n.time=i.ord.Time.toObject(e.time,t)),null!=e.temperature&&e.hasOwnProperty("temperature")&&(n.temperature=i.ord.Temperature.toObject(e.temperature,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.TemperatureConditions.TemperatureMeasurement"},n.TemperatureMeasurementType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="THERMOCOUPLE_INTERNAL"]=2,t[e[3]="THERMOCOUPLE_EXTERNAL"]=3,t[e[4]="INFRARED"]=4,t}(),n}(),n}(),n.PressureConditions=function(){function n(e){if(this.measurements=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.control=null,n.prototype.setpoint=null,n.prototype.atmosphere=null,n.prototype.measurements=o.emptyArray,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.control&&Object.hasOwnProperty.call(e,"control")&&i.ord.PressureConditions.PressureControl.encode(e.control,t.uint32(10).fork()).ldelim(),null!=e.setpoint&&Object.hasOwnProperty.call(e,"setpoint")&&i.ord.Pressure.encode(e.setpoint,t.uint32(18).fork()).ldelim(),null!=e.atmosphere&&Object.hasOwnProperty.call(e,"atmosphere")&&i.ord.PressureConditions.Atmosphere.encode(e.atmosphere,t.uint32(26).fork()).ldelim(),null!=e.measurements&&e.measurements.length)for(let n=0;n<e.measurements.length;++n)i.ord.PressureConditions.PressureMeasurement.encode(e.measurements[n],t.uint32(34).fork()).ldelim();return t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.PressureConditions;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.control=i.ord.PressureConditions.PressureControl.decode(e,e.uint32());break;case 2:o.setpoint=i.ord.Pressure.decode(e,e.uint32());break;case 3:o.atmosphere=i.ord.PressureConditions.Atmosphere.decode(e,e.uint32());break;case 4:o.measurements&&o.measurements.length||(o.measurements=[]),o.measurements.push(i.ord.PressureConditions.PressureMeasurement.decode(e,e.uint32()));break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.control&&e.hasOwnProperty("control")){let t=i.ord.PressureConditions.PressureControl.verify(e.control);if(t)return"control."+t}if(null!=e.setpoint&&e.hasOwnProperty("setpoint")){let t=i.ord.Pressure.verify(e.setpoint);if(t)return"setpoint."+t}if(null!=e.atmosphere&&e.hasOwnProperty("atmosphere")){let t=i.ord.PressureConditions.Atmosphere.verify(e.atmosphere);if(t)return"atmosphere."+t}if(null!=e.measurements&&e.hasOwnProperty("measurements")){if(!Array.isArray(e.measurements))return"measurements: array expected";for(let t=0;t<e.measurements.length;++t){let n=i.ord.PressureConditions.PressureMeasurement.verify(e.measurements[t]);if(n)return"measurements."+n}}return null},n.fromObject=function(e){if(e instanceof i.ord.PressureConditions)return e;let t=new i.ord.PressureConditions;if(null!=e.control){if("object"!=typeof e.control)throw TypeError(".ord.PressureConditions.control: object expected");t.control=i.ord.PressureConditions.PressureControl.fromObject(e.control)}if(null!=e.setpoint){if("object"!=typeof e.setpoint)throw TypeError(".ord.PressureConditions.setpoint: object expected");t.setpoint=i.ord.Pressure.fromObject(e.setpoint)}if(null!=e.atmosphere){if("object"!=typeof e.atmosphere)throw TypeError(".ord.PressureConditions.atmosphere: object expected");t.atmosphere=i.ord.PressureConditions.Atmosphere.fromObject(e.atmosphere)}if(e.measurements){if(!Array.isArray(e.measurements))throw TypeError(".ord.PressureConditions.measurements: array expected");t.measurements=[];for(let n=0;n<e.measurements.length;++n){if("object"!=typeof e.measurements[n])throw TypeError(".ord.PressureConditions.measurements: object expected");t.measurements[n]=i.ord.PressureConditions.PressureMeasurement.fromObject(e.measurements[n])}}return t},n.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.measurements=[]),t.defaults&&(n.control=null,n.setpoint=null,n.atmosphere=null),null!=e.control&&e.hasOwnProperty("control")&&(n.control=i.ord.PressureConditions.PressureControl.toObject(e.control,t)),null!=e.setpoint&&e.hasOwnProperty("setpoint")&&(n.setpoint=i.ord.Pressure.toObject(e.setpoint,t)),null!=e.atmosphere&&e.hasOwnProperty("atmosphere")&&(n.atmosphere=i.ord.PressureConditions.Atmosphere.toObject(e.atmosphere,t)),e.measurements&&e.measurements.length){n.measurements=[];for(let r=0;r<e.measurements.length;++r)n.measurements[r]=i.ord.PressureConditions.PressureMeasurement.toObject(e.measurements[r],t)}return n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.PressureConditions"},n.PressureControl=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.PressureConditions.PressureControl;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.PressureConditions.PressureControl)return e;let t=new i.ord.PressureConditions.PressureControl;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"AMBIENT":case 2:t.type=2;break;case"SLIGHT_POSITIVE":case 3:t.type=3;break;case"SEALED":case 4:t.type=4;break;case"PRESSURIZED":case 5:t.type=5}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.PressureConditions.PressureControl.PressureControlType[e.type]?e.type:i.ord.PressureConditions.PressureControl.PressureControlType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.PressureConditions.PressureControl"},n.PressureControlType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="AMBIENT"]=2,t[e[3]="SLIGHT_POSITIVE"]=3,t[e[4]="SEALED"]=4,t[e[5]="PRESSURIZED"]=5,t}(),n}(),n.Atmosphere=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.PressureConditions.Atmosphere;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.PressureConditions.Atmosphere)return e;let t=new i.ord.PressureConditions.Atmosphere;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"AIR":case 2:t.type=2;break;case"NITROGEN":case 3:t.type=3;break;case"ARGON":case 4:t.type=4;break;case"OXYGEN":case 5:t.type=5;break;case"HYDROGEN":case 6:t.type=6;break;case"CARBON_MONOXIDE":case 7:t.type=7;break;case"CARBON_DIOXIDE":case 8:t.type=8;break;case"METHANE":case 9:t.type=9;break;case"AMMONIA":case 10:t.type=10;break;case"OZONE":case 11:t.type=11;break;case"ETHYLENE":case 12:t.type=12;break;case"ACETYLENE":case 13:t.type=13}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.PressureConditions.Atmosphere.AtmosphereType[e.type]?e.type:i.ord.PressureConditions.Atmosphere.AtmosphereType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.PressureConditions.Atmosphere"},n.AtmosphereType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="AIR"]=2,t[e[3]="NITROGEN"]=3,t[e[4]="ARGON"]=4,t[e[5]="OXYGEN"]=5,t[e[6]="HYDROGEN"]=6,t[e[7]="CARBON_MONOXIDE"]=7,t[e[8]="CARBON_DIOXIDE"]=8,t[e[9]="METHANE"]=9,t[e[10]="AMMONIA"]=10,t[e[11]="OZONE"]=11,t[e[12]="ETHYLENE"]=12,t[e[13]="ACETYLENE"]=13,t}(),n}(),n.PressureMeasurement=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.time=null,n.prototype.pressure=null,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.time&&Object.hasOwnProperty.call(e,"time")&&i.ord.Time.encode(e.time,t.uint32(26).fork()).ldelim(),null!=e.pressure&&Object.hasOwnProperty.call(e,"pressure")&&i.ord.Pressure.encode(e.pressure,t.uint32(34).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.PressureConditions.PressureMeasurement;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.time=i.ord.Time.decode(e,e.uint32());break;case 4:o.pressure=i.ord.Pressure.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.time&&e.hasOwnProperty("time")){let t=i.ord.Time.verify(e.time);if(t)return"time."+t}if(null!=e.pressure&&e.hasOwnProperty("pressure")){let t=i.ord.Pressure.verify(e.pressure);if(t)return"pressure."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.PressureConditions.PressureMeasurement)return e;let t=new i.ord.PressureConditions.PressureMeasurement;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"PRESSURE_TRANSDUCER":case 2:t.type=2}if(null!=e.details&&(t.details=String(e.details)),null!=e.time){if("object"!=typeof e.time)throw TypeError(".ord.PressureConditions.PressureMeasurement.time: object expected");t.time=i.ord.Time.fromObject(e.time)}if(null!=e.pressure){if("object"!=typeof e.pressure)throw TypeError(".ord.PressureConditions.PressureMeasurement.pressure: object expected");t.pressure=i.ord.Pressure.fromObject(e.pressure)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.time=null,n.pressure=null),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.PressureConditions.PressureMeasurement.PressureMeasurementType[e.type]?e.type:i.ord.PressureConditions.PressureMeasurement.PressureMeasurementType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.time&&e.hasOwnProperty("time")&&(n.time=i.ord.Time.toObject(e.time,t)),null!=e.pressure&&e.hasOwnProperty("pressure")&&(n.pressure=i.ord.Pressure.toObject(e.pressure,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.PressureConditions.PressureMeasurement"},n.PressureMeasurementType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="PRESSURE_TRANSDUCER"]=2,t}(),n}(),n}(),n.StirringConditions=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.rate=null,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.rate&&Object.hasOwnProperty.call(e,"rate")&&i.ord.StirringConditions.StirringRate.encode(e.rate,t.uint32(26).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.StirringConditions;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.rate=i.ord.StirringConditions.StirringRate.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.rate&&e.hasOwnProperty("rate")){let t=i.ord.StirringConditions.StirringRate.verify(e.rate);if(t)return"rate."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.StirringConditions)return e;let t=new i.ord.StirringConditions;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"NONE":case 2:t.type=2;break;case"STIR_BAR":case 3:t.type=3;break;case"OVERHEAD_MIXER":case 4:t.type=4;break;case"AGITATION":case 5:t.type=5;break;case"BALL_MILLING":case 6:t.type=6;break;case"SONICATION":case 7:t.type=7}if(null!=e.details&&(t.details=String(e.details)),null!=e.rate){if("object"!=typeof e.rate)throw TypeError(".ord.StirringConditions.rate: object expected");t.rate=i.ord.StirringConditions.StirringRate.fromObject(e.rate)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.rate=null),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.StirringConditions.StirringMethodType[e.type]?e.type:i.ord.StirringConditions.StirringMethodType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.rate&&e.hasOwnProperty("rate")&&(n.rate=i.ord.StirringConditions.StirringRate.toObject(e.rate,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.StirringConditions"},n.StirringMethodType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="NONE"]=2,t[e[3]="STIR_BAR"]=3,t[e[4]="OVERHEAD_MIXER"]=4,t[e[5]="AGITATION"]=5,t[e[6]="BALL_MILLING"]=6,t[e[7]="SONICATION"]=7,t}(),n.StirringRate=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.rpm=0,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.rpm&&Object.hasOwnProperty.call(e,"rpm")&&t.uint32(24).int32(e.rpm),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.StirringConditions.StirringRate;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.rpm=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null!=e.rpm&&e.hasOwnProperty("rpm")&&!o.isInteger(e.rpm)?"rpm: integer expected":null},n.fromObject=function(e){if(e instanceof i.ord.StirringConditions.StirringRate)return e;let t=new i.ord.StirringConditions.StirringRate;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"HIGH":case 1:t.type=1;break;case"MEDIUM":case 2:t.type=2;break;case"LOW":case 3:t.type=3}return null!=e.details&&(t.details=String(e.details)),null!=e.rpm&&(t.rpm=0|e.rpm),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.rpm=0),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.StirringConditions.StirringRate.StirringRateType[e.type]?e.type:i.ord.StirringConditions.StirringRate.StirringRateType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.rpm&&e.hasOwnProperty("rpm")&&(n.rpm=e.rpm),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.StirringConditions.StirringRate"},n.StirringRateType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="HIGH"]=1,t[e[2]="MEDIUM"]=2,t[e[3]="LOW"]=3,t}(),n}(),n}(),n.IlluminationConditions=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.peakWavelength=null,n.prototype.color="",n.prototype.distanceToVessel=null,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.peakWavelength&&Object.hasOwnProperty.call(e,"peakWavelength")&&i.ord.Wavelength.encode(e.peakWavelength,t.uint32(26).fork()).ldelim(),null!=e.color&&Object.hasOwnProperty.call(e,"color")&&t.uint32(34).string(e.color),null!=e.distanceToVessel&&Object.hasOwnProperty.call(e,"distanceToVessel")&&i.ord.Length.encode(e.distanceToVessel,t.uint32(42).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.IlluminationConditions;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.peakWavelength=i.ord.Wavelength.decode(e,e.uint32());break;case 4:o.color=e.string();break;case 5:o.distanceToVessel=i.ord.Length.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.peakWavelength&&e.hasOwnProperty("peakWavelength")){let t=i.ord.Wavelength.verify(e.peakWavelength);if(t)return"peakWavelength."+t}if(null!=e.color&&e.hasOwnProperty("color")&&!o.isString(e.color))return"color: string expected";if(null!=e.distanceToVessel&&e.hasOwnProperty("distanceToVessel")){let t=i.ord.Length.verify(e.distanceToVessel);if(t)return"distanceToVessel."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.IlluminationConditions)return e;let t=new i.ord.IlluminationConditions;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"AMBIENT":case 2:t.type=2;break;case"DARK":case 3:t.type=3;break;case"LED":case 4:t.type=4;break;case"HALOGEN_LAMP":case 5:t.type=5;break;case"DEUTERIUM_LAMP":case 6:t.type=6;break;case"SOLAR_SIMULATOR":case 7:t.type=7;break;case"BROAD_SPECTRUM":case 8:t.type=8}if(null!=e.details&&(t.details=String(e.details)),null!=e.peakWavelength){if("object"!=typeof e.peakWavelength)throw TypeError(".ord.IlluminationConditions.peakWavelength: object expected");t.peakWavelength=i.ord.Wavelength.fromObject(e.peakWavelength)}if(null!=e.color&&(t.color=String(e.color)),null!=e.distanceToVessel){if("object"!=typeof e.distanceToVessel)throw TypeError(".ord.IlluminationConditions.distanceToVessel: object expected");t.distanceToVessel=i.ord.Length.fromObject(e.distanceToVessel)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.peakWavelength=null,n.color="",n.distanceToVessel=null),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.IlluminationConditions.IlluminationType[e.type]?e.type:i.ord.IlluminationConditions.IlluminationType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.peakWavelength&&e.hasOwnProperty("peakWavelength")&&(n.peakWavelength=i.ord.Wavelength.toObject(e.peakWavelength,t)),null!=e.color&&e.hasOwnProperty("color")&&(n.color=e.color),null!=e.distanceToVessel&&e.hasOwnProperty("distanceToVessel")&&(n.distanceToVessel=i.ord.Length.toObject(e.distanceToVessel,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.IlluminationConditions"},n.IlluminationType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="AMBIENT"]=2,t[e[3]="DARK"]=3,t[e[4]="LED"]=4,t[e[5]="HALOGEN_LAMP"]=5,t[e[6]="DEUTERIUM_LAMP"]=6,t[e[7]="SOLAR_SIMULATOR"]=7,t[e[8]="BROAD_SPECTRUM"]=8,t}(),n}(),n.ElectrochemistryConditions=function(){function n(e){if(this.measurements=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.current=null,n.prototype.voltage=null,n.prototype.anodeMaterial="",n.prototype.cathodeMaterial="",n.prototype.electrodeSeparation=null,n.prototype.measurements=o.emptyArray,n.prototype.cell=null,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.current&&Object.hasOwnProperty.call(e,"current")&&i.ord.Current.encode(e.current,t.uint32(26).fork()).ldelim(),null!=e.voltage&&Object.hasOwnProperty.call(e,"voltage")&&i.ord.Voltage.encode(e.voltage,t.uint32(34).fork()).ldelim(),null!=e.anodeMaterial&&Object.hasOwnProperty.call(e,"anodeMaterial")&&t.uint32(42).string(e.anodeMaterial),null!=e.cathodeMaterial&&Object.hasOwnProperty.call(e,"cathodeMaterial")&&t.uint32(50).string(e.cathodeMaterial),null!=e.electrodeSeparation&&Object.hasOwnProperty.call(e,"electrodeSeparation")&&i.ord.Length.encode(e.electrodeSeparation,t.uint32(58).fork()).ldelim(),null!=e.measurements&&e.measurements.length)for(let n=0;n<e.measurements.length;++n)i.ord.ElectrochemistryConditions.ElectrochemistryMeasurement.encode(e.measurements[n],t.uint32(66).fork()).ldelim();return null!=e.cell&&Object.hasOwnProperty.call(e,"cell")&&i.ord.ElectrochemistryConditions.ElectrochemistryCell.encode(e.cell,t.uint32(74).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ElectrochemistryConditions;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.current=i.ord.Current.decode(e,e.uint32());break;case 4:o.voltage=i.ord.Voltage.decode(e,e.uint32());break;case 5:o.anodeMaterial=e.string();break;case 6:o.cathodeMaterial=e.string();break;case 7:o.electrodeSeparation=i.ord.Length.decode(e,e.uint32());break;case 8:o.measurements&&o.measurements.length||(o.measurements=[]),o.measurements.push(i.ord.ElectrochemistryConditions.ElectrochemistryMeasurement.decode(e,e.uint32()));break;case 9:o.cell=i.ord.ElectrochemistryConditions.ElectrochemistryCell.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.current&&e.hasOwnProperty("current")){let t=i.ord.Current.verify(e.current);if(t)return"current."+t}if(null!=e.voltage&&e.hasOwnProperty("voltage")){let t=i.ord.Voltage.verify(e.voltage);if(t)return"voltage."+t}if(null!=e.anodeMaterial&&e.hasOwnProperty("anodeMaterial")&&!o.isString(e.anodeMaterial))return"anodeMaterial: string expected";if(null!=e.cathodeMaterial&&e.hasOwnProperty("cathodeMaterial")&&!o.isString(e.cathodeMaterial))return"cathodeMaterial: string expected";if(null!=e.electrodeSeparation&&e.hasOwnProperty("electrodeSeparation")){let t=i.ord.Length.verify(e.electrodeSeparation);if(t)return"electrodeSeparation."+t}if(null!=e.measurements&&e.hasOwnProperty("measurements")){if(!Array.isArray(e.measurements))return"measurements: array expected";for(let t=0;t<e.measurements.length;++t){let n=i.ord.ElectrochemistryConditions.ElectrochemistryMeasurement.verify(e.measurements[t]);if(n)return"measurements."+n}}if(null!=e.cell&&e.hasOwnProperty("cell")){let t=i.ord.ElectrochemistryConditions.ElectrochemistryCell.verify(e.cell);if(t)return"cell."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.ElectrochemistryConditions)return e;let t=new i.ord.ElectrochemistryConditions;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"CONSTANT_CURRENT":case 2:t.type=2;break;case"CONSTANT_VOLTAGE":case 3:t.type=3}if(null!=e.details&&(t.details=String(e.details)),null!=e.current){if("object"!=typeof e.current)throw TypeError(".ord.ElectrochemistryConditions.current: object expected");t.current=i.ord.Current.fromObject(e.current)}if(null!=e.voltage){if("object"!=typeof e.voltage)throw TypeError(".ord.ElectrochemistryConditions.voltage: object expected");t.voltage=i.ord.Voltage.fromObject(e.voltage)}if(null!=e.anodeMaterial&&(t.anodeMaterial=String(e.anodeMaterial)),null!=e.cathodeMaterial&&(t.cathodeMaterial=String(e.cathodeMaterial)),null!=e.electrodeSeparation){if("object"!=typeof e.electrodeSeparation)throw TypeError(".ord.ElectrochemistryConditions.electrodeSeparation: object expected");t.electrodeSeparation=i.ord.Length.fromObject(e.electrodeSeparation)}if(e.measurements){if(!Array.isArray(e.measurements))throw TypeError(".ord.ElectrochemistryConditions.measurements: array expected");t.measurements=[];for(let n=0;n<e.measurements.length;++n){if("object"!=typeof e.measurements[n])throw TypeError(".ord.ElectrochemistryConditions.measurements: object expected");t.measurements[n]=i.ord.ElectrochemistryConditions.ElectrochemistryMeasurement.fromObject(e.measurements[n])}}if(null!=e.cell){if("object"!=typeof e.cell)throw TypeError(".ord.ElectrochemistryConditions.cell: object expected");t.cell=i.ord.ElectrochemistryConditions.ElectrochemistryCell.fromObject(e.cell)}return t},n.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.measurements=[]),t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.current=null,n.voltage=null,n.anodeMaterial="",n.cathodeMaterial="",n.electrodeSeparation=null,n.cell=null),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ElectrochemistryConditions.ElectrochemistryType[e.type]?e.type:i.ord.ElectrochemistryConditions.ElectrochemistryType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.current&&e.hasOwnProperty("current")&&(n.current=i.ord.Current.toObject(e.current,t)),null!=e.voltage&&e.hasOwnProperty("voltage")&&(n.voltage=i.ord.Voltage.toObject(e.voltage,t)),null!=e.anodeMaterial&&e.hasOwnProperty("anodeMaterial")&&(n.anodeMaterial=e.anodeMaterial),null!=e.cathodeMaterial&&e.hasOwnProperty("cathodeMaterial")&&(n.cathodeMaterial=e.cathodeMaterial),null!=e.electrodeSeparation&&e.hasOwnProperty("electrodeSeparation")&&(n.electrodeSeparation=i.ord.Length.toObject(e.electrodeSeparation,t)),e.measurements&&e.measurements.length){n.measurements=[];for(let r=0;r<e.measurements.length;++r)n.measurements[r]=i.ord.ElectrochemistryConditions.ElectrochemistryMeasurement.toObject(e.measurements[r],t)}return null!=e.cell&&e.hasOwnProperty("cell")&&(n.cell=i.ord.ElectrochemistryConditions.ElectrochemistryCell.toObject(e.cell,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ElectrochemistryConditions"},n.ElectrochemistryType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="CONSTANT_CURRENT"]=2,t[e[3]="CONSTANT_VOLTAGE"]=3,t}(),n.ElectrochemistryMeasurement=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.time=null,n.prototype.current=null,n.prototype.voltage=null,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.time&&Object.hasOwnProperty.call(e,"time")&&i.ord.Time.encode(e.time,t.uint32(10).fork()).ldelim(),null!=e.current&&Object.hasOwnProperty.call(e,"current")&&i.ord.Current.encode(e.current,t.uint32(18).fork()).ldelim(),null!=e.voltage&&Object.hasOwnProperty.call(e,"voltage")&&i.ord.Voltage.encode(e.voltage,t.uint32(26).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ElectrochemistryConditions.ElectrochemistryMeasurement;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.time=i.ord.Time.decode(e,e.uint32());break;case 2:o.current=i.ord.Current.decode(e,e.uint32());break;case 3:o.voltage=i.ord.Voltage.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.time&&e.hasOwnProperty("time")){let t=i.ord.Time.verify(e.time);if(t)return"time."+t}if(null!=e.current&&e.hasOwnProperty("current")){let t=i.ord.Current.verify(e.current);if(t)return"current."+t}if(null!=e.voltage&&e.hasOwnProperty("voltage")){let t=i.ord.Voltage.verify(e.voltage);if(t)return"voltage."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.ElectrochemistryConditions.ElectrochemistryMeasurement)return e;let t=new i.ord.ElectrochemistryConditions.ElectrochemistryMeasurement;if(null!=e.time){if("object"!=typeof e.time)throw TypeError(".ord.ElectrochemistryConditions.ElectrochemistryMeasurement.time: object expected");t.time=i.ord.Time.fromObject(e.time)}if(null!=e.current){if("object"!=typeof e.current)throw TypeError(".ord.ElectrochemistryConditions.ElectrochemistryMeasurement.current: object expected");t.current=i.ord.Current.fromObject(e.current)}if(null!=e.voltage){if("object"!=typeof e.voltage)throw TypeError(".ord.ElectrochemistryConditions.ElectrochemistryMeasurement.voltage: object expected");t.voltage=i.ord.Voltage.fromObject(e.voltage)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.time=null,n.current=null,n.voltage=null),null!=e.time&&e.hasOwnProperty("time")&&(n.time=i.ord.Time.toObject(e.time,t)),null!=e.current&&e.hasOwnProperty("current")&&(n.current=i.ord.Current.toObject(e.current,t)),null!=e.voltage&&e.hasOwnProperty("voltage")&&(n.voltage=i.ord.Voltage.toObject(e.voltage,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ElectrochemistryConditions.ElectrochemistryMeasurement"},n}(),n.ElectrochemistryCell=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ElectrochemistryConditions.ElectrochemistryCell;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.ElectrochemistryConditions.ElectrochemistryCell)return e;let t=new i.ord.ElectrochemistryConditions.ElectrochemistryCell;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"DIVIDED_CELL":case 2:t.type=2;break;case"UNDIVIDED_CELL":case 3:t.type=3}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ElectrochemistryConditions.ElectrochemistryCell.ElectrochemistryCellType[e.type]?e.type:i.ord.ElectrochemistryConditions.ElectrochemistryCell.ElectrochemistryCellType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ElectrochemistryConditions.ElectrochemistryCell"},n.ElectrochemistryCellType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="DIVIDED_CELL"]=2,t[e[3]="UNDIVIDED_CELL"]=3,t}(),n}(),n}(),n.FlowConditions=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.pumpType="",n.prototype.tubing=null,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.pumpType&&Object.hasOwnProperty.call(e,"pumpType")&&t.uint32(26).string(e.pumpType),null!=e.tubing&&Object.hasOwnProperty.call(e,"tubing")&&i.ord.FlowConditions.Tubing.encode(e.tubing,t.uint32(34).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.FlowConditions;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.pumpType=e.string();break;case 4:o.tubing=i.ord.FlowConditions.Tubing.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.pumpType&&e.hasOwnProperty("pumpType")&&!o.isString(e.pumpType))return"pumpType: string expected";if(null!=e.tubing&&e.hasOwnProperty("tubing")){let t=i.ord.FlowConditions.Tubing.verify(e.tubing);if(t)return"tubing."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.FlowConditions)return e;let t=new i.ord.FlowConditions;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"PLUG_FLOW_REACTOR":case 2:t.type=2;break;case"CONTINUOUS_STIRRED_TANK_REACTOR":case 3:t.type=3;break;case"PACKED_BED_REACTOR":case 4:t.type=4}if(null!=e.details&&(t.details=String(e.details)),null!=e.pumpType&&(t.pumpType=String(e.pumpType)),null!=e.tubing){if("object"!=typeof e.tubing)throw TypeError(".ord.FlowConditions.tubing: object expected");t.tubing=i.ord.FlowConditions.Tubing.fromObject(e.tubing)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.pumpType="",n.tubing=null),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.FlowConditions.FlowType[e.type]?e.type:i.ord.FlowConditions.FlowType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.pumpType&&e.hasOwnProperty("pumpType")&&(n.pumpType=e.pumpType),null!=e.tubing&&e.hasOwnProperty("tubing")&&(n.tubing=i.ord.FlowConditions.Tubing.toObject(e.tubing,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.FlowConditions"},n.FlowType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="PLUG_FLOW_REACTOR"]=2,t[e[3]="CONTINUOUS_STIRRED_TANK_REACTOR"]=3,t[e[4]="PACKED_BED_REACTOR"]=4,t}(),n.Tubing=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.prototype.diameter=null,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.diameter&&Object.hasOwnProperty.call(e,"diameter")&&i.ord.Length.encode(e.diameter,t.uint32(26).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.FlowConditions.Tubing;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.diameter=i.ord.Length.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.diameter&&e.hasOwnProperty("diameter")){let t=i.ord.Length.verify(e.diameter);if(t)return"diameter."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.FlowConditions.Tubing)return e;let t=new i.ord.FlowConditions.Tubing;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"STEEL":case 2:t.type=2;break;case"COPPER":case 3:t.type=3;break;case"PFA":case 4:t.type=4;break;case"FEP":case 5:t.type=5;break;case"TEFLONAF":case 6:t.type=6;break;case"PTFE":case 7:t.type=7;break;case"GLASS":case 8:t.type=8;break;case"QUARTZ":case 9:t.type=9;break;case"SILICON":case 10:t.type=10;break;case"PDMS":case 11:t.type=11}if(null!=e.details&&(t.details=String(e.details)),null!=e.diameter){if("object"!=typeof e.diameter)throw TypeError(".ord.FlowConditions.Tubing.diameter: object expected");t.diameter=i.ord.Length.fromObject(e.diameter)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.diameter=null),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.FlowConditions.Tubing.TubingType[e.type]?e.type:i.ord.FlowConditions.Tubing.TubingType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.diameter&&e.hasOwnProperty("diameter")&&(n.diameter=i.ord.Length.toObject(e.diameter,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.FlowConditions.Tubing"},n.TubingType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="STEEL"]=2,t[e[3]="COPPER"]=3,t[e[4]="PFA"]=4,t[e[5]="FEP"]=5,t[e[6]="TEFLONAF"]=6,t[e[7]="PTFE"]=7,t[e[8]="GLASS"]=8,t[e[9]="QUARTZ"]=9,t[e[10]="SILICON"]=10,t[e[11]="PDMS"]=11,t}(),n}(),n}(),n.ReactionNotes=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.isHeterogeneous=null,n.prototype.formsPrecipitate=null,n.prototype.isExothermic=null,n.prototype.offgasses=null,n.prototype.isSensitiveToMoisture=null,n.prototype.isSensitiveToOxygen=null,n.prototype.isSensitiveToLight=null,n.prototype.safetyNotes="",n.prototype.procedureDetails="",Object.defineProperty(n.prototype,"_isHeterogeneous",{get:o.oneOfGetter(s=["isHeterogeneous"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_formsPrecipitate",{get:o.oneOfGetter(s=["formsPrecipitate"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_isExothermic",{get:o.oneOfGetter(s=["isExothermic"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_offgasses",{get:o.oneOfGetter(s=["offgasses"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_isSensitiveToMoisture",{get:o.oneOfGetter(s=["isSensitiveToMoisture"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_isSensitiveToOxygen",{get:o.oneOfGetter(s=["isSensitiveToOxygen"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_isSensitiveToLight",{get:o.oneOfGetter(s=["isSensitiveToLight"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.isHeterogeneous&&Object.hasOwnProperty.call(e,"isHeterogeneous")&&t.uint32(8).bool(e.isHeterogeneous),null!=e.formsPrecipitate&&Object.hasOwnProperty.call(e,"formsPrecipitate")&&t.uint32(16).bool(e.formsPrecipitate),null!=e.isExothermic&&Object.hasOwnProperty.call(e,"isExothermic")&&t.uint32(24).bool(e.isExothermic),null!=e.offgasses&&Object.hasOwnProperty.call(e,"offgasses")&&t.uint32(32).bool(e.offgasses),null!=e.isSensitiveToMoisture&&Object.hasOwnProperty.call(e,"isSensitiveToMoisture")&&t.uint32(40).bool(e.isSensitiveToMoisture),null!=e.isSensitiveToOxygen&&Object.hasOwnProperty.call(e,"isSensitiveToOxygen")&&t.uint32(48).bool(e.isSensitiveToOxygen),null!=e.isSensitiveToLight&&Object.hasOwnProperty.call(e,"isSensitiveToLight")&&t.uint32(56).bool(e.isSensitiveToLight),null!=e.safetyNotes&&Object.hasOwnProperty.call(e,"safetyNotes")&&t.uint32(66).string(e.safetyNotes),null!=e.procedureDetails&&Object.hasOwnProperty.call(e,"procedureDetails")&&t.uint32(74).string(e.procedureDetails),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionNotes;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.isHeterogeneous=e.bool();break;case 2:o.formsPrecipitate=e.bool();break;case 3:o.isExothermic=e.bool();break;case 4:o.offgasses=e.bool();break;case 5:o.isSensitiveToMoisture=e.bool();break;case 6:o.isSensitiveToOxygen=e.bool();break;case 7:o.isSensitiveToLight=e.bool();break;case 8:o.safetyNotes=e.string();break;case 9:o.procedureDetails=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};return null!=e.isHeterogeneous&&e.hasOwnProperty("isHeterogeneous")&&(t._isHeterogeneous=1,"boolean"!=typeof e.isHeterogeneous)?"isHeterogeneous: boolean expected":null!=e.formsPrecipitate&&e.hasOwnProperty("formsPrecipitate")&&(t._formsPrecipitate=1,"boolean"!=typeof e.formsPrecipitate)?"formsPrecipitate: boolean expected":null!=e.isExothermic&&e.hasOwnProperty("isExothermic")&&(t._isExothermic=1,"boolean"!=typeof e.isExothermic)?"isExothermic: boolean expected":null!=e.offgasses&&e.hasOwnProperty("offgasses")&&(t._offgasses=1,"boolean"!=typeof e.offgasses)?"offgasses: boolean expected":null!=e.isSensitiveToMoisture&&e.hasOwnProperty("isSensitiveToMoisture")&&(t._isSensitiveToMoisture=1,"boolean"!=typeof e.isSensitiveToMoisture)?"isSensitiveToMoisture: boolean expected":null!=e.isSensitiveToOxygen&&e.hasOwnProperty("isSensitiveToOxygen")&&(t._isSensitiveToOxygen=1,"boolean"!=typeof e.isSensitiveToOxygen)?"isSensitiveToOxygen: boolean expected":null!=e.isSensitiveToLight&&e.hasOwnProperty("isSensitiveToLight")&&(t._isSensitiveToLight=1,"boolean"!=typeof e.isSensitiveToLight)?"isSensitiveToLight: boolean expected":null!=e.safetyNotes&&e.hasOwnProperty("safetyNotes")&&!o.isString(e.safetyNotes)?"safetyNotes: string expected":null!=e.procedureDetails&&e.hasOwnProperty("procedureDetails")&&!o.isString(e.procedureDetails)?"procedureDetails: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.ReactionNotes)return e;let t=new i.ord.ReactionNotes;return null!=e.isHeterogeneous&&(t.isHeterogeneous=Boolean(e.isHeterogeneous)),null!=e.formsPrecipitate&&(t.formsPrecipitate=Boolean(e.formsPrecipitate)),null!=e.isExothermic&&(t.isExothermic=Boolean(e.isExothermic)),null!=e.offgasses&&(t.offgasses=Boolean(e.offgasses)),null!=e.isSensitiveToMoisture&&(t.isSensitiveToMoisture=Boolean(e.isSensitiveToMoisture)),null!=e.isSensitiveToOxygen&&(t.isSensitiveToOxygen=Boolean(e.isSensitiveToOxygen)),null!=e.isSensitiveToLight&&(t.isSensitiveToLight=Boolean(e.isSensitiveToLight)),null!=e.safetyNotes&&(t.safetyNotes=String(e.safetyNotes)),null!=e.procedureDetails&&(t.procedureDetails=String(e.procedureDetails)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.safetyNotes="",n.procedureDetails=""),null!=e.isHeterogeneous&&e.hasOwnProperty("isHeterogeneous")&&(n.isHeterogeneous=e.isHeterogeneous,t.oneofs&&(n._isHeterogeneous="isHeterogeneous")),null!=e.formsPrecipitate&&e.hasOwnProperty("formsPrecipitate")&&(n.formsPrecipitate=e.formsPrecipitate,t.oneofs&&(n._formsPrecipitate="formsPrecipitate")),null!=e.isExothermic&&e.hasOwnProperty("isExothermic")&&(n.isExothermic=e.isExothermic,t.oneofs&&(n._isExothermic="isExothermic")),null!=e.offgasses&&e.hasOwnProperty("offgasses")&&(n.offgasses=e.offgasses,t.oneofs&&(n._offgasses="offgasses")),null!=e.isSensitiveToMoisture&&e.hasOwnProperty("isSensitiveToMoisture")&&(n.isSensitiveToMoisture=e.isSensitiveToMoisture,t.oneofs&&(n._isSensitiveToMoisture="isSensitiveToMoisture")),null!=e.isSensitiveToOxygen&&e.hasOwnProperty("isSensitiveToOxygen")&&(n.isSensitiveToOxygen=e.isSensitiveToOxygen,t.oneofs&&(n._isSensitiveToOxygen="isSensitiveToOxygen")),null!=e.isSensitiveToLight&&e.hasOwnProperty("isSensitiveToLight")&&(n.isSensitiveToLight=e.isSensitiveToLight,t.oneofs&&(n._isSensitiveToLight="isSensitiveToLight")),null!=e.safetyNotes&&e.hasOwnProperty("safetyNotes")&&(n.safetyNotes=e.safetyNotes),null!=e.procedureDetails&&e.hasOwnProperty("procedureDetails")&&(n.procedureDetails=e.procedureDetails),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionNotes"},n}(),n.ReactionObservation=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.time=null,n.prototype.comment="",n.prototype.image=null,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.time&&Object.hasOwnProperty.call(e,"time")&&i.ord.Time.encode(e.time,t.uint32(10).fork()).ldelim(),null!=e.comment&&Object.hasOwnProperty.call(e,"comment")&&t.uint32(18).string(e.comment),null!=e.image&&Object.hasOwnProperty.call(e,"image")&&i.ord.Data.encode(e.image,t.uint32(26).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionObservation;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.time=i.ord.Time.decode(e,e.uint32());break;case 2:o.comment=e.string();break;case 3:o.image=i.ord.Data.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.time&&e.hasOwnProperty("time")){let t=i.ord.Time.verify(e.time);if(t)return"time."+t}if(null!=e.comment&&e.hasOwnProperty("comment")&&!o.isString(e.comment))return"comment: string expected";if(null!=e.image&&e.hasOwnProperty("image")){let t=i.ord.Data.verify(e.image);if(t)return"image."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.ReactionObservation)return e;let t=new i.ord.ReactionObservation;if(null!=e.time){if("object"!=typeof e.time)throw TypeError(".ord.ReactionObservation.time: object expected");t.time=i.ord.Time.fromObject(e.time)}if(null!=e.comment&&(t.comment=String(e.comment)),null!=e.image){if("object"!=typeof e.image)throw TypeError(".ord.ReactionObservation.image: object expected");t.image=i.ord.Data.fromObject(e.image)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.time=null,n.comment="",n.image=null),null!=e.time&&e.hasOwnProperty("time")&&(n.time=i.ord.Time.toObject(e.time,t)),null!=e.comment&&e.hasOwnProperty("comment")&&(n.comment=e.comment),null!=e.image&&e.hasOwnProperty("image")&&(n.image=i.ord.Data.toObject(e.image,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionObservation"},n}(),n.ReactionWorkup=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.type=0,n.prototype.details="",n.prototype.duration=null,n.prototype.input=null,n.prototype.amount=null,n.prototype.temperature=null,n.prototype.keepPhase="",n.prototype.stirring=null,n.prototype.targetPh=null,n.prototype.isAutomated=null,Object.defineProperty(n.prototype,"_targetPh",{get:o.oneOfGetter(s=["targetPh"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_isAutomated",{get:o.oneOfGetter(s=["isAutomated"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.duration&&Object.hasOwnProperty.call(e,"duration")&&i.ord.Time.encode(e.duration,t.uint32(26).fork()).ldelim(),null!=e.input&&Object.hasOwnProperty.call(e,"input")&&i.ord.ReactionInput.encode(e.input,t.uint32(34).fork()).ldelim(),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&i.ord.Amount.encode(e.amount,t.uint32(42).fork()).ldelim(),null!=e.temperature&&Object.hasOwnProperty.call(e,"temperature")&&i.ord.TemperatureConditions.encode(e.temperature,t.uint32(50).fork()).ldelim(),null!=e.keepPhase&&Object.hasOwnProperty.call(e,"keepPhase")&&t.uint32(58).string(e.keepPhase),null!=e.stirring&&Object.hasOwnProperty.call(e,"stirring")&&i.ord.StirringConditions.encode(e.stirring,t.uint32(66).fork()).ldelim(),null!=e.targetPh&&Object.hasOwnProperty.call(e,"targetPh")&&t.uint32(77).float(e.targetPh),null!=e.isAutomated&&Object.hasOwnProperty.call(e,"isAutomated")&&t.uint32(80).bool(e.isAutomated),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ReactionWorkup;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.duration=i.ord.Time.decode(e,e.uint32());break;case 4:o.input=i.ord.ReactionInput.decode(e,e.uint32());break;case 5:o.amount=i.ord.Amount.decode(e,e.uint32());break;case 6:o.temperature=i.ord.TemperatureConditions.decode(e,e.uint32());break;case 7:o.keepPhase=e.string();break;case 8:o.stirring=i.ord.StirringConditions.decode(e,e.uint32());break;case 9:o.targetPh=e.float();break;case 10:o.isAutomated=e.bool();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.duration&&e.hasOwnProperty("duration")){let t=i.ord.Time.verify(e.duration);if(t)return"duration."+t}if(null!=e.input&&e.hasOwnProperty("input")){let t=i.ord.ReactionInput.verify(e.input);if(t)return"input."+t}if(null!=e.amount&&e.hasOwnProperty("amount")){let t=i.ord.Amount.verify(e.amount);if(t)return"amount."+t}if(null!=e.temperature&&e.hasOwnProperty("temperature")){let t=i.ord.TemperatureConditions.verify(e.temperature);if(t)return"temperature."+t}if(null!=e.keepPhase&&e.hasOwnProperty("keepPhase")&&!o.isString(e.keepPhase))return"keepPhase: string expected";if(null!=e.stirring&&e.hasOwnProperty("stirring")){let t=i.ord.StirringConditions.verify(e.stirring);if(t)return"stirring."+t}return null!=e.targetPh&&e.hasOwnProperty("targetPh")&&(t._targetPh=1,"number"!=typeof e.targetPh)?"targetPh: number expected":null!=e.isAutomated&&e.hasOwnProperty("isAutomated")&&(t._isAutomated=1,"boolean"!=typeof e.isAutomated)?"isAutomated: boolean expected":null},n.fromObject=function(e){if(e instanceof i.ord.ReactionWorkup)return e;let t=new i.ord.ReactionWorkup;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"ADDITION":case 2:t.type=2;break;case"ALIQUOT":case 3:t.type=3;break;case"TEMPERATURE":case 4:t.type=4;break;case"CONCENTRATION":case 5:t.type=5;break;case"EXTRACTION":case 6:t.type=6;break;case"FILTRATION":case 7:t.type=7;break;case"WASH":case 8:t.type=8;break;case"DRY_IN_VACUUM":case 9:t.type=9;break;case"DRY_WITH_MATERIAL":case 10:t.type=10;break;case"FLASH_CHROMATOGRAPHY":case 11:t.type=11;break;case"OTHER_CHROMATOGRAPHY":case 12:t.type=12;break;case"SCAVENGING":case 13:t.type=13;break;case"WAIT":case 14:t.type=14;break;case"STIRRING":case 15:t.type=15;break;case"PH_ADJUST":case 16:t.type=16;break;case"DISSOLUTION":case 17:t.type=17;break;case"DISTILLATION":case 18:t.type=18}if(null!=e.details&&(t.details=String(e.details)),null!=e.duration){if("object"!=typeof e.duration)throw TypeError(".ord.ReactionWorkup.duration: object expected");t.duration=i.ord.Time.fromObject(e.duration)}if(null!=e.input){if("object"!=typeof e.input)throw TypeError(".ord.ReactionWorkup.input: object expected");t.input=i.ord.ReactionInput.fromObject(e.input)}if(null!=e.amount){if("object"!=typeof e.amount)throw TypeError(".ord.ReactionWorkup.amount: object expected");t.amount=i.ord.Amount.fromObject(e.amount)}if(null!=e.temperature){if("object"!=typeof e.temperature)throw TypeError(".ord.ReactionWorkup.temperature: object expected");t.temperature=i.ord.TemperatureConditions.fromObject(e.temperature)}if(null!=e.keepPhase&&(t.keepPhase=String(e.keepPhase)),null!=e.stirring){if("object"!=typeof e.stirring)throw TypeError(".ord.ReactionWorkup.stirring: object expected");t.stirring=i.ord.StirringConditions.fromObject(e.stirring)}return null!=e.targetPh&&(t.targetPh=Number(e.targetPh)),null!=e.isAutomated&&(t.isAutomated=Boolean(e.isAutomated)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.duration=null,n.input=null,n.amount=null,n.temperature=null,n.keepPhase="",n.stirring=null),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ReactionWorkup.ReactionWorkupType[e.type]?e.type:i.ord.ReactionWorkup.ReactionWorkupType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.duration&&e.hasOwnProperty("duration")&&(n.duration=i.ord.Time.toObject(e.duration,t)),null!=e.input&&e.hasOwnProperty("input")&&(n.input=i.ord.ReactionInput.toObject(e.input,t)),null!=e.amount&&e.hasOwnProperty("amount")&&(n.amount=i.ord.Amount.toObject(e.amount,t)),null!=e.temperature&&e.hasOwnProperty("temperature")&&(n.temperature=i.ord.TemperatureConditions.toObject(e.temperature,t)),null!=e.keepPhase&&e.hasOwnProperty("keepPhase")&&(n.keepPhase=e.keepPhase),null!=e.stirring&&e.hasOwnProperty("stirring")&&(n.stirring=i.ord.StirringConditions.toObject(e.stirring,t)),null!=e.targetPh&&e.hasOwnProperty("targetPh")&&(n.targetPh=t.json&&!isFinite(e.targetPh)?String(e.targetPh):e.targetPh,t.oneofs&&(n._targetPh="targetPh")),null!=e.isAutomated&&e.hasOwnProperty("isAutomated")&&(n.isAutomated=e.isAutomated,t.oneofs&&(n._isAutomated="isAutomated")),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionWorkup"},n.ReactionWorkupType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="ADDITION"]=2,t[e[3]="ALIQUOT"]=3,t[e[4]="TEMPERATURE"]=4,t[e[5]="CONCENTRATION"]=5,t[e[6]="EXTRACTION"]=6,t[e[7]="FILTRATION"]=7,t[e[8]="WASH"]=8,t[e[9]="DRY_IN_VACUUM"]=9,t[e[10]="DRY_WITH_MATERIAL"]=10,t[e[11]="FLASH_CHROMATOGRAPHY"]=11,t[e[12]="OTHER_CHROMATOGRAPHY"]=12,t[e[13]="SCAVENGING"]=13,t[e[14]="WAIT"]=14,t[e[15]="STIRRING"]=15,t[e[16]="PH_ADJUST"]=16,t[e[17]="DISSOLUTION"]=17,t[e[18]="DISTILLATION"]=18,t}(),n}(),n.ReactionOutcome=function(){function n(e){if(this.products=[],this.analyses={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.reactionTime=null,n.prototype.conversion=null,n.prototype.products=o.emptyArray,n.prototype.analyses=o.emptyObject,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.reactionTime&&Object.hasOwnProperty.call(e,"reactionTime")&&i.ord.Time.encode(e.reactionTime,t.uint32(10).fork()).ldelim(),null!=e.conversion&&Object.hasOwnProperty.call(e,"conversion")&&i.ord.Percentage.encode(e.conversion,t.uint32(18).fork()).ldelim(),null!=e.products&&e.products.length)for(let n=0;n<e.products.length;++n)i.ord.ProductCompound.encode(e.products[n],t.uint32(26).fork()).ldelim();if(null!=e.analyses&&Object.hasOwnProperty.call(e,"analyses"))for(let n=Object.keys(e.analyses),r=0;r<n.length;++r)t.uint32(34).fork().uint32(10).string(n[r]),i.ord.Analysis.encode(e.analyses[n[r]],t.uint32(18).fork()).ldelim().ldelim();return t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r,s,a=void 0===n?e.len:e.pos+n,l=new i.ord.ReactionOutcome;for(;e.pos<a;){let t=e.uint32();switch(t>>>3){case 1:l.reactionTime=i.ord.Time.decode(e,e.uint32());break;case 2:l.conversion=i.ord.Percentage.decode(e,e.uint32());break;case 3:l.products&&l.products.length||(l.products=[]),l.products.push(i.ord.ProductCompound.decode(e,e.uint32()));break;case 4:{l.analyses===o.emptyObject&&(l.analyses={});let t=e.uint32()+e.pos;for(r="",s=null;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=i.ord.Analysis.decode(e,e.uint32());break;default:e.skipType(7&t)}}l.analyses[r]=s;break}default:e.skipType(7&t)}}return l},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.reactionTime&&e.hasOwnProperty("reactionTime")){let t=i.ord.Time.verify(e.reactionTime);if(t)return"reactionTime."+t}if(null!=e.conversion&&e.hasOwnProperty("conversion")){let t=i.ord.Percentage.verify(e.conversion);if(t)return"conversion."+t}if(null!=e.products&&e.hasOwnProperty("products")){if(!Array.isArray(e.products))return"products: array expected";for(let t=0;t<e.products.length;++t){let n=i.ord.ProductCompound.verify(e.products[t]);if(n)return"products."+n}}if(null!=e.analyses&&e.hasOwnProperty("analyses")){if(!o.isObject(e.analyses))return"analyses: object expected";let t=Object.keys(e.analyses);for(let n=0;n<t.length;++n){let r=i.ord.Analysis.verify(e.analyses[t[n]]);if(r)return"analyses."+r}}return null},n.fromObject=function(e){if(e instanceof i.ord.ReactionOutcome)return e;let t=new i.ord.ReactionOutcome;if(null!=e.reactionTime){if("object"!=typeof e.reactionTime)throw TypeError(".ord.ReactionOutcome.reactionTime: object expected");t.reactionTime=i.ord.Time.fromObject(e.reactionTime)}if(null!=e.conversion){if("object"!=typeof e.conversion)throw TypeError(".ord.ReactionOutcome.conversion: object expected");t.conversion=i.ord.Percentage.fromObject(e.conversion)}if(e.products){if(!Array.isArray(e.products))throw TypeError(".ord.ReactionOutcome.products: array expected");t.products=[];for(let n=0;n<e.products.length;++n){if("object"!=typeof e.products[n])throw TypeError(".ord.ReactionOutcome.products: object expected");t.products[n]=i.ord.ProductCompound.fromObject(e.products[n])}}if(e.analyses){if("object"!=typeof e.analyses)throw TypeError(".ord.ReactionOutcome.analyses: object expected");t.analyses={};for(let n=Object.keys(e.analyses),r=0;r<n.length;++r){if("object"!=typeof e.analyses[n[r]])throw TypeError(".ord.ReactionOutcome.analyses: object expected");t.analyses[n[r]]=i.ord.Analysis.fromObject(e.analyses[n[r]])}}return t},n.toObject=function(e,t){t||(t={});let n,r={};if((t.arrays||t.defaults)&&(r.products=[]),(t.objects||t.defaults)&&(r.analyses={}),t.defaults&&(r.reactionTime=null,r.conversion=null),null!=e.reactionTime&&e.hasOwnProperty("reactionTime")&&(r.reactionTime=i.ord.Time.toObject(e.reactionTime,t)),null!=e.conversion&&e.hasOwnProperty("conversion")&&(r.conversion=i.ord.Percentage.toObject(e.conversion,t)),e.products&&e.products.length){r.products=[];for(let n=0;n<e.products.length;++n)r.products[n]=i.ord.ProductCompound.toObject(e.products[n],t)}if(e.analyses&&(n=Object.keys(e.analyses)).length){r.analyses={};for(let o=0;o<n.length;++o)r.analyses[n[o]]=i.ord.Analysis.toObject(e.analyses[n[o]],t)}return r},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionOutcome"},n}(),n.ProductCompound=function(){function n(e){if(this.identifiers=[],this.measurements=[],this.features={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.identifiers=o.emptyArray,n.prototype.isDesiredProduct=null,n.prototype.measurements=o.emptyArray,n.prototype.isolatedColor="",n.prototype.texture=null,n.prototype.features=o.emptyObject,n.prototype.reactionRole=0,Object.defineProperty(n.prototype,"_isDesiredProduct",{get:o.oneOfGetter(s=["isDesiredProduct"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.identifiers&&e.identifiers.length)for(let n=0;n<e.identifiers.length;++n)i.ord.CompoundIdentifier.encode(e.identifiers[n],t.uint32(10).fork()).ldelim();if(null!=e.isDesiredProduct&&Object.hasOwnProperty.call(e,"isDesiredProduct")&&t.uint32(16).bool(e.isDesiredProduct),null!=e.measurements&&e.measurements.length)for(let n=0;n<e.measurements.length;++n)i.ord.ProductMeasurement.encode(e.measurements[n],t.uint32(26).fork()).ldelim();if(null!=e.isolatedColor&&Object.hasOwnProperty.call(e,"isolatedColor")&&t.uint32(34).string(e.isolatedColor),null!=e.texture&&Object.hasOwnProperty.call(e,"texture")&&i.ord.Texture.encode(e.texture,t.uint32(42).fork()).ldelim(),null!=e.features&&Object.hasOwnProperty.call(e,"features"))for(let n=Object.keys(e.features),r=0;r<n.length;++r)t.uint32(50).fork().uint32(10).string(n[r]),i.ord.Data.encode(e.features[n[r]],t.uint32(18).fork()).ldelim().ldelim();return null!=e.reactionRole&&Object.hasOwnProperty.call(e,"reactionRole")&&t.uint32(56).int32(e.reactionRole),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r,s,a=void 0===n?e.len:e.pos+n,l=new i.ord.ProductCompound;for(;e.pos<a;){let t=e.uint32();switch(t>>>3){case 1:l.identifiers&&l.identifiers.length||(l.identifiers=[]),l.identifiers.push(i.ord.CompoundIdentifier.decode(e,e.uint32()));break;case 2:l.isDesiredProduct=e.bool();break;case 3:l.measurements&&l.measurements.length||(l.measurements=[]),l.measurements.push(i.ord.ProductMeasurement.decode(e,e.uint32()));break;case 4:l.isolatedColor=e.string();break;case 5:l.texture=i.ord.Texture.decode(e,e.uint32());break;case 6:{l.features===o.emptyObject&&(l.features={});let t=e.uint32()+e.pos;for(r="",s=null;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=i.ord.Data.decode(e,e.uint32());break;default:e.skipType(7&t)}}l.features[r]=s;break}case 7:l.reactionRole=e.int32();break;default:e.skipType(7&t)}}return l},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.identifiers&&e.hasOwnProperty("identifiers")){if(!Array.isArray(e.identifiers))return"identifiers: array expected";for(let t=0;t<e.identifiers.length;++t){let n=i.ord.CompoundIdentifier.verify(e.identifiers[t]);if(n)return"identifiers."+n}}if(null!=e.isDesiredProduct&&e.hasOwnProperty("isDesiredProduct")&&"boolean"!=typeof e.isDesiredProduct)return"isDesiredProduct: boolean expected";if(null!=e.measurements&&e.hasOwnProperty("measurements")){if(!Array.isArray(e.measurements))return"measurements: array expected";for(let t=0;t<e.measurements.length;++t){let n=i.ord.ProductMeasurement.verify(e.measurements[t]);if(n)return"measurements."+n}}if(null!=e.isolatedColor&&e.hasOwnProperty("isolatedColor")&&!o.isString(e.isolatedColor))return"isolatedColor: string expected";if(null!=e.texture&&e.hasOwnProperty("texture")){let t=i.ord.Texture.verify(e.texture);if(t)return"texture."+t}if(null!=e.features&&e.hasOwnProperty("features")){if(!o.isObject(e.features))return"features: object expected";let t=Object.keys(e.features);for(let n=0;n<t.length;++n){let r=i.ord.Data.verify(e.features[t[n]]);if(r)return"features."+r}}if(null!=e.reactionRole&&e.hasOwnProperty("reactionRole"))switch(e.reactionRole){default:return"reactionRole: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:}return null},n.fromObject=function(e){if(e instanceof i.ord.ProductCompound)return e;let t=new i.ord.ProductCompound;if(e.identifiers){if(!Array.isArray(e.identifiers))throw TypeError(".ord.ProductCompound.identifiers: array expected");t.identifiers=[];for(let n=0;n<e.identifiers.length;++n){if("object"!=typeof e.identifiers[n])throw TypeError(".ord.ProductCompound.identifiers: object expected");t.identifiers[n]=i.ord.CompoundIdentifier.fromObject(e.identifiers[n])}}if(null!=e.isDesiredProduct&&(t.isDesiredProduct=Boolean(e.isDesiredProduct)),e.measurements){if(!Array.isArray(e.measurements))throw TypeError(".ord.ProductCompound.measurements: array expected");t.measurements=[];for(let n=0;n<e.measurements.length;++n){if("object"!=typeof e.measurements[n])throw TypeError(".ord.ProductCompound.measurements: object expected");t.measurements[n]=i.ord.ProductMeasurement.fromObject(e.measurements[n])}}if(null!=e.isolatedColor&&(t.isolatedColor=String(e.isolatedColor)),null!=e.texture){if("object"!=typeof e.texture)throw TypeError(".ord.ProductCompound.texture: object expected");t.texture=i.ord.Texture.fromObject(e.texture)}if(e.features){if("object"!=typeof e.features)throw TypeError(".ord.ProductCompound.features: object expected");t.features={};for(let n=Object.keys(e.features),r=0;r<n.length;++r){if("object"!=typeof e.features[n[r]])throw TypeError(".ord.ProductCompound.features: object expected");t.features[n[r]]=i.ord.Data.fromObject(e.features[n[r]])}}switch(e.reactionRole){default:if("number"==typeof e.reactionRole){t.reactionRole=e.reactionRole;break}break;case"UNSPECIFIED":case 0:t.reactionRole=0;break;case"REACTANT":case 1:t.reactionRole=1;break;case"REAGENT":case 2:t.reactionRole=2;break;case"SOLVENT":case 3:t.reactionRole=3;break;case"CATALYST":case 4:t.reactionRole=4;break;case"WORKUP":case 5:t.reactionRole=5;break;case"INTERNAL_STANDARD":case 6:t.reactionRole=6;break;case"AUTHENTIC_STANDARD":case 7:t.reactionRole=7;break;case"PRODUCT":case 8:t.reactionRole=8;break;case"BYPRODUCT":case 9:t.reactionRole=9;break;case"SIDE_PRODUCT":case 10:t.reactionRole=10}return t},n.toObject=function(e,t){t||(t={});let n,r={};if((t.arrays||t.defaults)&&(r.identifiers=[],r.measurements=[]),(t.objects||t.defaults)&&(r.features={}),t.defaults&&(r.isolatedColor="",r.texture=null,r.reactionRole=t.enums===String?"UNSPECIFIED":0),e.identifiers&&e.identifiers.length){r.identifiers=[];for(let n=0;n<e.identifiers.length;++n)r.identifiers[n]=i.ord.CompoundIdentifier.toObject(e.identifiers[n],t)}if(null!=e.isDesiredProduct&&e.hasOwnProperty("isDesiredProduct")&&(r.isDesiredProduct=e.isDesiredProduct,t.oneofs&&(r._isDesiredProduct="isDesiredProduct")),e.measurements&&e.measurements.length){r.measurements=[];for(let n=0;n<e.measurements.length;++n)r.measurements[n]=i.ord.ProductMeasurement.toObject(e.measurements[n],t)}if(null!=e.isolatedColor&&e.hasOwnProperty("isolatedColor")&&(r.isolatedColor=e.isolatedColor),null!=e.texture&&e.hasOwnProperty("texture")&&(r.texture=i.ord.Texture.toObject(e.texture,t)),e.features&&(n=Object.keys(e.features)).length){r.features={};for(let o=0;o<n.length;++o)r.features[n[o]]=i.ord.Data.toObject(e.features[n[o]],t)}return null!=e.reactionRole&&e.hasOwnProperty("reactionRole")&&(r.reactionRole=t.enums===String?void 0===i.ord.ReactionRole.ReactionRoleType[e.reactionRole]?e.reactionRole:i.ord.ReactionRole.ReactionRoleType[e.reactionRole]:e.reactionRole),r},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ProductCompound"},n}(),n.ProductMeasurement=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.analysisKey="",n.prototype.type=0,n.prototype.details="",n.prototype.usesInternalStandard=null,n.prototype.isNormalized=null,n.prototype.usesAuthenticStandard=null,n.prototype.authenticStandard=null,n.prototype.percentage=null,n.prototype.floatValue=null,n.prototype.stringValue=null,n.prototype.amount=null,n.prototype.retentionTime=null,n.prototype.massSpecDetails=null,n.prototype.selectivity=null,n.prototype.wavelength=null,Object.defineProperty(n.prototype,"_usesInternalStandard",{get:o.oneOfGetter(s=["usesInternalStandard"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_isNormalized",{get:o.oneOfGetter(s=["isNormalized"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_usesAuthenticStandard",{get:o.oneOfGetter(s=["usesAuthenticStandard"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"value",{get:o.oneOfGetter(s=["percentage","floatValue","stringValue","amount"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.analysisKey&&Object.hasOwnProperty.call(e,"analysisKey")&&t.uint32(10).string(e.analysisKey),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(16).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(26).string(e.details),null!=e.usesInternalStandard&&Object.hasOwnProperty.call(e,"usesInternalStandard")&&t.uint32(32).bool(e.usesInternalStandard),null!=e.isNormalized&&Object.hasOwnProperty.call(e,"isNormalized")&&t.uint32(40).bool(e.isNormalized),null!=e.usesAuthenticStandard&&Object.hasOwnProperty.call(e,"usesAuthenticStandard")&&t.uint32(48).bool(e.usesAuthenticStandard),null!=e.authenticStandard&&Object.hasOwnProperty.call(e,"authenticStandard")&&i.ord.Compound.encode(e.authenticStandard,t.uint32(58).fork()).ldelim(),null!=e.percentage&&Object.hasOwnProperty.call(e,"percentage")&&i.ord.Percentage.encode(e.percentage,t.uint32(66).fork()).ldelim(),null!=e.floatValue&&Object.hasOwnProperty.call(e,"floatValue")&&i.ord.FloatValue.encode(e.floatValue,t.uint32(74).fork()).ldelim(),null!=e.stringValue&&Object.hasOwnProperty.call(e,"stringValue")&&t.uint32(82).string(e.stringValue),null!=e.amount&&Object.hasOwnProperty.call(e,"amount")&&i.ord.Amount.encode(e.amount,t.uint32(90).fork()).ldelim(),null!=e.retentionTime&&Object.hasOwnProperty.call(e,"retentionTime")&&i.ord.Time.encode(e.retentionTime,t.uint32(98).fork()).ldelim(),null!=e.massSpecDetails&&Object.hasOwnProperty.call(e,"massSpecDetails")&&i.ord.ProductMeasurement.MassSpecMeasurementDetails.encode(e.massSpecDetails,t.uint32(106).fork()).ldelim(),null!=e.selectivity&&Object.hasOwnProperty.call(e,"selectivity")&&i.ord.ProductMeasurement.Selectivity.encode(e.selectivity,t.uint32(114).fork()).ldelim(),null!=e.wavelength&&Object.hasOwnProperty.call(e,"wavelength")&&i.ord.Wavelength.encode(e.wavelength,t.uint32(122).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ProductMeasurement;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.analysisKey=e.string();break;case 2:o.type=e.int32();break;case 3:o.details=e.string();break;case 4:o.usesInternalStandard=e.bool();break;case 5:o.isNormalized=e.bool();break;case 6:o.usesAuthenticStandard=e.bool();break;case 7:o.authenticStandard=i.ord.Compound.decode(e,e.uint32());break;case 8:o.percentage=i.ord.Percentage.decode(e,e.uint32());break;case 9:o.floatValue=i.ord.FloatValue.decode(e,e.uint32());break;case 10:o.stringValue=e.string();break;case 11:o.amount=i.ord.Amount.decode(e,e.uint32());break;case 12:o.retentionTime=i.ord.Time.decode(e,e.uint32());break;case 13:o.massSpecDetails=i.ord.ProductMeasurement.MassSpecMeasurementDetails.decode(e,e.uint32());break;case 14:o.selectivity=i.ord.ProductMeasurement.Selectivity.decode(e,e.uint32());break;case 15:o.wavelength=i.ord.Wavelength.decode(e,e.uint32());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.analysisKey&&e.hasOwnProperty("analysisKey")&&!o.isString(e.analysisKey))return"analysisKey: string expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.usesInternalStandard&&e.hasOwnProperty("usesInternalStandard")&&(t._usesInternalStandard=1,"boolean"!=typeof e.usesInternalStandard))return"usesInternalStandard: boolean expected";if(null!=e.isNormalized&&e.hasOwnProperty("isNormalized")&&(t._isNormalized=1,"boolean"!=typeof e.isNormalized))return"isNormalized: boolean expected";if(null!=e.usesAuthenticStandard&&e.hasOwnProperty("usesAuthenticStandard")&&(t._usesAuthenticStandard=1,"boolean"!=typeof e.usesAuthenticStandard))return"usesAuthenticStandard: boolean expected";if(null!=e.authenticStandard&&e.hasOwnProperty("authenticStandard")){let t=i.ord.Compound.verify(e.authenticStandard);if(t)return"authenticStandard."+t}if(null!=e.percentage&&e.hasOwnProperty("percentage")){t.value=1;{let t=i.ord.Percentage.verify(e.percentage);if(t)return"percentage."+t}}if(null!=e.floatValue&&e.hasOwnProperty("floatValue")){if(1===t.value)return"value: multiple values";t.value=1;{let t=i.ord.FloatValue.verify(e.floatValue);if(t)return"floatValue."+t}}if(null!=e.stringValue&&e.hasOwnProperty("stringValue")){if(1===t.value)return"value: multiple values";if(t.value=1,!o.isString(e.stringValue))return"stringValue: string expected"}if(null!=e.amount&&e.hasOwnProperty("amount")){if(1===t.value)return"value: multiple values";t.value=1;{let t=i.ord.Amount.verify(e.amount);if(t)return"amount."+t}}if(null!=e.retentionTime&&e.hasOwnProperty("retentionTime")){let t=i.ord.Time.verify(e.retentionTime);if(t)return"retentionTime."+t}if(null!=e.massSpecDetails&&e.hasOwnProperty("massSpecDetails")){let t=i.ord.ProductMeasurement.MassSpecMeasurementDetails.verify(e.massSpecDetails);if(t)return"massSpecDetails."+t}if(null!=e.selectivity&&e.hasOwnProperty("selectivity")){let t=i.ord.ProductMeasurement.Selectivity.verify(e.selectivity);if(t)return"selectivity."+t}if(null!=e.wavelength&&e.hasOwnProperty("wavelength")){let t=i.ord.Wavelength.verify(e.wavelength);if(t)return"wavelength."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.ProductMeasurement)return e;let t=new i.ord.ProductMeasurement;switch(null!=e.analysisKey&&(t.analysisKey=String(e.analysisKey)),e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"IDENTITY":case 2:t.type=2;break;case"YIELD":case 3:t.type=3;break;case"SELECTIVITY":case 4:t.type=4;break;case"PURITY":case 5:t.type=5;break;case"AREA":case 6:t.type=6;break;case"COUNTS":case 7:t.type=7;break;case"INTENSITY":case 8:t.type=8;break;case"AMOUNT":case 9:t.type=9}if(null!=e.details&&(t.details=String(e.details)),null!=e.usesInternalStandard&&(t.usesInternalStandard=Boolean(e.usesInternalStandard)),null!=e.isNormalized&&(t.isNormalized=Boolean(e.isNormalized)),null!=e.usesAuthenticStandard&&(t.usesAuthenticStandard=Boolean(e.usesAuthenticStandard)),null!=e.authenticStandard){if("object"!=typeof e.authenticStandard)throw TypeError(".ord.ProductMeasurement.authenticStandard: object expected");t.authenticStandard=i.ord.Compound.fromObject(e.authenticStandard)}if(null!=e.percentage){if("object"!=typeof e.percentage)throw TypeError(".ord.ProductMeasurement.percentage: object expected");t.percentage=i.ord.Percentage.fromObject(e.percentage)}if(null!=e.floatValue){if("object"!=typeof e.floatValue)throw TypeError(".ord.ProductMeasurement.floatValue: object expected");t.floatValue=i.ord.FloatValue.fromObject(e.floatValue)}if(null!=e.stringValue&&(t.stringValue=String(e.stringValue)),null!=e.amount){if("object"!=typeof e.amount)throw TypeError(".ord.ProductMeasurement.amount: object expected");t.amount=i.ord.Amount.fromObject(e.amount)}if(null!=e.retentionTime){if("object"!=typeof e.retentionTime)throw TypeError(".ord.ProductMeasurement.retentionTime: object expected");t.retentionTime=i.ord.Time.fromObject(e.retentionTime)}if(null!=e.massSpecDetails){if("object"!=typeof e.massSpecDetails)throw TypeError(".ord.ProductMeasurement.massSpecDetails: object expected");t.massSpecDetails=i.ord.ProductMeasurement.MassSpecMeasurementDetails.fromObject(e.massSpecDetails)}if(null!=e.selectivity){if("object"!=typeof e.selectivity)throw TypeError(".ord.ProductMeasurement.selectivity: object expected");t.selectivity=i.ord.ProductMeasurement.Selectivity.fromObject(e.selectivity)}if(null!=e.wavelength){if("object"!=typeof e.wavelength)throw TypeError(".ord.ProductMeasurement.wavelength: object expected");t.wavelength=i.ord.Wavelength.fromObject(e.wavelength)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.analysisKey="",n.type=t.enums===String?"UNSPECIFIED":0,n.details="",n.authenticStandard=null,n.retentionTime=null,n.massSpecDetails=null,n.selectivity=null,n.wavelength=null),null!=e.analysisKey&&e.hasOwnProperty("analysisKey")&&(n.analysisKey=e.analysisKey),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ProductMeasurement.ProductMeasurementType[e.type]?e.type:i.ord.ProductMeasurement.ProductMeasurementType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.usesInternalStandard&&e.hasOwnProperty("usesInternalStandard")&&(n.usesInternalStandard=e.usesInternalStandard,t.oneofs&&(n._usesInternalStandard="usesInternalStandard")),null!=e.isNormalized&&e.hasOwnProperty("isNormalized")&&(n.isNormalized=e.isNormalized,t.oneofs&&(n._isNormalized="isNormalized")),null!=e.usesAuthenticStandard&&e.hasOwnProperty("usesAuthenticStandard")&&(n.usesAuthenticStandard=e.usesAuthenticStandard,t.oneofs&&(n._usesAuthenticStandard="usesAuthenticStandard")),null!=e.authenticStandard&&e.hasOwnProperty("authenticStandard")&&(n.authenticStandard=i.ord.Compound.toObject(e.authenticStandard,t)),null!=e.percentage&&e.hasOwnProperty("percentage")&&(n.percentage=i.ord.Percentage.toObject(e.percentage,t),t.oneofs&&(n.value="percentage")),null!=e.floatValue&&e.hasOwnProperty("floatValue")&&(n.floatValue=i.ord.FloatValue.toObject(e.floatValue,t),t.oneofs&&(n.value="floatValue")),null!=e.stringValue&&e.hasOwnProperty("stringValue")&&(n.stringValue=e.stringValue,t.oneofs&&(n.value="stringValue")),null!=e.amount&&e.hasOwnProperty("amount")&&(n.amount=i.ord.Amount.toObject(e.amount,t),t.oneofs&&(n.value="amount")),null!=e.retentionTime&&e.hasOwnProperty("retentionTime")&&(n.retentionTime=i.ord.Time.toObject(e.retentionTime,t)),null!=e.massSpecDetails&&e.hasOwnProperty("massSpecDetails")&&(n.massSpecDetails=i.ord.ProductMeasurement.MassSpecMeasurementDetails.toObject(e.massSpecDetails,t)),null!=e.selectivity&&e.hasOwnProperty("selectivity")&&(n.selectivity=i.ord.ProductMeasurement.Selectivity.toObject(e.selectivity,t)),null!=e.wavelength&&e.hasOwnProperty("wavelength")&&(n.wavelength=i.ord.Wavelength.toObject(e.wavelength,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ProductMeasurement"},n.ProductMeasurementType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="IDENTITY"]=2,t[e[3]="YIELD"]=3,t[e[4]="SELECTIVITY"]=4,t[e[5]="PURITY"]=5,t[e[6]="AREA"]=6,t[e[7]="COUNTS"]=7,t[e[8]="INTENSITY"]=8,t[e[9]="AMOUNT"]=9,t}(),n.MassSpecMeasurementDetails=function(){function n(e){if(this.eicMasses=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.type=0,n.prototype.details="",n.prototype.ticMinimumMz=null,n.prototype.ticMaximumMz=null,n.prototype.eicMasses=o.emptyArray,Object.defineProperty(n.prototype,"_ticMinimumMz",{get:o.oneOfGetter(s=["ticMinimumMz"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_ticMaximumMz",{get:o.oneOfGetter(s=["ticMaximumMz"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.ticMinimumMz&&Object.hasOwnProperty.call(e,"ticMinimumMz")&&t.uint32(29).float(e.ticMinimumMz),null!=e.ticMaximumMz&&Object.hasOwnProperty.call(e,"ticMaximumMz")&&t.uint32(37).float(e.ticMaximumMz),null!=e.eicMasses&&e.eicMasses.length){t.uint32(42).fork();for(let n=0;n<e.eicMasses.length;++n)t.float(e.eicMasses[n]);t.ldelim()}return t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ProductMeasurement.MassSpecMeasurementDetails;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;case 3:o.ticMinimumMz=e.float();break;case 4:o.ticMaximumMz=e.float();break;case 5:if(o.eicMasses&&o.eicMasses.length||(o.eicMasses=[]),2==(7&t)){let t=e.uint32()+e.pos;for(;e.pos<t;)o.eicMasses.push(e.float())}else o.eicMasses.push(e.float());break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.ticMinimumMz&&e.hasOwnProperty("ticMinimumMz")&&(t._ticMinimumMz=1,"number"!=typeof e.ticMinimumMz))return"ticMinimumMz: number expected";if(null!=e.ticMaximumMz&&e.hasOwnProperty("ticMaximumMz")&&(t._ticMaximumMz=1,"number"!=typeof e.ticMaximumMz))return"ticMaximumMz: number expected";if(null!=e.eicMasses&&e.hasOwnProperty("eicMasses")){if(!Array.isArray(e.eicMasses))return"eicMasses: array expected";for(let t=0;t<e.eicMasses.length;++t)if("number"!=typeof e.eicMasses[t])return"eicMasses: number[] expected"}return null},n.fromObject=function(e){if(e instanceof i.ord.ProductMeasurement.MassSpecMeasurementDetails)return e;let t=new i.ord.ProductMeasurement.MassSpecMeasurementDetails;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"TIC":case 2:t.type=2;break;case"TIC_POSITIVE":case 3:t.type=3;break;case"TIC_NEGATIVE":case 4:t.type=4;break;case"EIC":case 5:t.type=5}if(null!=e.details&&(t.details=String(e.details)),null!=e.ticMinimumMz&&(t.ticMinimumMz=Number(e.ticMinimumMz)),null!=e.ticMaximumMz&&(t.ticMaximumMz=Number(e.ticMaximumMz)),e.eicMasses){if(!Array.isArray(e.eicMasses))throw TypeError(".ord.ProductMeasurement.MassSpecMeasurementDetails.eicMasses: array expected");t.eicMasses=[];for(let n=0;n<e.eicMasses.length;++n)t.eicMasses[n]=Number(e.eicMasses[n])}return t},n.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.eicMasses=[]),t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ProductMeasurement.MassSpecMeasurementDetails.MassSpecMeasurementType[e.type]?e.type:i.ord.ProductMeasurement.MassSpecMeasurementDetails.MassSpecMeasurementType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),null!=e.ticMinimumMz&&e.hasOwnProperty("ticMinimumMz")&&(n.ticMinimumMz=t.json&&!isFinite(e.ticMinimumMz)?String(e.ticMinimumMz):e.ticMinimumMz,t.oneofs&&(n._ticMinimumMz="ticMinimumMz")),null!=e.ticMaximumMz&&e.hasOwnProperty("ticMaximumMz")&&(n.ticMaximumMz=t.json&&!isFinite(e.ticMaximumMz)?String(e.ticMaximumMz):e.ticMaximumMz,t.oneofs&&(n._ticMaximumMz="ticMaximumMz")),e.eicMasses&&e.eicMasses.length){n.eicMasses=[];for(let r=0;r<e.eicMasses.length;++r)n.eicMasses[r]=t.json&&!isFinite(e.eicMasses[r])?String(e.eicMasses[r]):e.eicMasses[r]}return n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ProductMeasurement.MassSpecMeasurementDetails"},n.MassSpecMeasurementType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="TIC"]=2,t[e[3]="TIC_POSITIVE"]=3,t[e[4]="TIC_NEGATIVE"]=4,t[e[5]="EIC"]=5,t}(),n}(),n.Selectivity=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.type=0,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.ProductMeasurement.Selectivity;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.type=e.int32();break;case 2:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.ProductMeasurement.Selectivity)return e;let t=new i.ord.ProductMeasurement.Selectivity;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"EE":case 2:t.type=2;break;case"ER":case 3:t.type=3;break;case"DR":case 4:t.type=4;break;case"EZ":case 5:t.type=5;break;case"ZE":case 6:t.type=6}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.type=t.enums===String?"UNSPECIFIED":0,n.details=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?void 0===i.ord.ProductMeasurement.Selectivity.SelectivityType[e.type]?e.type:i.ord.ProductMeasurement.Selectivity.SelectivityType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ProductMeasurement.Selectivity"},n.SelectivityType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="EE"]=2,t[e[3]="ER"]=3,t[e[4]="DR"]=4,t[e[5]="EZ"]=5,t[e[6]="ZE"]=6,t}(),n}(),n}(),n.DateTime=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.value="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(10).string(e.value),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.DateTime;for(;e.pos<r;){let t=e.uint32();t>>>3==1?o.value=e.string():e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.value&&e.hasOwnProperty("value")&&!o.isString(e.value)?"value: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.DateTime)return e;let t=new i.ord.DateTime;return null!=e.value&&(t.value=String(e.value)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.value=""),null!=e.value&&e.hasOwnProperty("value")&&(n.value=e.value),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.DateTime"},n}(),n.Analysis=function(){function n(e){if(this.data={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.type=0,n.prototype.details="",n.prototype.chmoId=0,n.prototype.isOfIsolatedSpecies=null,n.prototype.data=o.emptyObject,n.prototype.instrumentManufacturer="",n.prototype.instrumentLastCalibrated=null,Object.defineProperty(n.prototype,"_isOfIsolatedSpecies",{get:o.oneOfGetter(s=["isOfIsolatedSpecies"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(18).string(e.details),null!=e.chmoId&&Object.hasOwnProperty.call(e,"chmoId")&&t.uint32(24).int32(e.chmoId),null!=e.isOfIsolatedSpecies&&Object.hasOwnProperty.call(e,"isOfIsolatedSpecies")&&t.uint32(32).bool(e.isOfIsolatedSpecies),null!=e.data&&Object.hasOwnProperty.call(e,"data"))for(let n=Object.keys(e.data),r=0;r<n.length;++r)t.uint32(42).fork().uint32(10).string(n[r]),i.ord.Data.encode(e.data[n[r]],t.uint32(18).fork()).ldelim().ldelim();return null!=e.instrumentManufacturer&&Object.hasOwnProperty.call(e,"instrumentManufacturer")&&t.uint32(50).string(e.instrumentManufacturer),null!=e.instrumentLastCalibrated&&Object.hasOwnProperty.call(e,"instrumentLastCalibrated")&&i.ord.DateTime.encode(e.instrumentLastCalibrated,t.uint32(58).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r,s,a=void 0===n?e.len:e.pos+n,l=new i.ord.Analysis;for(;e.pos<a;){let t=e.uint32();switch(t>>>3){case 1:l.type=e.int32();break;case 2:l.details=e.string();break;case 3:l.chmoId=e.int32();break;case 4:l.isOfIsolatedSpecies=e.bool();break;case 5:{l.data===o.emptyObject&&(l.data={});let t=e.uint32()+e.pos;for(r="",s=null;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=i.ord.Data.decode(e,e.uint32());break;default:e.skipType(7&t)}}l.data[r]=s;break}case 6:l.instrumentManufacturer=e.string();break;case 7:l.instrumentLastCalibrated=i.ord.DateTime.decode(e,e.uint32());break;default:e.skipType(7&t)}}return l},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:}if(null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details))return"details: string expected";if(null!=e.chmoId&&e.hasOwnProperty("chmoId")&&!o.isInteger(e.chmoId))return"chmoId: integer expected";if(null!=e.isOfIsolatedSpecies&&e.hasOwnProperty("isOfIsolatedSpecies")&&"boolean"!=typeof e.isOfIsolatedSpecies)return"isOfIsolatedSpecies: boolean expected";if(null!=e.data&&e.hasOwnProperty("data")){if(!o.isObject(e.data))return"data: object expected";let t=Object.keys(e.data);for(let n=0;n<t.length;++n){let r=i.ord.Data.verify(e.data[t[n]]);if(r)return"data."+r}}if(null!=e.instrumentManufacturer&&e.hasOwnProperty("instrumentManufacturer")&&!o.isString(e.instrumentManufacturer))return"instrumentManufacturer: string expected";if(null!=e.instrumentLastCalibrated&&e.hasOwnProperty("instrumentLastCalibrated")){let t=i.ord.DateTime.verify(e.instrumentLastCalibrated);if(t)return"instrumentLastCalibrated."+t}return null},n.fromObject=function(e){if(e instanceof i.ord.Analysis)return e;let t=new i.ord.Analysis;switch(e.type){default:if("number"==typeof e.type){t.type=e.type;break}break;case"UNSPECIFIED":case 0:t.type=0;break;case"CUSTOM":case 1:t.type=1;break;case"LC":case 2:t.type=2;break;case"GC":case 3:t.type=3;break;case"IR":case 4:t.type=4;break;case"NMR_1H":case 5:t.type=5;break;case"NMR_13C":case 6:t.type=6;break;case"NMR_OTHER":case 7:t.type=7;break;case"MP":case 8:t.type=8;break;case"UV":case 9:t.type=9;break;case"TLC":case 10:t.type=10;break;case"MS":case 11:t.type=11;break;case"HRMS":case 12:t.type=12;break;case"MSMS":case 13:t.type=13;break;case"WEIGHT":case 14:t.type=14;break;case"LCMS":case 15:t.type=15;break;case"GCMS":case 16:t.type=16;break;case"ELSD":case 17:t.type=17;break;case"CD":case 18:t.type=18;break;case"SFC":case 19:t.type=19;break;case"EPR":case 20:t.type=20;break;case"XRD":case 21:t.type=21;break;case"RAMAN":case 22:t.type=22;break;case"ED":case 23:t.type=23;break;case"OPTICAL_ROTATION":case 24:t.type=24;break;case"CAD":case 25:t.type=25}if(null!=e.details&&(t.details=String(e.details)),null!=e.chmoId&&(t.chmoId=0|e.chmoId),null!=e.isOfIsolatedSpecies&&(t.isOfIsolatedSpecies=Boolean(e.isOfIsolatedSpecies)),e.data){if("object"!=typeof e.data)throw TypeError(".ord.Analysis.data: object expected");t.data={};for(let n=Object.keys(e.data),r=0;r<n.length;++r){if("object"!=typeof e.data[n[r]])throw TypeError(".ord.Analysis.data: object expected");t.data[n[r]]=i.ord.Data.fromObject(e.data[n[r]])}}if(null!=e.instrumentManufacturer&&(t.instrumentManufacturer=String(e.instrumentManufacturer)),null!=e.instrumentLastCalibrated){if("object"!=typeof e.instrumentLastCalibrated)throw TypeError(".ord.Analysis.instrumentLastCalibrated: object expected");t.instrumentLastCalibrated=i.ord.DateTime.fromObject(e.instrumentLastCalibrated)}return t},n.toObject=function(e,t){t||(t={});let n,r={};if((t.objects||t.defaults)&&(r.data={}),t.defaults&&(r.type=t.enums===String?"UNSPECIFIED":0,r.details="",r.chmoId=0,r.instrumentManufacturer="",r.instrumentLastCalibrated=null),null!=e.type&&e.hasOwnProperty("type")&&(r.type=t.enums===String?void 0===i.ord.Analysis.AnalysisType[e.type]?e.type:i.ord.Analysis.AnalysisType[e.type]:e.type),null!=e.details&&e.hasOwnProperty("details")&&(r.details=e.details),null!=e.chmoId&&e.hasOwnProperty("chmoId")&&(r.chmoId=e.chmoId),null!=e.isOfIsolatedSpecies&&e.hasOwnProperty("isOfIsolatedSpecies")&&(r.isOfIsolatedSpecies=e.isOfIsolatedSpecies,t.oneofs&&(r._isOfIsolatedSpecies="isOfIsolatedSpecies")),e.data&&(n=Object.keys(e.data)).length){r.data={};for(let o=0;o<n.length;++o)r.data[n[o]]=i.ord.Data.toObject(e.data[n[o]],t)}return null!=e.instrumentManufacturer&&e.hasOwnProperty("instrumentManufacturer")&&(r.instrumentManufacturer=e.instrumentManufacturer),null!=e.instrumentLastCalibrated&&e.hasOwnProperty("instrumentLastCalibrated")&&(r.instrumentLastCalibrated=i.ord.DateTime.toObject(e.instrumentLastCalibrated,t)),r},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Analysis"},n.AnalysisType=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CUSTOM"]=1,t[e[2]="LC"]=2,t[e[3]="GC"]=3,t[e[4]="IR"]=4,t[e[5]="NMR_1H"]=5,t[e[6]="NMR_13C"]=6,t[e[7]="NMR_OTHER"]=7,t[e[8]="MP"]=8,t[e[9]="UV"]=9,t[e[10]="TLC"]=10,t[e[11]="MS"]=11,t[e[12]="HRMS"]=12,t[e[13]="MSMS"]=13,t[e[14]="WEIGHT"]=14,t[e[15]="LCMS"]=15,t[e[16]="GCMS"]=16,t[e[17]="ELSD"]=17,t[e[18]="CD"]=18,t[e[19]="SFC"]=19,t[e[20]="EPR"]=20,t[e[21]="XRD"]=21,t[e[22]="RAMAN"]=22,t[e[23]="ED"]=23,t[e[24]="OPTICAL_ROTATION"]=24,t[e[25]="CAD"]=25,t}(),n}(),n.ReactionProvenance=function(){function n(e){if(this.recordModified=[],this.reactionMetadata={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.experimenter=null,n.prototype.city="",n.prototype.experimentStart=null,n.prototype.doi="",n.prototype.patent="",n.prototype.publicationUrl="",n.prototype.recordCreated=null,n.prototype.recordModified=o.emptyArray,n.prototype.reactionMetadata=o.emptyObject,n.prototype.isMined=null,Object.defineProperty(n.prototype,"_isMined",{get:o.oneOfGetter(s=["isMined"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.experimenter&&Object.hasOwnProperty.call(e,"experimenter")&&i.ord.Person.encode(e.experimenter,t.uint32(10).fork()).ldelim(),null!=e.city&&Object.hasOwnProperty.call(e,"city")&&t.uint32(18).string(e.city),null!=e.experimentStart&&Object.hasOwnProperty.call(e,"experimentStart")&&i.ord.DateTime.encode(e.experimentStart,t.uint32(26).fork()).ldelim(),null!=e.doi&&Object.hasOwnProperty.call(e,"doi")&&t.uint32(34).string(e.doi),null!=e.patent&&Object.hasOwnProperty.call(e,"patent")&&t.uint32(42).string(e.patent),null!=e.publicationUrl&&Object.hasOwnProperty.call(e,"publicationUrl")&&t.uint32(50).string(e.publicationUrl),null!=e.recordCreated&&Object.hasOwnProperty.call(e,"recordCreated")&&i.ord.RecordEvent.encode(e.recordCreated,t.uint32(58).fork()).ldelim(),null!=e.recordModified&&e.recordModified.length)for(let n=0;n<e.recordModified.length;++n)i.ord.RecordEvent.encode(e.recordModified[n],t.uint32(66).fork()).ldelim();if(null!=e.reactionMetadata&&Object.hasOwnProperty.call(e,"reactionMetadata"))for(let n=Object.keys(e.reactionMetadata),r=0;r<n.length;++r)t.uint32(74).fork().uint32(10).string(n[r]),i.ord.Data.encode(e.reactionMetadata[n[r]],t.uint32(18).fork()).ldelim().ldelim();return null!=e.isMined&&Object.hasOwnProperty.call(e,"isMined")&&t.uint32(80).bool(e.isMined),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r,s,a=void 0===n?e.len:e.pos+n,l=new i.ord.ReactionProvenance;for(;e.pos<a;){let t=e.uint32();switch(t>>>3){case 1:l.experimenter=i.ord.Person.decode(e,e.uint32());break;case 2:l.city=e.string();break;case 3:l.experimentStart=i.ord.DateTime.decode(e,e.uint32());break;case 4:l.doi=e.string();break;case 5:l.patent=e.string();break;case 6:l.publicationUrl=e.string();break;case 7:l.recordCreated=i.ord.RecordEvent.decode(e,e.uint32());break;case 8:l.recordModified&&l.recordModified.length||(l.recordModified=[]),l.recordModified.push(i.ord.RecordEvent.decode(e,e.uint32()));break;case 9:{l.reactionMetadata===o.emptyObject&&(l.reactionMetadata={});let t=e.uint32()+e.pos;for(r="",s=null;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=i.ord.Data.decode(e,e.uint32());break;default:e.skipType(7&t)}}l.reactionMetadata[r]=s;break}case 10:l.isMined=e.bool();break;default:e.skipType(7&t)}}return l},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.experimenter&&e.hasOwnProperty("experimenter")){let t=i.ord.Person.verify(e.experimenter);if(t)return"experimenter."+t}if(null!=e.city&&e.hasOwnProperty("city")&&!o.isString(e.city))return"city: string expected";if(null!=e.experimentStart&&e.hasOwnProperty("experimentStart")){let t=i.ord.DateTime.verify(e.experimentStart);if(t)return"experimentStart."+t}if(null!=e.doi&&e.hasOwnProperty("doi")&&!o.isString(e.doi))return"doi: string expected";if(null!=e.patent&&e.hasOwnProperty("patent")&&!o.isString(e.patent))return"patent: string expected";if(null!=e.publicationUrl&&e.hasOwnProperty("publicationUrl")&&!o.isString(e.publicationUrl))return"publicationUrl: string expected";if(null!=e.recordCreated&&e.hasOwnProperty("recordCreated")){let t=i.ord.RecordEvent.verify(e.recordCreated);if(t)return"recordCreated."+t}if(null!=e.recordModified&&e.hasOwnProperty("recordModified")){if(!Array.isArray(e.recordModified))return"recordModified: array expected";for(let t=0;t<e.recordModified.length;++t){let n=i.ord.RecordEvent.verify(e.recordModified[t]);if(n)return"recordModified."+n}}if(null!=e.reactionMetadata&&e.hasOwnProperty("reactionMetadata")){if(!o.isObject(e.reactionMetadata))return"reactionMetadata: object expected";let t=Object.keys(e.reactionMetadata);for(let n=0;n<t.length;++n){let r=i.ord.Data.verify(e.reactionMetadata[t[n]]);if(r)return"reactionMetadata."+r}}return null!=e.isMined&&e.hasOwnProperty("isMined")&&"boolean"!=typeof e.isMined?"isMined: boolean expected":null},n.fromObject=function(e){if(e instanceof i.ord.ReactionProvenance)return e;let t=new i.ord.ReactionProvenance;if(null!=e.experimenter){if("object"!=typeof e.experimenter)throw TypeError(".ord.ReactionProvenance.experimenter: object expected");t.experimenter=i.ord.Person.fromObject(e.experimenter)}if(null!=e.city&&(t.city=String(e.city)),null!=e.experimentStart){if("object"!=typeof e.experimentStart)throw TypeError(".ord.ReactionProvenance.experimentStart: object expected");t.experimentStart=i.ord.DateTime.fromObject(e.experimentStart)}if(null!=e.doi&&(t.doi=String(e.doi)),null!=e.patent&&(t.patent=String(e.patent)),null!=e.publicationUrl&&(t.publicationUrl=String(e.publicationUrl)),null!=e.recordCreated){if("object"!=typeof e.recordCreated)throw TypeError(".ord.ReactionProvenance.recordCreated: object expected");t.recordCreated=i.ord.RecordEvent.fromObject(e.recordCreated)}if(e.recordModified){if(!Array.isArray(e.recordModified))throw TypeError(".ord.ReactionProvenance.recordModified: array expected");t.recordModified=[];for(let n=0;n<e.recordModified.length;++n){if("object"!=typeof e.recordModified[n])throw TypeError(".ord.ReactionProvenance.recordModified: object expected");t.recordModified[n]=i.ord.RecordEvent.fromObject(e.recordModified[n])}}if(e.reactionMetadata){if("object"!=typeof e.reactionMetadata)throw TypeError(".ord.ReactionProvenance.reactionMetadata: object expected");t.reactionMetadata={};for(let n=Object.keys(e.reactionMetadata),r=0;r<n.length;++r){if("object"!=typeof e.reactionMetadata[n[r]])throw TypeError(".ord.ReactionProvenance.reactionMetadata: object expected");t.reactionMetadata[n[r]]=i.ord.Data.fromObject(e.reactionMetadata[n[r]])}}return null!=e.isMined&&(t.isMined=Boolean(e.isMined)),t},n.toObject=function(e,t){t||(t={});let n,r={};if((t.arrays||t.defaults)&&(r.recordModified=[]),(t.objects||t.defaults)&&(r.reactionMetadata={}),t.defaults&&(r.experimenter=null,r.city="",r.experimentStart=null,r.doi="",r.patent="",r.publicationUrl="",r.recordCreated=null),null!=e.experimenter&&e.hasOwnProperty("experimenter")&&(r.experimenter=i.ord.Person.toObject(e.experimenter,t)),null!=e.city&&e.hasOwnProperty("city")&&(r.city=e.city),null!=e.experimentStart&&e.hasOwnProperty("experimentStart")&&(r.experimentStart=i.ord.DateTime.toObject(e.experimentStart,t)),null!=e.doi&&e.hasOwnProperty("doi")&&(r.doi=e.doi),null!=e.patent&&e.hasOwnProperty("patent")&&(r.patent=e.patent),null!=e.publicationUrl&&e.hasOwnProperty("publicationUrl")&&(r.publicationUrl=e.publicationUrl),null!=e.recordCreated&&e.hasOwnProperty("recordCreated")&&(r.recordCreated=i.ord.RecordEvent.toObject(e.recordCreated,t)),e.recordModified&&e.recordModified.length){r.recordModified=[];for(let n=0;n<e.recordModified.length;++n)r.recordModified[n]=i.ord.RecordEvent.toObject(e.recordModified[n],t)}if(e.reactionMetadata&&(n=Object.keys(e.reactionMetadata)).length){r.reactionMetadata={};for(let o=0;o<n.length;++o)r.reactionMetadata[n[o]]=i.ord.Data.toObject(e.reactionMetadata[n[o]],t)}return null!=e.isMined&&e.hasOwnProperty("isMined")&&(r.isMined=e.isMined,t.oneofs&&(r._isMined="isMined")),r},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.ReactionProvenance"},n}(),n.Person=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.username="",n.prototype.name="",n.prototype.orcid="",n.prototype.organization="",n.prototype.email="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.username&&Object.hasOwnProperty.call(e,"username")&&t.uint32(10).string(e.username),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(18).string(e.name),null!=e.orcid&&Object.hasOwnProperty.call(e,"orcid")&&t.uint32(26).string(e.orcid),null!=e.organization&&Object.hasOwnProperty.call(e,"organization")&&t.uint32(34).string(e.organization),null!=e.email&&Object.hasOwnProperty.call(e,"email")&&t.uint32(42).string(e.email),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Person;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.username=e.string();break;case 2:o.name=e.string();break;case 3:o.orcid=e.string();break;case 4:o.organization=e.string();break;case 5:o.email=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.username&&e.hasOwnProperty("username")&&!o.isString(e.username)?"username: string expected":null!=e.name&&e.hasOwnProperty("name")&&!o.isString(e.name)?"name: string expected":null!=e.orcid&&e.hasOwnProperty("orcid")&&!o.isString(e.orcid)?"orcid: string expected":null!=e.organization&&e.hasOwnProperty("organization")&&!o.isString(e.organization)?"organization: string expected":null!=e.email&&e.hasOwnProperty("email")&&!o.isString(e.email)?"email: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.Person)return e;let t=new i.ord.Person;return null!=e.username&&(t.username=String(e.username)),null!=e.name&&(t.name=String(e.name)),null!=e.orcid&&(t.orcid=String(e.orcid)),null!=e.organization&&(t.organization=String(e.organization)),null!=e.email&&(t.email=String(e.email)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.username="",n.name="",n.orcid="",n.organization="",n.email=""),null!=e.username&&e.hasOwnProperty("username")&&(n.username=e.username),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.orcid&&e.hasOwnProperty("orcid")&&(n.orcid=e.orcid),null!=e.organization&&e.hasOwnProperty("organization")&&(n.organization=e.organization),null!=e.email&&e.hasOwnProperty("email")&&(n.email=e.email),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Person"},n}(),n.RecordEvent=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.time=null,n.prototype.person=null,n.prototype.details="",n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.time&&Object.hasOwnProperty.call(e,"time")&&i.ord.DateTime.encode(e.time,t.uint32(10).fork()).ldelim(),null!=e.person&&Object.hasOwnProperty.call(e,"person")&&i.ord.Person.encode(e.person,t.uint32(18).fork()).ldelim(),null!=e.details&&Object.hasOwnProperty.call(e,"details")&&t.uint32(26).string(e.details),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.RecordEvent;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.time=i.ord.DateTime.decode(e,e.uint32());break;case 2:o.person=i.ord.Person.decode(e,e.uint32());break;case 3:o.details=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.time&&e.hasOwnProperty("time")){let t=i.ord.DateTime.verify(e.time);if(t)return"time."+t}if(null!=e.person&&e.hasOwnProperty("person")){let t=i.ord.Person.verify(e.person);if(t)return"person."+t}return null!=e.details&&e.hasOwnProperty("details")&&!o.isString(e.details)?"details: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.RecordEvent)return e;let t=new i.ord.RecordEvent;if(null!=e.time){if("object"!=typeof e.time)throw TypeError(".ord.RecordEvent.time: object expected");t.time=i.ord.DateTime.fromObject(e.time)}if(null!=e.person){if("object"!=typeof e.person)throw TypeError(".ord.RecordEvent.person: object expected");t.person=i.ord.Person.fromObject(e.person)}return null!=e.details&&(t.details=String(e.details)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.time=null,n.person=null,n.details=""),null!=e.time&&e.hasOwnProperty("time")&&(n.time=i.ord.DateTime.toObject(e.time,t)),null!=e.person&&e.hasOwnProperty("person")&&(n.person=i.ord.Person.toObject(e.person,t)),null!=e.details&&e.hasOwnProperty("details")&&(n.details=e.details),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.RecordEvent"},n}(),n.Time=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Time;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 4:case 1:case 2:case 3:}return null},n.fromObject=function(e){if(e instanceof i.ord.Time)return e;let t=new i.ord.Time;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"DAY":case 4:t.units=4;break;case"HOUR":case 1:t.units=1;break;case"MINUTE":case 2:t.units=2;break;case"SECOND":case 3:t.units=3}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Time.TimeUnit[e.units]?e.units:i.ord.Time.TimeUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Time"},n.TimeUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[4]="DAY"]=4,t[e[1]="HOUR"]=1,t[e[2]="MINUTE"]=2,t[e[3]="SECOND"]=3,t}(),n}(),n.Mass=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Mass;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:case 3:case 4:}return null},n.fromObject=function(e){if(e instanceof i.ord.Mass)return e;let t=new i.ord.Mass;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"KILOGRAM":case 1:t.units=1;break;case"GRAM":case 2:t.units=2;break;case"MILLIGRAM":case 3:t.units=3;break;case"MICROGRAM":case 4:t.units=4}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Mass.MassUnit[e.units]?e.units:i.ord.Mass.MassUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Mass"},n.MassUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="KILOGRAM"]=1,t[e[2]="GRAM"]=2,t[e[3]="MILLIGRAM"]=3,t[e[4]="MICROGRAM"]=4,t}(),n}(),n.Moles=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Moles;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:case 3:case 4:}return null},n.fromObject=function(e){if(e instanceof i.ord.Moles)return e;let t=new i.ord.Moles;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"MOLE":case 1:t.units=1;break;case"MILLIMOLE":case 2:t.units=2;break;case"MICROMOLE":case 3:t.units=3;break;case"NANOMOLE":case 4:t.units=4}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Moles.MolesUnit[e.units]?e.units:i.ord.Moles.MolesUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Moles"},n.MolesUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="MOLE"]=1,t[e[2]="MILLIMOLE"]=2,t[e[3]="MICROMOLE"]=3,t[e[4]="NANOMOLE"]=4,t}(),n}(),n.Volume=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Volume;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:case 3:case 4:}return null},n.fromObject=function(e){if(e instanceof i.ord.Volume)return e;let t=new i.ord.Volume;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"LITER":case 1:t.units=1;break;case"MILLILITER":case 2:t.units=2;break;case"MICROLITER":case 3:t.units=3;break;case"NANOLITER":case 4:t.units=4}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Volume.VolumeUnit[e.units]?e.units:i.ord.Volume.VolumeUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Volume"},n.VolumeUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="LITER"]=1,t[e[2]="MILLILITER"]=2,t[e[3]="MICROLITER"]=3,t[e[4]="NANOLITER"]=4,t}(),n}(),n.Concentration=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Concentration;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:case 3:}return null},n.fromObject=function(e){if(e instanceof i.ord.Concentration)return e;let t=new i.ord.Concentration;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"MOLAR":case 1:t.units=1;break;case"MILLIMOLAR":case 2:t.units=2;break;case"MICROMOLAR":case 3:t.units=3}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Concentration.ConcentrationUnit[e.units]?e.units:i.ord.Concentration.ConcentrationUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Concentration"},n.ConcentrationUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="MOLAR"]=1,t[e[2]="MILLIMOLAR"]=2,t[e[3]="MICROMOLAR"]=3,t}(),n}(),n.Pressure=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Pressure;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:}return null},n.fromObject=function(e){if(e instanceof i.ord.Pressure)return e;let t=new i.ord.Pressure;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"BAR":case 1:t.units=1;break;case"ATMOSPHERE":case 2:t.units=2;break;case"PSI":case 3:t.units=3;break;case"KPSI":case 4:t.units=4;break;case"PASCAL":case 5:t.units=5;break;case"KILOPASCAL":case 6:t.units=6;break;case"TORR":case 7:t.units=7;break;case"MM_HG":case 8:t.units=8}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Pressure.PressureUnit[e.units]?e.units:i.ord.Pressure.PressureUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Pressure"},n.PressureUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="BAR"]=1,t[e[2]="ATMOSPHERE"]=2,t[e[3]="PSI"]=3,t[e[4]="KPSI"]=4,t[e[5]="PASCAL"]=5,t[e[6]="KILOPASCAL"]=6,t[e[7]="TORR"]=7,t[e[8]="MM_HG"]=8,t}(),n}(),n.Temperature=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Temperature;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:case 3:}return null},n.fromObject=function(e){if(e instanceof i.ord.Temperature)return e;let t=new i.ord.Temperature;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"CELSIUS":case 1:t.units=1;break;case"FAHRENHEIT":case 2:t.units=2;break;case"KELVIN":case 3:t.units=3}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Temperature.TemperatureUnit[e.units]?e.units:i.ord.Temperature.TemperatureUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Temperature"},n.TemperatureUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CELSIUS"]=1,t[e[2]="FAHRENHEIT"]=2,t[e[3]="KELVIN"]=3,t}(),n}(),n.Current=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Current;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:}return null},n.fromObject=function(e){if(e instanceof i.ord.Current)return e;let t=new i.ord.Current;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"AMPERE":case 1:t.units=1;break;case"MILLIAMPERE":case 2:t.units=2}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Current.CurrentUnit[e.units]?e.units:i.ord.Current.CurrentUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Current"},n.CurrentUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="AMPERE"]=1,t[e[2]="MILLIAMPERE"]=2,t}(),n}(),n.Voltage=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Voltage;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:}return null},n.fromObject=function(e){if(e instanceof i.ord.Voltage)return e;let t=new i.ord.Voltage;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"VOLT":case 1:t.units=1;break;case"MILLIVOLT":case 2:t.units=2}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Voltage.VoltageUnit[e.units]?e.units:i.ord.Voltage.VoltageUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Voltage"},n.VoltageUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="VOLT"]=1,t[e[2]="MILLIVOLT"]=2,t}(),n}(),n.Length=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Length;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:}return null},n.fromObject=function(e){if(e instanceof i.ord.Length)return e;let t=new i.ord.Length;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"CENTIMETER":case 1:t.units=1;break;case"MILLIMETER":case 2:t.units=2;break;case"METER":case 3:t.units=3;break;case"INCH":case 4:t.units=4;break;case"FOOT":case 5:t.units=5}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Length.LengthUnit[e.units]?e.units:i.ord.Length.LengthUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Length"},n.LengthUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="CENTIMETER"]=1,t[e[2]="MILLIMETER"]=2,t[e[3]="METER"]=3,t[e[4]="INCH"]=4,t[e[5]="FOOT"]=5,t}(),n}(),n.Wavelength=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Wavelength;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:}return null},n.fromObject=function(e){if(e instanceof i.ord.Wavelength)return e;let t=new i.ord.Wavelength;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"NANOMETER":case 1:t.units=1;break;case"WAVENUMBER":case 2:t.units=2}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.Wavelength.WavelengthUnit[e.units]?e.units:i.ord.Wavelength.WavelengthUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Wavelength"},n.WavelengthUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="NANOMETER"]=1,t[e[2]="WAVENUMBER"]=2,t}(),n}(),n.FlowRate=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,n.prototype.units=0,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),null!=e.units&&Object.hasOwnProperty.call(e,"units")&&t.uint32(24).int32(e.units),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.FlowRate;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;case 3:o.units=e.int32();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value))return"value: number expected";if(null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision))return"precision: number expected";if(null!=e.units&&e.hasOwnProperty("units"))switch(e.units){default:return"units: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:}return null},n.fromObject=function(e){if(e instanceof i.ord.FlowRate)return e;let t=new i.ord.FlowRate;switch(null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),e.units){default:if("number"==typeof e.units){t.units=e.units;break}break;case"UNSPECIFIED":case 0:t.units=0;break;case"MICROLITER_PER_MINUTE":case 1:t.units=1;break;case"MICROLITER_PER_SECOND":case 2:t.units=2;break;case"MILLILITER_PER_MINUTE":case 3:t.units=3;break;case"MILLILITER_PER_SECOND":case 4:t.units=4;break;case"MICROLITER_PER_HOUR":case 5:t.units=5}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.units=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),null!=e.units&&e.hasOwnProperty("units")&&(n.units=t.enums===String?void 0===i.ord.FlowRate.FlowRateUnit[e.units]?e.units:i.ord.FlowRate.FlowRateUnit[e.units]:e.units),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.FlowRate"},n.FlowRateUnit=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="MICROLITER_PER_MINUTE"]=1,t[e[2]="MICROLITER_PER_SECOND"]=2,t[e[3]="MILLILITER_PER_MINUTE"]=3,t[e[4]="MILLILITER_PER_SECOND"]=4,t[e[5]="MICROLITER_PER_HOUR"]=5,t}(),n}(),n.Percentage=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Percentage;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};return null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value)?"value: number expected":null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision)?"precision: number expected":null},n.fromObject=function(e){if(e instanceof i.ord.Percentage)return e;let t=new i.ord.Percentage;return null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),t},n.toObject=function(e,t){t||(t={});let n={};return null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Percentage"},n}(),n.FloatValue=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,n.prototype.precision=null,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_precision",{get:o.oneOfGetter(s=["precision"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.precision&&Object.hasOwnProperty.call(e,"precision")&&t.uint32(21).float(e.precision),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.FloatValue;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.value=e.float();break;case 2:o.precision=e.float();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};return null!=e.value&&e.hasOwnProperty("value")&&(t._value=1,"number"!=typeof e.value)?"value: number expected":null!=e.precision&&e.hasOwnProperty("precision")&&(t._precision=1,"number"!=typeof e.precision)?"precision: number expected":null},n.fromObject=function(e){if(e instanceof i.ord.FloatValue)return e;let t=new i.ord.FloatValue;return null!=e.value&&(t.value=Number(e.value)),null!=e.precision&&(t.precision=Number(e.precision)),t},n.toObject=function(e,t){t||(t={});let n={};return null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),null!=e.precision&&e.hasOwnProperty("precision")&&(n.precision=t.json&&!isFinite(e.precision)?String(e.precision):e.precision,t.oneofs&&(n._precision="precision")),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.FloatValue"},n}(),n.Data=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.floatValue=null,n.prototype.integerValue=null,n.prototype.bytesValue=null,n.prototype.stringValue=null,n.prototype.url=null,n.prototype.description="",n.prototype.format="",Object.defineProperty(n.prototype,"kind",{get:o.oneOfGetter(s=["floatValue","integerValue","bytesValue","stringValue","url"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.floatValue&&Object.hasOwnProperty.call(e,"floatValue")&&t.uint32(13).float(e.floatValue),null!=e.integerValue&&Object.hasOwnProperty.call(e,"integerValue")&&t.uint32(16).int32(e.integerValue),null!=e.bytesValue&&Object.hasOwnProperty.call(e,"bytesValue")&&t.uint32(26).bytes(e.bytesValue),null!=e.stringValue&&Object.hasOwnProperty.call(e,"stringValue")&&t.uint32(34).string(e.stringValue),null!=e.url&&Object.hasOwnProperty.call(e,"url")&&t.uint32(42).string(e.url),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(50).string(e.description),null!=e.format&&Object.hasOwnProperty.call(e,"format")&&t.uint32(58).string(e.format),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord.Data;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.floatValue=e.float();break;case 2:o.integerValue=e.int32();break;case 3:o.bytesValue=e.bytes();break;case 4:o.stringValue=e.string();break;case 5:o.url=e.string();break;case 6:o.description=e.string();break;case 7:o.format=e.string();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};if(null!=e.floatValue&&e.hasOwnProperty("floatValue")&&(t.kind=1,"number"!=typeof e.floatValue))return"floatValue: number expected";if(null!=e.integerValue&&e.hasOwnProperty("integerValue")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,!o.isInteger(e.integerValue))return"integerValue: integer expected"}if(null!=e.bytesValue&&e.hasOwnProperty("bytesValue")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,!(e.bytesValue&&"number"==typeof e.bytesValue.length||o.isString(e.bytesValue)))return"bytesValue: buffer expected"}if(null!=e.stringValue&&e.hasOwnProperty("stringValue")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,!o.isString(e.stringValue))return"stringValue: string expected"}if(null!=e.url&&e.hasOwnProperty("url")){if(1===t.kind)return"kind: multiple values";if(t.kind=1,!o.isString(e.url))return"url: string expected"}return null!=e.description&&e.hasOwnProperty("description")&&!o.isString(e.description)?"description: string expected":null!=e.format&&e.hasOwnProperty("format")&&!o.isString(e.format)?"format: string expected":null},n.fromObject=function(e){if(e instanceof i.ord.Data)return e;let t=new i.ord.Data;return null!=e.floatValue&&(t.floatValue=Number(e.floatValue)),null!=e.integerValue&&(t.integerValue=0|e.integerValue),null!=e.bytesValue&&("string"==typeof e.bytesValue?o.base64.decode(e.bytesValue,t.bytesValue=o.newBuffer(o.base64.length(e.bytesValue)),0):e.bytesValue.length>=0&&(t.bytesValue=e.bytesValue)),null!=e.stringValue&&(t.stringValue=String(e.stringValue)),null!=e.url&&(t.url=String(e.url)),null!=e.description&&(t.description=String(e.description)),null!=e.format&&(t.format=String(e.format)),t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.description="",n.format=""),null!=e.floatValue&&e.hasOwnProperty("floatValue")&&(n.floatValue=t.json&&!isFinite(e.floatValue)?String(e.floatValue):e.floatValue,t.oneofs&&(n.kind="floatValue")),null!=e.integerValue&&e.hasOwnProperty("integerValue")&&(n.integerValue=e.integerValue,t.oneofs&&(n.kind="integerValue")),null!=e.bytesValue&&e.hasOwnProperty("bytesValue")&&(n.bytesValue=t.bytes===String?o.base64.encode(e.bytesValue,0,e.bytesValue.length):t.bytes===Array?Array.prototype.slice.call(e.bytesValue):e.bytesValue,t.oneofs&&(n.kind="bytesValue")),null!=e.stringValue&&e.hasOwnProperty("stringValue")&&(n.stringValue=e.stringValue,t.oneofs&&(n.kind="stringValue")),null!=e.url&&e.hasOwnProperty("url")&&(n.url=e.url,t.oneofs&&(n.kind="url")),null!=e.description&&e.hasOwnProperty("description")&&(n.description=e.description),null!=e.format&&e.hasOwnProperty("format")&&(n.format=e.format),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord.Data"},n}(),n})(),i.ord_test=(()=>{const n={};return n.Scalar=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.int32Value=0,n.prototype.int64Value=o.Long?o.Long.fromBits(0,0,!1):0,n.prototype.floatValue=null,n.prototype.stringValue="",n.prototype.bytesValue=o.newBuffer([]),n.prototype.boolValue=null,Object.defineProperty(n.prototype,"_floatValue",{get:o.oneOfGetter(s=["floatValue"]),set:o.oneOfSetter(s)}),Object.defineProperty(n.prototype,"_boolValue",{get:o.oneOfGetter(s=["boolValue"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.int32Value&&Object.hasOwnProperty.call(e,"int32Value")&&t.uint32(8).int32(e.int32Value),null!=e.int64Value&&Object.hasOwnProperty.call(e,"int64Value")&&t.uint32(16).int64(e.int64Value),null!=e.floatValue&&Object.hasOwnProperty.call(e,"floatValue")&&t.uint32(29).float(e.floatValue),null!=e.stringValue&&Object.hasOwnProperty.call(e,"stringValue")&&t.uint32(34).string(e.stringValue),null!=e.bytesValue&&Object.hasOwnProperty.call(e,"bytesValue")&&t.uint32(42).bytes(e.bytesValue),null!=e.boolValue&&Object.hasOwnProperty.call(e,"boolValue")&&t.uint32(48).bool(e.boolValue),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord_test.Scalar;for(;e.pos<r;){let t=e.uint32();switch(t>>>3){case 1:o.int32Value=e.int32();break;case 2:o.int64Value=e.int64();break;case 3:o.floatValue=e.float();break;case 4:o.stringValue=e.string();break;case 5:o.bytesValue=e.bytes();break;case 6:o.boolValue=e.bool();break;default:e.skipType(7&t)}}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";let t={};return null!=e.int32Value&&e.hasOwnProperty("int32Value")&&!o.isInteger(e.int32Value)?"int32Value: integer expected":null!=e.int64Value&&e.hasOwnProperty("int64Value")&&!(o.isInteger(e.int64Value)||e.int64Value&&o.isInteger(e.int64Value.low)&&o.isInteger(e.int64Value.high))?"int64Value: integer|Long expected":null!=e.floatValue&&e.hasOwnProperty("floatValue")&&(t._floatValue=1,"number"!=typeof e.floatValue)?"floatValue: number expected":null!=e.stringValue&&e.hasOwnProperty("stringValue")&&!o.isString(e.stringValue)?"stringValue: string expected":null!=e.bytesValue&&e.hasOwnProperty("bytesValue")&&!(e.bytesValue&&"number"==typeof e.bytesValue.length||o.isString(e.bytesValue))?"bytesValue: buffer expected":null!=e.boolValue&&e.hasOwnProperty("boolValue")&&(t._boolValue=1,"boolean"!=typeof e.boolValue)?"boolValue: boolean expected":null},n.fromObject=function(e){if(e instanceof i.ord_test.Scalar)return e;let t=new i.ord_test.Scalar;return null!=e.int32Value&&(t.int32Value=0|e.int32Value),null!=e.int64Value&&(o.Long?(t.int64Value=o.Long.fromValue(e.int64Value)).unsigned=!1:"string"==typeof e.int64Value?t.int64Value=parseInt(e.int64Value,10):"number"==typeof e.int64Value?t.int64Value=e.int64Value:"object"==typeof e.int64Value&&(t.int64Value=new o.LongBits(e.int64Value.low>>>0,e.int64Value.high>>>0).toNumber())),null!=e.floatValue&&(t.floatValue=Number(e.floatValue)),null!=e.stringValue&&(t.stringValue=String(e.stringValue)),null!=e.bytesValue&&("string"==typeof e.bytesValue?o.base64.decode(e.bytesValue,t.bytesValue=o.newBuffer(o.base64.length(e.bytesValue)),0):e.bytesValue.length>=0&&(t.bytesValue=e.bytesValue)),null!=e.boolValue&&(t.boolValue=Boolean(e.boolValue)),t},n.toObject=function(e,t){t||(t={});let n={};if(t.defaults){if(n.int32Value=0,o.Long){let e=new o.Long(0,0,!1);n.int64Value=t.longs===String?e.toString():t.longs===Number?e.toNumber():e}else n.int64Value=t.longs===String?"0":0;n.stringValue="",t.bytes===String?n.bytesValue="":(n.bytesValue=[],t.bytes!==Array&&(n.bytesValue=o.newBuffer(n.bytesValue)))}return null!=e.int32Value&&e.hasOwnProperty("int32Value")&&(n.int32Value=e.int32Value),null!=e.int64Value&&e.hasOwnProperty("int64Value")&&("number"==typeof e.int64Value?n.int64Value=t.longs===String?String(e.int64Value):e.int64Value:n.int64Value=t.longs===String?o.Long.prototype.toString.call(e.int64Value):t.longs===Number?new o.LongBits(e.int64Value.low>>>0,e.int64Value.high>>>0).toNumber():e.int64Value),null!=e.floatValue&&e.hasOwnProperty("floatValue")&&(n.floatValue=t.json&&!isFinite(e.floatValue)?String(e.floatValue):e.floatValue,t.oneofs&&(n._floatValue="floatValue")),null!=e.stringValue&&e.hasOwnProperty("stringValue")&&(n.stringValue=e.stringValue),null!=e.bytesValue&&e.hasOwnProperty("bytesValue")&&(n.bytesValue=t.bytes===String?o.base64.encode(e.bytesValue,0,e.bytesValue.length):t.bytes===Array?Array.prototype.slice.call(e.bytesValue):e.bytesValue),null!=e.boolValue&&e.hasOwnProperty("boolValue")&&(n.boolValue=e.boolValue,t.oneofs&&(n._boolValue="boolValue")),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.Scalar"},n}(),n.RepeatedScalar=function(){function n(e){if(this.values=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.values=o.emptyArray,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.values&&e.values.length){t.uint32(10).fork();for(let n=0;n<e.values.length;++n)t.float(e.values[n]);t.ldelim()}return t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord_test.RepeatedScalar;for(;e.pos<r;){let t=e.uint32();if(t>>>3==1)if(o.values&&o.values.length||(o.values=[]),2==(7&t)){let t=e.uint32()+e.pos;for(;e.pos<t;)o.values.push(e.float())}else o.values.push(e.float());else e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.values&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(let t=0;t<e.values.length;++t)if("number"!=typeof e.values[t])return"values: number[] expected"}return null},n.fromObject=function(e){if(e instanceof i.ord_test.RepeatedScalar)return e;let t=new i.ord_test.RepeatedScalar;if(e.values){if(!Array.isArray(e.values))throw TypeError(".ord_test.RepeatedScalar.values: array expected");t.values=[];for(let n=0;n<e.values.length;++n)t.values[n]=Number(e.values[n])}return t},n.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.values=[]),e.values&&e.values.length){n.values=[];for(let r=0;r<e.values.length;++r)n.values[r]=t.json&&!isFinite(e.values[r])?String(e.values[r]):e.values[r]}return n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.RepeatedScalar"},n}(),n.Enum=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.value=0,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(8).int32(e.value),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord_test.Enum;for(;e.pos<r;){let t=e.uint32();t>>>3==1?o.value=e.int32():e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.value&&e.hasOwnProperty("value"))switch(e.value){default:return"value: enum value expected";case 0:case 1:case 2:}return null},n.fromObject=function(e){if(e instanceof i.ord_test.Enum)return e;let t=new i.ord_test.Enum;switch(e.value){default:if("number"==typeof e.value){t.value=e.value;break}break;case"UNSPECIFIED":case 0:t.value=0;break;case"FIRST":case 1:t.value=1;break;case"SECOND":case 2:t.value=2}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.value=t.enums===String?"UNSPECIFIED":0),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.enums===String?void 0===i.ord_test.Enum.EnumValues[e.value]?e.value:i.ord_test.Enum.EnumValues[e.value]:e.value),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.Enum"},n.EnumValues=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="FIRST"]=1,t[e[2]="SECOND"]=2,t}(),n}(),n.RepeatedEnum=function(){function n(e){if(this.values=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.values=o.emptyArray,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.values&&e.values.length){t.uint32(10).fork();for(let n=0;n<e.values.length;++n)t.int32(e.values[n]);t.ldelim()}return t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord_test.RepeatedEnum;for(;e.pos<r;){let t=e.uint32();if(t>>>3==1)if(o.values&&o.values.length||(o.values=[]),2==(7&t)){let t=e.uint32()+e.pos;for(;e.pos<t;)o.values.push(e.int32())}else o.values.push(e.int32());else e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.values&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(let t=0;t<e.values.length;++t)switch(e.values[t]){default:return"values: enum value[] expected";case 0:case 1:case 2:}}return null},n.fromObject=function(e){if(e instanceof i.ord_test.RepeatedEnum)return e;let t=new i.ord_test.RepeatedEnum;if(e.values){if(!Array.isArray(e.values))throw TypeError(".ord_test.RepeatedEnum.values: array expected");t.values=[];for(let n=0;n<e.values.length;++n)switch(e.values[n]){default:if("number"==typeof e.values[n]){t.values[n]=e.values[n];break}case"UNSPECIFIED":case 0:t.values[n]=0;break;case"FIRST":case 1:t.values[n]=1;break;case"SECOND":case 2:t.values[n]=2}}return t},n.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.values=[]),e.values&&e.values.length){n.values=[];for(let r=0;r<e.values.length;++r)n.values[r]=t.enums===String?void 0===i.ord_test.RepeatedEnum.EnumValues[e.values[r]]?e.values[r]:i.ord_test.RepeatedEnum.EnumValues[e.values[r]]:e.values[r]}return n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.RepeatedEnum"},n.EnumValues=function(){const e={},t=Object.create(e);return t[e[0]="UNSPECIFIED"]=0,t[e[1]="FIRST"]=1,t[e[2]="SECOND"]=2,t}(),n}(),n.Nested=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.child=null,n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.child&&Object.hasOwnProperty.call(e,"child")&&i.ord_test.Nested.Child.encode(e.child,t.uint32(10).fork()).ldelim(),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord_test.Nested;for(;e.pos<r;){let t=e.uint32();t>>>3==1?o.child=i.ord_test.Nested.Child.decode(e,e.uint32()):e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.child&&e.hasOwnProperty("child")){let t=i.ord_test.Nested.Child.verify(e.child);if(t)return"child."+t}return null},n.fromObject=function(e){if(e instanceof i.ord_test.Nested)return e;let t=new i.ord_test.Nested;if(null!=e.child){if("object"!=typeof e.child)throw TypeError(".ord_test.Nested.child: object expected");t.child=i.ord_test.Nested.Child.fromObject(e.child)}return t},n.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.child=null),null!=e.child&&e.hasOwnProperty("child")&&(n.child=i.ord_test.Nested.Child.toObject(e.child,t)),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.Nested"},n.Child=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord_test.Nested.Child;for(;e.pos<r;){let t=e.uint32();t>>>3==1?o.value=e.float():e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";return null!=e.value&&e.hasOwnProperty("value")&&"number"!=typeof e.value?"value: number expected":null},n.fromObject=function(e){if(e instanceof i.ord_test.Nested.Child)return e;let t=new i.ord_test.Nested.Child;return null!=e.value&&(t.value=Number(e.value)),t},n.toObject=function(e,t){t||(t={});let n={};return null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.Nested.Child"},n}(),n}(),n.RepeatedNested=function(){function n(e){if(this.children=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.children=o.emptyArray,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.children&&e.children.length)for(let n=0;n<e.children.length;++n)i.ord_test.RepeatedNested.Child.encode(e.children[n],t.uint32(10).fork()).ldelim();return t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord_test.RepeatedNested;for(;e.pos<r;){let t=e.uint32();t>>>3==1?(o.children&&o.children.length||(o.children=[]),o.children.push(i.ord_test.RepeatedNested.Child.decode(e,e.uint32()))):e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.children&&e.hasOwnProperty("children")){if(!Array.isArray(e.children))return"children: array expected";for(let t=0;t<e.children.length;++t){let n=i.ord_test.RepeatedNested.Child.verify(e.children[t]);if(n)return"children."+n}}return null},n.fromObject=function(e){if(e instanceof i.ord_test.RepeatedNested)return e;let t=new i.ord_test.RepeatedNested;if(e.children){if(!Array.isArray(e.children))throw TypeError(".ord_test.RepeatedNested.children: array expected");t.children=[];for(let n=0;n<e.children.length;++n){if("object"!=typeof e.children[n])throw TypeError(".ord_test.RepeatedNested.children: object expected");t.children[n]=i.ord_test.RepeatedNested.Child.fromObject(e.children[n])}}return t},n.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.children=[]),e.children&&e.children.length){n.children=[];for(let r=0;r<e.children.length;++r)n.children[r]=i.ord_test.RepeatedNested.Child.toObject(e.children[r],t)}return n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.RepeatedNested"},n.Child=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord_test.RepeatedNested.Child;for(;e.pos<r;){let t=e.uint32();t>>>3==1?o.value=e.float():e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";return null!=e.value&&e.hasOwnProperty("value")&&"number"!=typeof e.value?"value: number expected":null},n.fromObject=function(e){if(e instanceof i.ord_test.RepeatedNested.Child)return e;let t=new i.ord_test.RepeatedNested.Child;return null!=e.value&&(t.value=Number(e.value)),t},n.toObject=function(e,t){t||(t={});let n={};return null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.RepeatedNested.Child"},n}(),n}(),n.Map=function(){function n(e){if(this.values={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.values=o.emptyObject,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.values&&Object.hasOwnProperty.call(e,"values"))for(let n=Object.keys(e.values),r=0;r<n.length;++r)t.uint32(10).fork().uint32(10).string(n[r]).uint32(21).float(e.values[n[r]]).ldelim();return t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r,s,a=void 0===n?e.len:e.pos+n,l=new i.ord_test.Map;for(;e.pos<a;){let t=e.uint32();switch(t>>>3){case 1:{l.values===o.emptyObject&&(l.values={});let t=e.uint32()+e.pos;for(r="",s=0;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=e.float();break;default:e.skipType(7&t)}}l.values[r]=s;break}default:e.skipType(7&t)}}return l},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.values&&e.hasOwnProperty("values")){if(!o.isObject(e.values))return"values: object expected";let t=Object.keys(e.values);for(let n=0;n<t.length;++n)if("number"!=typeof e.values[t[n]])return"values: number{k:string} expected"}return null},n.fromObject=function(e){if(e instanceof i.ord_test.Map)return e;let t=new i.ord_test.Map;if(e.values){if("object"!=typeof e.values)throw TypeError(".ord_test.Map.values: object expected");t.values={};for(let n=Object.keys(e.values),r=0;r<n.length;++r)t.values[n[r]]=Number(e.values[n[r]])}return t},n.toObject=function(e,t){t||(t={});let n,r={};if((t.objects||t.defaults)&&(r.values={}),e.values&&(n=Object.keys(e.values)).length){r.values={};for(let o=0;o<n.length;++o)r.values[n[o]]=t.json&&!isFinite(e.values[n[o]])?String(e.values[n[o]]):e.values[n[o]]}return r},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.Map"},n}(),n.MapNested=function(){function n(e){if(this.children={},e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return n.prototype.children=o.emptyObject,n.create=function(e){return new n(e)},n.encode=function(e,t){if(t||(t=r.create()),null!=e.children&&Object.hasOwnProperty.call(e,"children"))for(let n=Object.keys(e.children),r=0;r<n.length;++r)t.uint32(10).fork().uint32(10).string(n[r]),i.ord_test.MapNested.Child.encode(e.children[n[r]],t.uint32(18).fork()).ldelim().ldelim();return t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r,s,a=void 0===n?e.len:e.pos+n,l=new i.ord_test.MapNested;for(;e.pos<a;){let t=e.uint32();switch(t>>>3){case 1:{l.children===o.emptyObject&&(l.children={});let t=e.uint32()+e.pos;for(r="",s=null;e.pos<t;){let t=e.uint32();switch(t>>>3){case 1:r=e.string();break;case 2:s=i.ord_test.MapNested.Child.decode(e,e.uint32());break;default:e.skipType(7&t)}}l.children[r]=s;break}default:e.skipType(7&t)}}return l},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.children&&e.hasOwnProperty("children")){if(!o.isObject(e.children))return"children: object expected";let t=Object.keys(e.children);for(let n=0;n<t.length;++n){let r=i.ord_test.MapNested.Child.verify(e.children[t[n]]);if(r)return"children."+r}}return null},n.fromObject=function(e){if(e instanceof i.ord_test.MapNested)return e;let t=new i.ord_test.MapNested;if(e.children){if("object"!=typeof e.children)throw TypeError(".ord_test.MapNested.children: object expected");t.children={};for(let n=Object.keys(e.children),r=0;r<n.length;++r){if("object"!=typeof e.children[n[r]])throw TypeError(".ord_test.MapNested.children: object expected");t.children[n[r]]=i.ord_test.MapNested.Child.fromObject(e.children[n[r]])}}return t},n.toObject=function(e,t){t||(t={});let n,r={};if((t.objects||t.defaults)&&(r.children={}),e.children&&(n=Object.keys(e.children)).length){r.children={};for(let o=0;o<n.length;++o)r.children[n[o]]=i.ord_test.MapNested.Child.toObject(e.children[n[o]],t)}return r},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.MapNested"},n.Child=function(){function n(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}let s;return n.prototype.value=null,Object.defineProperty(n.prototype,"_value",{get:o.oneOfGetter(s=["value"]),set:o.oneOfSetter(s)}),n.create=function(e){return new n(e)},n.encode=function(e,t){return t||(t=r.create()),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),t},n.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},n.decode=function(e,n){e instanceof t||(e=t.create(e));let r=void 0===n?e.len:e.pos+n,o=new i.ord_test.MapNested.Child;for(;e.pos<r;){let t=e.uint32();t>>>3==1?o.value=e.float():e.skipType(7&t)}return o},n.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},n.verify=function(e){if("object"!=typeof e||null===e)return"object expected";return null!=e.value&&e.hasOwnProperty("value")&&"number"!=typeof e.value?"value: number expected":null},n.fromObject=function(e){if(e instanceof i.ord_test.MapNested.Child)return e;let t=new i.ord_test.MapNested.Child;return null!=e.value&&(t.value=Number(e.value)),t},n.toObject=function(e,t){t||(t={});let n={};return null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs&&(n._value="value")),n},n.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},n.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/ord_test.MapNested.Child"},n}(),n}(),n})()})()})();