@viamrobotics/sdk 0.63.0 → 0.64.0
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.
package/dist/main.umd.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
(function(u,U){typeof exports=="object"&&typeof module<"u"?U(exports):typeof define=="function"&&define.amd?define(["exports"],U):(u=typeof globalThis<"u"?globalThis:u||self,U(u.sdk={}))})(this,function(u){"use strict";function U(t,e){if(!t)throw new Error(e)}const If=34028234663852886e22,Ef=-34028234663852886e22,Mf=4294967295,bf=2147483647,Of=-2147483648;function Yn(t){if(typeof t!="number")throw new Error("invalid int 32: "+typeof t);if(!Number.isInteger(t)||t>bf||t<Of)throw new Error("invalid int 32: "+t)}function Qa(t){if(typeof t!="number")throw new Error("invalid uint 32: "+typeof t);if(!Number.isInteger(t)||t>Mf||t<0)throw new Error("invalid uint 32: "+t)}function fi(t){if(typeof t!="number")throw new Error("invalid float 32: "+typeof t);if(Number.isFinite(t)&&(t>If||t<Ef))throw new Error("invalid float 32: "+t)}const Ri=Symbol("@bufbuild/protobuf/enum-type");function wf(t){const e=t[Ri];return U(e,"missing enum type on enum object"),e}function _i(t,e,n,a){t[Ri]=Si(e,n.map(o=>({no:o.no,name:o.name,localName:t[o.no]})))}function Si(t,e,n){const a=Object.create(null),o=Object.create(null),i=[];for(const r of e){const c=Ii(r);i.push(c),a[r.name]=c,o[r.no]=c}return{typeName:t,values:i,findName(r){return a[r]},findNumber(r){return o[r]}}}function Cf(t,e,n){const a={};for(const o of e){const i=Ii(o);a[i.localName]=i.no,a[i.no]=i.localName}return _i(a,t,e),a}function Ii(t){return"localName"in t?t:Object.assign(Object.assign({},t),{localName:t.name})}class O{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,n){const a=this.getType(),o=a.runtime.bin,i=o.makeReadOptions(n);return o.readMessage(this,i.readerFactory(e),e.byteLength,i),this}fromJson(e,n){const a=this.getType(),o=a.runtime.json,i=o.makeReadOptions(n);return o.readMessage(a,e,i,this),this}fromJsonString(e,n){let a;try{a=JSON.parse(e)}catch(o){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${o instanceof Error?o.message:String(o)}`)}return this.fromJson(a,n)}toBinary(e){const n=this.getType(),a=n.runtime.bin,o=a.makeWriteOptions(e),i=o.writerFactory();return a.writeMessage(this,i,o),i.finish()}toJson(e){const n=this.getType(),a=n.runtime.json,o=a.makeWriteOptions(e);return a.writeMessage(this,o)}toJsonString(e){var n;const a=this.toJson(e);return JSON.stringify(a,null,(n=e?.prettySpaces)!==null&&n!==void 0?n:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function Nf(t,e,n,a){var o;const i=(o=a?.localName)!==null&&o!==void 0?o:e.substring(e.lastIndexOf(".")+1),r={[i]:function(c){t.util.initFields(this),t.util.initPartial(c,this)}}[i];return Object.setPrototypeOf(r.prototype,new O),Object.assign(r,{runtime:t,typeName:e,fields:t.util.newFieldList(n),fromBinary(c,l){return new r().fromBinary(c,l)},fromJson(c,l){return new r().fromJson(c,l)},fromJsonString(c,l){return new r().fromJsonString(c,l)},equals(c,l){return t.util.equals(r,c,l)}}),r}function Pf(){let t=0,e=0;for(let a=0;a<28;a+=7){let o=this.buf[this.pos++];if(t|=(o&127)<<a,!(o&128))return this.assertBounds(),[t,e]}let n=this.buf[this.pos++];if(t|=(n&15)<<28,e=(n&112)>>4,!(n&128))return this.assertBounds(),[t,e];for(let a=3;a<=31;a+=7){let o=this.buf[this.pos++];if(e|=(o&127)<<a,!(o&128))return this.assertBounds(),[t,e]}throw new Error("invalid varint")}function Za(t,e,n){for(let i=0;i<28;i=i+7){const r=t>>>i,c=!(!(r>>>7)&&e==0),l=(c?r|128:r)&255;if(n.push(l),!c)return}const a=t>>>28&15|(e&7)<<4,o=!!(e>>3);if(n.push((o?a|128:a)&255),!!o){for(let i=3;i<31;i=i+7){const r=e>>>i,c=!!(r>>>7),l=(c?r|128:r)&255;if(n.push(l),!c)return}n.push(e>>>31&1)}}const Wn=4294967296;function Ei(t){const e=t[0]==="-";e&&(t=t.slice(1));const n=1e6;let a=0,o=0;function i(r,c){const l=Number(t.slice(r,c));o*=n,a=a*n+l,a>=Wn&&(o=o+(a/Wn|0),a=a%Wn)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),e?bi(a,o):et(a,o)}function Df(t,e){let n=et(t,e);const a=n.hi&2147483648;a&&(n=bi(n.lo,n.hi));const o=Mi(n.lo,n.hi);return a?"-"+o:o}function Mi(t,e){if({lo:t,hi:e}=Af(t,e),e<=2097151)return String(Wn*e+t);const n=t&16777215,a=(t>>>24|e<<8)&16777215,o=e>>16&65535;let i=n+a*6777216+o*6710656,r=a+o*8147497,c=o*2;const l=1e7;return i>=l&&(r+=Math.floor(i/l),i%=l),r>=l&&(c+=Math.floor(r/l),r%=l),c.toString()+Oi(r)+Oi(i)}function Af(t,e){return{lo:t>>>0,hi:e>>>0}}function et(t,e){return{lo:t|0,hi:e|0}}function bi(t,e){return e=~e,t?t=~t+1:e+=1,et(t,e)}const Oi=t=>{const e=String(t);return"0000000".slice(e.length)+e};function wi(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let n=0;n<9;n++)e.push(t&127|128),t=t>>7;e.push(1)}}function Uf(){let t=this.buf[this.pos++],e=t&127;if(!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,!(t&128))return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let n=5;t&128&&n<10;n++)t=this.buf[this.pos++];if(t&128)throw new Error("invalid varint");return this.assertBounds(),e>>>0}function qf(){const t=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"&&(typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){const o=BigInt("-9223372036854775808"),i=BigInt("9223372036854775807"),r=BigInt("0"),c=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(l){const d=typeof l=="bigint"?l:BigInt(l);if(d>i||d<o)throw new Error(`int64 invalid: ${l}`);return d},uParse(l){const d=typeof l=="bigint"?l:BigInt(l);if(d>c||d<r)throw new Error(`uint64 invalid: ${l}`);return d},enc(l){return t.setBigInt64(0,this.parse(l),!0),{lo:t.getInt32(0,!0),hi:t.getInt32(4,!0)}},uEnc(l){return t.setBigInt64(0,this.uParse(l),!0),{lo:t.getInt32(0,!0),hi:t.getInt32(4,!0)}},dec(l,d){return t.setInt32(0,l,!0),t.setInt32(4,d,!0),t.getBigInt64(0,!0)},uDec(l,d){return t.setInt32(0,l,!0),t.setInt32(4,d,!0),t.getBigUint64(0,!0)}}}const n=o=>U(/^-?[0-9]+$/.test(o),`int64 invalid: ${o}`),a=o=>U(/^[0-9]+$/.test(o),`uint64 invalid: ${o}`);return{zero:"0",supported:!1,parse(o){return typeof o!="string"&&(o=o.toString()),n(o),o},uParse(o){return typeof o!="string"&&(o=o.toString()),a(o),o},enc(o){return typeof o!="string"&&(o=o.toString()),n(o),Ei(o)},uEnc(o){return typeof o!="string"&&(o=o.toString()),a(o),Ei(o)},dec(o,i){return Df(o,i)},uDec(o,i){return Mi(o,i)}}}const V=qf();var _;(function(t){t[t.DOUBLE=1]="DOUBLE",t[t.FLOAT=2]="FLOAT",t[t.INT64=3]="INT64",t[t.UINT64=4]="UINT64",t[t.INT32=5]="INT32",t[t.FIXED64=6]="FIXED64",t[t.FIXED32=7]="FIXED32",t[t.BOOL=8]="BOOL",t[t.STRING=9]="STRING",t[t.BYTES=12]="BYTES",t[t.UINT32=13]="UINT32",t[t.SFIXED32=15]="SFIXED32",t[t.SFIXED64=16]="SFIXED64",t[t.SINT32=17]="SINT32",t[t.SINT64=18]="SINT64"})(_||(_={}));var Be;(function(t){t[t.BIGINT=0]="BIGINT",t[t.STRING=1]="STRING"})(Be||(Be={}));function Fe(t,e,n){if(e===n)return!0;if(t==_.BYTES){if(!(e instanceof Uint8Array)||!(n instanceof Uint8Array)||e.length!==n.length)return!1;for(let a=0;a<e.length;a++)if(e[a]!==n[a])return!1;return!0}switch(t){case _.UINT64:case _.FIXED64:case _.INT64:case _.SFIXED64:case _.SINT64:return e==n}return!1}function rn(t,e){switch(t){case _.BOOL:return!1;case _.UINT64:case _.FIXED64:case _.INT64:case _.SFIXED64:case _.SINT64:return e==0?V.zero:"0";case _.DOUBLE:case _.FLOAT:return 0;case _.BYTES:return new Uint8Array(0);case _.STRING:return"";default:return 0}}function Ci(t,e){switch(t){case _.BOOL:return e===!1;case _.STRING:return e==="";case _.BYTES:return e instanceof Uint8Array&&!e.byteLength;default:return e==0}}var G;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(G||(G={}));class Lf{constructor(e){this.stack=[],this.textEncoder=e??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let o=0;o<this.chunks.length;o++)e+=this.chunks[o].length;let n=new Uint8Array(e),a=0;for(let o=0;o<this.chunks.length;o++)n.set(this.chunks[o],a),a+=this.chunks[o].length;return this.chunks=[],n}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),n=this.stack.pop();if(!n)throw new Error("invalid state, fork stack empty");return this.chunks=n.chunks,this.buf=n.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,n){return this.uint32((e<<3|n)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(Qa(e);e>127;)this.buf.push(e&127|128),e=e>>>7;return this.buf.push(e),this}int32(e){return Yn(e),wi(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let n=this.textEncoder.encode(e);return this.uint32(n.byteLength),this.raw(n)}float(e){fi(e);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,e,!0),this.raw(n)}double(e){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,e,!0),this.raw(n)}fixed32(e){Qa(e);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,e,!0),this.raw(n)}sfixed32(e){Yn(e);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,e,!0),this.raw(n)}sint32(e){return Yn(e),e=(e<<1^e>>31)>>>0,wi(e,this.buf),this}sfixed64(e){let n=new Uint8Array(8),a=new DataView(n.buffer),o=V.enc(e);return a.setInt32(0,o.lo,!0),a.setInt32(4,o.hi,!0),this.raw(n)}fixed64(e){let n=new Uint8Array(8),a=new DataView(n.buffer),o=V.uEnc(e);return a.setInt32(0,o.lo,!0),a.setInt32(4,o.hi,!0),this.raw(n)}int64(e){let n=V.enc(e);return Za(n.lo,n.hi,this.buf),this}sint64(e){let n=V.enc(e),a=n.hi>>31,o=n.lo<<1^a,i=(n.hi<<1|n.lo>>>31)^a;return Za(o,i,this.buf),this}uint64(e){let n=V.uEnc(e);return Za(n.lo,n.hi,this.buf),this}}class Ni{constructor(e,n){this.varint64=Pf,this.uint32=Uf,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=n??new TextDecoder}tag(){let e=this.uint32(),n=e>>>3,a=e&7;if(n<=0||a<0||a>5)throw new Error("illegal tag: field no "+n+" wire type "+a);return[n,a]}skip(e,n){let a=this.pos;switch(e){case G.Varint:for(;this.buf[this.pos++]&128;);break;case G.Bit64:this.pos+=4;case G.Bit32:this.pos+=4;break;case G.LengthDelimited:let o=this.uint32();this.pos+=o;break;case G.StartGroup:for(;;){const[i,r]=this.tag();if(r===G.EndGroup){if(n!==void 0&&i!==n)throw new Error("invalid end group tag");break}this.skip(r,i)}break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(a,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return V.dec(...this.varint64())}uint64(){return V.uDec(...this.varint64())}sint64(){let[e,n]=this.varint64(),a=-(e&1);return e=(e>>>1|(n&1)<<31)^a,n=n>>>1^a,V.dec(e,n)}bool(){let[e,n]=this.varint64();return e!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return V.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return V.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),n=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(n,n+e)}string(){return this.textDecoder.decode(this.bytes())}}function Gf(t,e,n,a){let o;return{typeName:e,extendee:n,get field(){if(!o){const i=typeof a=="function"?a():a;i.name=e.split(".").pop(),i.jsonName=`[${e}]`,o=t.util.newFieldList([i]).list()[0]}return o},runtime:t}}function Pi(t){const e=t.field.localName,n=Object.create(null);return n[e]=Bf(t),[n,()=>n[e]]}function Bf(t){const e=t.field;if(e.repeated)return[];if(e.default!==void 0)return e.default;switch(e.kind){case"enum":return e.T.values[0].no;case"scalar":return rn(e.T,e.L);case"message":const n=e.T,a=new n;return n.fieldWrapper?n.fieldWrapper.unwrapField(a):a;case"map":throw"map fields are not allowed to be extensions"}}function Ff(t,e){if(!e.repeated&&(e.kind=="enum"||e.kind=="scalar")){for(let n=t.length-1;n>=0;--n)if(t[n].no==e.no)return[t[n]];return[]}return t.filter(n=>n.no===e.no)}let le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),jn=[];for(let t=0;t<le.length;t++)jn[le[t].charCodeAt(0)]=t;jn[45]=le.indexOf("+"),jn[95]=le.indexOf("/");const nt={dec(t){let e=t.length*3/4;t[t.length-2]=="="?e-=2:t[t.length-1]=="="&&(e-=1);let n=new Uint8Array(e),a=0,o=0,i,r=0;for(let c=0;c<t.length;c++){if(i=jn[t.charCodeAt(c)],i===void 0)switch(t[c]){case"=":o=0;case`
|
|
2
2
|
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(o){case 0:r=i,o=1;break;case 1:n[a++]=r<<2|(i&48)>>4,r=i,o=2;break;case 2:n[a++]=(r&15)<<4|(i&60)>>2,r=i,o=3;break;case 3:n[a++]=(r&3)<<6|i,o=0;break}}if(o==1)throw Error("invalid base64 string.");return n.subarray(0,a)},enc(t){let e="",n=0,a,o=0;for(let i=0;i<t.length;i++)switch(a=t[i],n){case 0:e+=le[a>>2],o=(a&3)<<4,n=1;break;case 1:e+=le[o|a>>4],o=(a&15)<<2,n=2;break;case 2:e+=le[o|a>>6],e+=le[a&63],n=0;break}return n&&(e+=le[o],e+="=",n==1&&(e+="=")),e}};function xf(t,e,n){Ai(e,t);const a=e.runtime.bin.makeReadOptions(n),o=Ff(t.getType().runtime.bin.listUnknownFields(t),e.field),[i,r]=Pi(e);for(const c of o)e.runtime.bin.readField(i,a.readerFactory(c.data),e.field,c.wireType,a);return r()}function Jf(t,e,n,a){Ai(e,t);const o=e.runtime.bin.makeReadOptions(a),i=e.runtime.bin.makeWriteOptions(a);if(Di(t,e)){const d=t.getType().runtime.bin.listUnknownFields(t).filter(g=>g.no!=e.field.no);t.getType().runtime.bin.discardUnknownFields(t);for(const g of d)t.getType().runtime.bin.onUnknownField(t,g.no,g.wireType,g.data)}const r=i.writerFactory();let c=e.field;!c.opt&&!c.repeated&&(c.kind=="enum"||c.kind=="scalar")&&(c=Object.assign(Object.assign({},e.field),{opt:!0})),e.runtime.bin.writeField(c,n,r,i);const l=o.readerFactory(r.finish());for(;l.pos<l.len;){const[d,g]=l.tag(),f=l.skip(g,d);t.getType().runtime.bin.onUnknownField(t,d,g,f)}}function Di(t,e){const n=t.getType();return e.extendee.typeName===n.typeName&&!!n.runtime.bin.listUnknownFields(t).find(a=>a.no==e.field.no)}function Ai(t,e){U(t.extendee.typeName==e.getType().typeName,`extension ${t.typeName} can only be applied to message ${t.extendee.typeName}`)}function Ui(t,e){const n=t.localName;if(t.repeated)return e[n].length>0;if(t.oneof)return e[t.oneof.localName].case===n;switch(t.kind){case"enum":case"scalar":return t.opt||t.req?e[n]!==void 0:t.kind=="enum"?e[n]!==t.T.values[0].no:!Ci(t.T,e[n]);case"message":return e[n]!==void 0;case"map":return Object.keys(e[n]).length>0}}function qi(t,e){const n=t.localName,a=!t.opt&&!t.req;if(t.repeated)e[n]=[];else if(t.oneof)e[t.oneof.localName]={case:void 0};else switch(t.kind){case"map":e[n]={};break;case"enum":e[n]=a?t.T.values[0].no:void 0;break;case"scalar":e[n]=a?rn(t.T,t.L):void 0;break;case"message":e[n]=void 0;break}}function Ke(t,e){if(t===null||typeof t!="object"||!Object.getOwnPropertyNames(O.prototype).every(a=>a in t&&typeof t[a]=="function"))return!1;const n=t.getType();return n===null||typeof n!="function"||!("typeName"in n)||typeof n.typeName!="string"?!1:e===void 0?!0:n.typeName==e.typeName}function Li(t,e){return Ke(e)||!t.fieldWrapper?e:t.fieldWrapper.wrapField(e)}_.DOUBLE,_.FLOAT,_.INT64,_.UINT64,_.INT32,_.UINT32,_.BOOL,_.STRING,_.BYTES;const Gi={ignoreUnknownFields:!1},Bi={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function zf(t){return t?Object.assign(Object.assign({},Gi),t):Gi}function Vf(t){return t?Object.assign(Object.assign({},Bi),t):Bi}const Hn=Symbol(),Kn=Symbol();function $f(){return{makeReadOptions:zf,makeWriteOptions:Vf,readMessage(t,e,n,a){if(e==null||Array.isArray(e)||typeof e!="object")throw new Error(`cannot decode message ${t.typeName} from JSON: ${ae(e)}`);a=a??new t;const o=new Map,i=n.typeRegistry;for(const[r,c]of Object.entries(e)){const l=t.fields.findJsonName(r);if(l){if(l.oneof){if(c===null&&l.kind=="scalar")continue;const d=o.get(l.oneof);if(d!==void 0)throw new Error(`cannot decode message ${t.typeName} from JSON: multiple keys for oneof "${l.oneof.name}" present: "${d}", "${r}"`);o.set(l.oneof,r)}Fi(a,c,l,n,t)}else{let d=!1;if(i?.findExtension&&r.startsWith("[")&&r.endsWith("]")){const g=i.findExtension(r.substring(1,r.length-1));if(g&&g.extendee.typeName==t.typeName){d=!0;const[f,I]=Pi(g);Fi(f,c,g.field,n,g),Jf(a,g,I(),n)}}if(!d&&!n.ignoreUnknownFields)throw new Error(`cannot decode message ${t.typeName} from JSON: key "${r}" is unknown`)}}return a},writeMessage(t,e){const n=t.getType(),a={};let o;try{for(o of n.fields.byNumber()){if(!Ui(o,t)){if(o.req)throw"required field not set";if(!e.emitDefaultValues||!Wf(o))continue}const r=o.oneof?t[o.oneof.localName].value:t[o.localName],c=xi(o,r,e);c!==void 0&&(a[e.useProtoFieldName?o.name:o.jsonName]=c)}const i=e.typeRegistry;if(i?.findExtensionFor)for(const r of n.runtime.bin.listUnknownFields(t)){const c=i.findExtensionFor(n.typeName,r.no);if(c&&Di(t,c)){const l=xf(t,c,e),d=xi(c.field,l,e);d!==void 0&&(a[c.field.jsonName]=d)}}}catch(i){const r=o?`cannot encode field ${n.typeName}.${o.name} to JSON`:`cannot encode message ${n.typeName} to JSON`,c=i instanceof Error?i.message:String(i);throw new Error(r+(c.length>0?`: ${c}`:""))}return a},readScalar(t,e,n){return hn(t,e,n??Be.BIGINT,!0)},writeScalar(t,e,n){if(e!==void 0&&(n||Ci(t,e)))return Xn(t,e)},debug:ae}}function ae(t){if(t===null)return"null";switch(typeof t){case"object":return Array.isArray(t)?"array":"object";case"string":return t.length>100?"string":`"${t.split('"').join('\\"')}"`;default:return String(t)}}function Fi(t,e,n,a,o){let i=n.localName;if(n.repeated){if(U(n.kind!="map"),e===null)return;if(!Array.isArray(e))throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: ${ae(e)}`);const r=t[i];for(const c of e){if(c===null)throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: ${ae(c)}`);switch(n.kind){case"message":r.push(n.T.fromJson(c,a));break;case"enum":const l=at(n.T,c,a.ignoreUnknownFields,!0);l!==Kn&&r.push(l);break;case"scalar":try{r.push(hn(n.T,c,n.L,!0))}catch(d){let g=`cannot decode field ${o.typeName}.${n.name} from JSON: ${ae(c)}`;throw d instanceof Error&&d.message.length>0&&(g+=`: ${d.message}`),new Error(g)}break}}}else if(n.kind=="map"){if(e===null)return;if(typeof e!="object"||Array.isArray(e))throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: ${ae(e)}`);const r=t[i];for(const[c,l]of Object.entries(e)){if(l===null)throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: map value null`);let d;try{d=Yf(n.K,c)}catch(g){let f=`cannot decode map key for field ${o.typeName}.${n.name} from JSON: ${ae(e)}`;throw g instanceof Error&&g.message.length>0&&(f+=`: ${g.message}`),new Error(f)}switch(n.V.kind){case"message":r[d]=n.V.T.fromJson(l,a);break;case"enum":const g=at(n.V.T,l,a.ignoreUnknownFields,!0);g!==Kn&&(r[d]=g);break;case"scalar":try{r[d]=hn(n.V.T,l,Be.BIGINT,!0)}catch(f){let I=`cannot decode map value for field ${o.typeName}.${n.name} from JSON: ${ae(e)}`;throw f instanceof Error&&f.message.length>0&&(I+=`: ${f.message}`),new Error(I)}break}}}else switch(n.oneof&&(t=t[n.oneof.localName]={case:i},i="value"),n.kind){case"message":const r=n.T;if(e===null&&r.typeName!="google.protobuf.Value")return;let c=t[i];Ke(c)?c.fromJson(e,a):(t[i]=c=r.fromJson(e,a),r.fieldWrapper&&!n.oneof&&(t[i]=r.fieldWrapper.unwrapField(c)));break;case"enum":const l=at(n.T,e,a.ignoreUnknownFields,!1);switch(l){case Hn:qi(n,t);break;case Kn:break;default:t[i]=l;break}break;case"scalar":try{const d=hn(n.T,e,n.L,!1);switch(d){case Hn:qi(n,t);break;default:t[i]=d;break}}catch(d){let g=`cannot decode field ${o.typeName}.${n.name} from JSON: ${ae(e)}`;throw d instanceof Error&&d.message.length>0&&(g+=`: ${d.message}`),new Error(g)}break}}function Yf(t,e){if(t===_.BOOL)switch(e){case"true":e=!0;break;case"false":e=!1;break}return hn(t,e,Be.BIGINT,!0).toString()}function hn(t,e,n,a){if(e===null)return a?rn(t,n):Hn;switch(t){case _.DOUBLE:case _.FLOAT:if(e==="NaN")return Number.NaN;if(e==="Infinity")return Number.POSITIVE_INFINITY;if(e==="-Infinity")return Number.NEGATIVE_INFINITY;if(e===""||typeof e=="string"&&e.trim().length!==e.length||typeof e!="string"&&typeof e!="number")break;const o=Number(e);if(Number.isNaN(o)||!Number.isFinite(o))break;return t==_.FLOAT&&fi(o),o;case _.INT32:case _.FIXED32:case _.SFIXED32:case _.SINT32:case _.UINT32:let i;if(typeof e=="number"?i=e:typeof e=="string"&&e.length>0&&e.trim().length===e.length&&(i=Number(e)),i===void 0)break;return t==_.UINT32||t==_.FIXED32?Qa(i):Yn(i),i;case _.INT64:case _.SFIXED64:case _.SINT64:if(typeof e!="number"&&typeof e!="string")break;const r=V.parse(e);return n?r.toString():r;case _.FIXED64:case _.UINT64:if(typeof e!="number"&&typeof e!="string")break;const c=V.uParse(e);return n?c.toString():c;case _.BOOL:if(typeof e!="boolean")break;return e;case _.STRING:if(typeof e!="string")break;try{encodeURIComponent(e)}catch{throw new Error("invalid UTF8")}return e;case _.BYTES:if(e==="")return new Uint8Array(0);if(typeof e!="string")break;return nt.dec(e)}throw new Error}function at(t,e,n,a){if(e===null)return t.typeName=="google.protobuf.NullValue"?0:a?t.values[0].no:Hn;switch(typeof e){case"number":if(Number.isInteger(e))return e;break;case"string":const o=t.findName(e);if(o!==void 0)return o.no;if(n)return Kn;break}throw new Error(`cannot decode enum ${t.typeName} from JSON: ${ae(e)}`)}function Wf(t){return t.repeated||t.kind=="map"?!0:!(t.oneof||t.kind=="message"||t.opt||t.req)}function xi(t,e,n){if(t.kind=="map"){U(typeof e=="object"&&e!=null);const a={},o=Object.entries(e);switch(t.V.kind){case"scalar":for(const[r,c]of o)a[r.toString()]=Xn(t.V.T,c);break;case"message":for(const[r,c]of o)a[r.toString()]=c.toJson(n);break;case"enum":const i=t.V.T;for(const[r,c]of o)a[r.toString()]=tt(i,c,n.enumAsInteger);break}return n.emitDefaultValues||o.length>0?a:void 0}if(t.repeated){U(Array.isArray(e));const a=[];switch(t.kind){case"scalar":for(let o=0;o<e.length;o++)a.push(Xn(t.T,e[o]));break;case"enum":for(let o=0;o<e.length;o++)a.push(tt(t.T,e[o],n.enumAsInteger));break;case"message":for(let o=0;o<e.length;o++)a.push(e[o].toJson(n));break}return n.emitDefaultValues||a.length>0?a:void 0}switch(t.kind){case"scalar":return Xn(t.T,e);case"enum":return tt(t.T,e,n.enumAsInteger);case"message":return Li(t.T,e).toJson(n)}}function tt(t,e,n){var a;if(U(typeof e=="number"),t.typeName=="google.protobuf.NullValue")return null;if(n)return e;const o=t.findNumber(e);return(a=o?.name)!==null&&a!==void 0?a:e}function Xn(t,e){switch(t){case _.INT32:case _.SFIXED32:case _.SINT32:case _.FIXED32:case _.UINT32:return U(typeof e=="number"),e;case _.FLOAT:case _.DOUBLE:return U(typeof e=="number"),Number.isNaN(e)?"NaN":e===Number.POSITIVE_INFINITY?"Infinity":e===Number.NEGATIVE_INFINITY?"-Infinity":e;case _.STRING:return U(typeof e=="string"),e;case _.BOOL:return U(typeof e=="boolean"),e;case _.UINT64:case _.FIXED64:case _.INT64:case _.SFIXED64:case _.SINT64:return U(typeof e=="bigint"||typeof e=="string"||typeof e=="number"),e.toString();case _.BYTES:return U(e instanceof Uint8Array),nt.enc(e)}}const mn=Symbol("@bufbuild/protobuf/unknown-fields"),Ji={readUnknownFields:!0,readerFactory:t=>new Ni(t)},zi={writeUnknownFields:!0,writerFactory:()=>new Lf};function jf(t){return t?Object.assign(Object.assign({},Ji),t):Ji}function Hf(t){return t?Object.assign(Object.assign({},zi),t):zi}function Kf(){return{makeReadOptions:jf,makeWriteOptions:Hf,listUnknownFields(t){var e;return(e=t[mn])!==null&&e!==void 0?e:[]},discardUnknownFields(t){delete t[mn]},writeUnknownFields(t,e){const a=t[mn];if(a)for(const o of a)e.tag(o.no,o.wireType).raw(o.data)},onUnknownField(t,e,n,a){const o=t;Array.isArray(o[mn])||(o[mn]=[]),o[mn].push({no:e,wireType:n,data:a})},readMessage(t,e,n,a,o){const i=t.getType(),r=o?e.len:e.pos+n;let c,l;for(;e.pos<r&&([c,l]=e.tag(),!(o===!0&&l==G.EndGroup));){const d=i.fields.find(c);if(!d){const g=e.skip(l,c);a.readUnknownFields&&this.onUnknownField(t,c,l,g);continue}Vi(t,e,d,l,a)}if(o&&(l!=G.EndGroup||c!==n))throw new Error("invalid end group tag")},readField:Vi,writeMessage(t,e,n){const a=t.getType();for(const o of a.fields.byNumber()){if(!Ui(o,t)){if(o.req)throw new Error(`cannot encode field ${a.typeName}.${o.name} to binary: required field not set`);continue}const i=o.oneof?t[o.oneof.localName].value:t[o.localName];$i(o,i,e,n)}return n.writeUnknownFields&&this.writeUnknownFields(t,e),e},writeField(t,e,n,a){e!==void 0&&$i(t,e,n,a)}}}function Vi(t,e,n,a,o){let{repeated:i,localName:r}=n;switch(n.oneof&&(t=t[n.oneof.localName],t.case!=r&&delete t.value,t.case=r,r="value"),n.kind){case"scalar":case"enum":const c=n.kind=="enum"?_.INT32:n.T;let l=Zn;if(n.kind=="scalar"&&n.L>0&&(l=Qf),i){let I=t[r];if(a==G.LengthDelimited&&c!=_.STRING&&c!=_.BYTES){let E=e.uint32()+e.pos;for(;e.pos<E;)I.push(l(e,c))}else I.push(l(e,c))}else t[r]=l(e,c);break;case"message":const d=n.T;i?t[r].push(Qn(e,new d,o,n)):Ke(t[r])?Qn(e,t[r],o,n):(t[r]=Qn(e,new d,o,n),d.fieldWrapper&&!n.oneof&&!n.repeated&&(t[r]=d.fieldWrapper.unwrapField(t[r])));break;case"map":let[g,f]=Xf(n,e,o);t[r][g]=f;break}}function Qn(t,e,n,a){const o=e.getType().runtime.bin,i=a?.delimited;return o.readMessage(e,t,i?a.no:t.uint32(),n,i),e}function Xf(t,e,n){const a=e.uint32(),o=e.pos+a;let i,r;for(;e.pos<o;){const[c]=e.tag();switch(c){case 1:i=Zn(e,t.K);break;case 2:switch(t.V.kind){case"scalar":r=Zn(e,t.V.T);break;case"enum":r=e.int32();break;case"message":r=Qn(e,new t.V.T,n,void 0);break}break}}if(i===void 0&&(i=rn(t.K,Be.BIGINT)),typeof i!="string"&&typeof i!="number"&&(i=i.toString()),r===void 0)switch(t.V.kind){case"scalar":r=rn(t.V.T,Be.BIGINT);break;case"enum":r=t.V.T.values[0].no;break;case"message":r=new t.V.T;break}return[i,r]}function Qf(t,e){const n=Zn(t,e);return typeof n=="bigint"?n.toString():n}function Zn(t,e){switch(e){case _.STRING:return t.string();case _.BOOL:return t.bool();case _.DOUBLE:return t.double();case _.FLOAT:return t.float();case _.INT32:return t.int32();case _.INT64:return t.int64();case _.UINT64:return t.uint64();case _.FIXED64:return t.fixed64();case _.BYTES:return t.bytes();case _.FIXED32:return t.fixed32();case _.SFIXED32:return t.sfixed32();case _.SFIXED64:return t.sfixed64();case _.SINT64:return t.sint64();case _.UINT32:return t.uint32();case _.SINT32:return t.sint32()}}function $i(t,e,n,a){U(e!==void 0);const o=t.repeated;switch(t.kind){case"scalar":case"enum":let i=t.kind=="enum"?_.INT32:t.T;if(o)if(U(Array.isArray(e)),t.packed)eR(n,i,t.no,e);else for(const r of e)fn(n,i,t.no,r);else fn(n,i,t.no,e);break;case"message":if(o){U(Array.isArray(e));for(const r of e)Yi(n,a,t,r)}else Yi(n,a,t,e);break;case"map":U(typeof e=="object"&&e!=null);for(const[r,c]of Object.entries(e))Zf(n,a,t,r,c);break}}function Zf(t,e,n,a,o){t.tag(n.no,G.LengthDelimited),t.fork();let i=a;switch(n.K){case _.INT32:case _.FIXED32:case _.UINT32:case _.SFIXED32:case _.SINT32:i=Number.parseInt(a);break;case _.BOOL:U(a=="true"||a=="false"),i=a=="true";break}switch(fn(t,n.K,1,i),n.V.kind){case"scalar":fn(t,n.V.T,2,o);break;case"enum":fn(t,_.INT32,2,o);break;case"message":U(o!==void 0),t.tag(2,G.LengthDelimited).bytes(o.toBinary(e));break}t.join()}function Yi(t,e,n,a){const o=Li(n.T,a);n.delimited?t.tag(n.no,G.StartGroup).raw(o.toBinary(e)).tag(n.no,G.EndGroup):t.tag(n.no,G.LengthDelimited).bytes(o.toBinary(e))}function fn(t,e,n,a){U(a!==void 0);let[o,i]=Wi(e);t.tag(n,o)[i](a)}function eR(t,e,n,a){if(!a.length)return;t.tag(n,G.LengthDelimited).fork();let[,o]=Wi(e);for(let i=0;i<a.length;i++)t[o](a[i]);t.join()}function Wi(t){let e=G.Varint;switch(t){case _.BYTES:case _.STRING:e=G.LengthDelimited;break;case _.DOUBLE:case _.FIXED64:case _.SFIXED64:e=G.Bit64;break;case _.FIXED32:case _.SFIXED32:case _.FLOAT:e=G.Bit32;break}const n=_[t].toLowerCase();return[e,n]}function nR(){return{setEnumType:_i,initPartial(t,e){if(t===void 0)return;const n=e.getType();for(const a of n.fields.byMember()){const o=a.localName,i=e,r=t;if(r[o]!=null)switch(a.kind){case"oneof":const c=r[o].case;if(c===void 0)continue;const l=a.findField(c);let d=r[o].value;l&&l.kind=="message"&&!Ke(d,l.T)?d=new l.T(d):l&&l.kind==="scalar"&&l.T===_.BYTES&&(d=Rn(d)),i[o]={case:c,value:d};break;case"scalar":case"enum":let g=r[o];a.T===_.BYTES&&(g=a.repeated?g.map(Rn):Rn(g)),i[o]=g;break;case"map":switch(a.V.kind){case"scalar":case"enum":if(a.V.T===_.BYTES)for(const[R,E]of Object.entries(r[o]))i[o][R]=Rn(E);else Object.assign(i[o],r[o]);break;case"message":const I=a.V.T;for(const R of Object.keys(r[o])){let E=r[o][R];I.fieldWrapper||(E=new I(E)),i[o][R]=E}break}break;case"message":const f=a.T;if(a.repeated)i[o]=r[o].map(I=>Ke(I,f)?I:new f(I));else{const I=r[o];f.fieldWrapper?f.typeName==="google.protobuf.BytesValue"?i[o]=Rn(I):i[o]=I:i[o]=Ke(I,f)?I:new f(I)}break}}},equals(t,e,n){return e===n?!0:!e||!n?!1:t.fields.byMember().every(a=>{const o=e[a.localName],i=n[a.localName];if(a.repeated){if(o.length!==i.length)return!1;switch(a.kind){case"message":return o.every((r,c)=>a.T.equals(r,i[c]));case"scalar":return o.every((r,c)=>Fe(a.T,r,i[c]));case"enum":return o.every((r,c)=>Fe(_.INT32,r,i[c]))}throw new Error(`repeated cannot contain ${a.kind}`)}switch(a.kind){case"message":return a.T.equals(o,i);case"enum":return Fe(_.INT32,o,i);case"scalar":return Fe(a.T,o,i);case"oneof":if(o.case!==i.case)return!1;const r=a.findField(o.case);if(r===void 0)return!0;switch(r.kind){case"message":return r.T.equals(o.value,i.value);case"enum":return Fe(_.INT32,o.value,i.value);case"scalar":return Fe(r.T,o.value,i.value)}throw new Error(`oneof cannot contain ${r.kind}`);case"map":const c=Object.keys(o).concat(Object.keys(i));switch(a.V.kind){case"message":const l=a.V.T;return c.every(g=>l.equals(o[g],i[g]));case"enum":return c.every(g=>Fe(_.INT32,o[g],i[g]));case"scalar":const d=a.V.T;return c.every(g=>Fe(d,o[g],i[g]))}break}})},clone(t){const e=t.getType(),n=new e,a=n;for(const o of e.fields.byMember()){const i=t[o.localName];let r;if(o.repeated)r=i.map(ea);else if(o.kind=="map"){r=a[o.localName];for(const[c,l]of Object.entries(i))r[c]=ea(l)}else o.kind=="oneof"?r=o.findField(i.case)?{case:i.case,value:ea(i.value)}:{case:void 0}:r=ea(i);a[o.localName]=r}for(const o of e.runtime.bin.listUnknownFields(t))e.runtime.bin.onUnknownField(a,o.no,o.wireType,o.data);return n}}}function ea(t){if(t===void 0)return t;if(Ke(t))return t.clone();if(t instanceof Uint8Array){const e=new Uint8Array(t.byteLength);return e.set(t),e}return t}function Rn(t){return t instanceof Uint8Array?t:new Uint8Array(t)}function ji(t,e,n){return{syntax:t,json:$f(),bin:Kf(),util:Object.assign(Object.assign({},nR()),{newFieldList:e,initFields:n}),makeMessageType(a,o,i){return Nf(this,a,o,i)},makeEnum:Cf,makeEnumType:Si,getEnumType:wf,makeExtension(a,o,i){return Gf(this,a,o,i)}}}class Hi{constructor(e,n){this._fields=e,this._normalizer=n}findJsonName(e){if(!this.jsonNames){const n={};for(const a of this.list())n[a.jsonName]=n[a.name]=a;this.jsonNames=n}return this.jsonNames[e]}find(e){if(!this.numbers){const n={};for(const a of this.list())n[a.no]=a;this.numbers=n}return this.numbers[e]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((e,n)=>e.no-n.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];const e=this.members;let n;for(const a of this.list())a.oneof?a.oneof!==n&&(n=a.oneof,e.push(n)):e.push(a)}return this.members}}function Ki(t,e){const n=Xi(t);return e?n:rR(iR(n))}function aR(t){return Ki(t,!1)}const tR=Xi;function Xi(t){let e=!1;const n=[];for(let a=0;a<t.length;a++){let o=t.charAt(a);switch(o){case"_":e=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n.push(o),e=!1;break;default:e&&(e=!1,o=o.toUpperCase()),n.push(o);break}}return n.join("")}const sR=new Set(["constructor","toString","toJSON","valueOf"]),oR=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),Qi=t=>`${t}$`,iR=t=>oR.has(t)?Qi(t):t,rR=t=>sR.has(t)?Qi(t):t;class mR{constructor(e){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=e,this.localName=aR(e)}addField(e){U(e.oneof===this,`field ${e.name} not one of ${this.name}`),this.fields.push(e)}findField(e){if(!this._lookup){this._lookup=Object.create(null);for(let n=0;n<this.fields.length;n++)this._lookup[this.fields[n].localName]=this.fields[n]}return this._lookup[e]}}function Zi(t,e){var n,a,o,i,r,c;const l=[];let d;for(const g of typeof t=="function"?t():t){const f=g;if(f.localName=Ki(g.name,g.oneof!==void 0),f.jsonName=(n=g.jsonName)!==null&&n!==void 0?n:tR(g.name),f.repeated=(a=g.repeated)!==null&&a!==void 0?a:!1,g.kind=="scalar"&&(f.L=(o=g.L)!==null&&o!==void 0?o:Be.BIGINT),f.delimited=(i=g.delimited)!==null&&i!==void 0?i:!1,f.req=(r=g.req)!==null&&r!==void 0?r:!1,f.opt=(c=g.opt)!==null&&c!==void 0?c:!1,g.packed===void 0&&(e?f.packed=g.kind=="enum"||g.kind=="scalar"&&g.T!=_.BYTES&&g.T!=_.STRING:f.packed=!1),g.oneof!==void 0){const I=typeof g.oneof=="string"?g.oneof:g.oneof.name;(!d||d.name!=I)&&(d=new mR(I)),f.oneof=d,d.addField(f)}l.push(f)}return l}const s=ji("proto3",t=>new Hi(t,e=>Zi(e,!0)),t=>{for(const e of t.getType().fields.byMember()){if(e.opt)continue;const n=e.localName,a=t;if(e.repeated){a[n]=[];continue}switch(e.kind){case"oneof":a[n]={case:void 0};break;case"enum":a[n]=0;break;case"map":a[n]={};break;case"scalar":a[n]=rn(e.T,e.L);break}}}),T=ji("proto2",t=>new Hi(t,e=>Zi(e,!1)),t=>{for(const e of t.getType().fields.byMember()){const n=e.localName,a=t;if(e.repeated){a[n]=[];continue}switch(e.kind){case"oneof":a[n]={case:void 0};break;case"map":a[n]={};break}}});var m;(function(t){t[t.Unary=0]="Unary",t[t.ServerStreaming=1]="ServerStreaming",t[t.ClientStreaming=2]="ClientStreaming",t[t.BiDiStreaming=3]="BiDiStreaming"})(m||(m={}));var er;(function(t){t[t.NoSideEffects=1]="NoSideEffects",t[t.Idempotent=2]="Idempotent"})(er||(er={}));var Z;(function(t){t[t.EDITION_UNKNOWN=0]="EDITION_UNKNOWN",t[t.EDITION_LEGACY=900]="EDITION_LEGACY",t[t.EDITION_PROTO2=998]="EDITION_PROTO2",t[t.EDITION_PROTO3=999]="EDITION_PROTO3",t[t.EDITION_2023=1e3]="EDITION_2023",t[t.EDITION_2024=1001]="EDITION_2024",t[t.EDITION_1_TEST_ONLY=1]="EDITION_1_TEST_ONLY",t[t.EDITION_2_TEST_ONLY=2]="EDITION_2_TEST_ONLY",t[t.EDITION_99997_TEST_ONLY=99997]="EDITION_99997_TEST_ONLY",t[t.EDITION_99998_TEST_ONLY=99998]="EDITION_99998_TEST_ONLY",t[t.EDITION_99999_TEST_ONLY=99999]="EDITION_99999_TEST_ONLY",t[t.EDITION_MAX=2147483647]="EDITION_MAX"})(Z||(Z={})),T.util.setEnumType(Z,"google.protobuf.Edition",[{no:0,name:"EDITION_UNKNOWN"},{no:900,name:"EDITION_LEGACY"},{no:998,name:"EDITION_PROTO2"},{no:999,name:"EDITION_PROTO3"},{no:1e3,name:"EDITION_2023"},{no:1001,name:"EDITION_2024"},{no:1,name:"EDITION_1_TEST_ONLY"},{no:2,name:"EDITION_2_TEST_ONLY"},{no:99997,name:"EDITION_99997_TEST_ONLY"},{no:99998,name:"EDITION_99998_TEST_ONLY"},{no:99999,name:"EDITION_99999_TEST_ONLY"},{no:2147483647,name:"EDITION_MAX"}]);class xe extends O{constructor(e){super(),this.file=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new xe().fromBinary(e,n)}static fromJson(e,n){return new xe().fromJson(e,n)}static fromJsonString(e,n){return new xe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(xe,e,n)}}xe.runtime=T,xe.typeName="google.protobuf.FileDescriptorSet",xe.fields=T.util.newFieldList(()=>[{no:1,name:"file",kind:"message",T:te,repeated:!0}]);class te extends O{constructor(e){super(),this.dependency=[],this.publicDependency=[],this.weakDependency=[],this.messageType=[],this.enumType=[],this.service=[],this.extension=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new te().fromBinary(e,n)}static fromJson(e,n){return new te().fromJson(e,n)}static fromJsonString(e,n){return new te().fromJsonString(e,n)}static equals(e,n){return T.util.equals(te,e,n)}}te.runtime=T,te.typeName="google.protobuf.FileDescriptorProto",te.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"package",kind:"scalar",T:9,opt:!0},{no:3,name:"dependency",kind:"scalar",T:9,repeated:!0},{no:10,name:"public_dependency",kind:"scalar",T:5,repeated:!0},{no:11,name:"weak_dependency",kind:"scalar",T:5,repeated:!0},{no:4,name:"message_type",kind:"message",T:se,repeated:!0},{no:5,name:"enum_type",kind:"message",T:oe,repeated:!0},{no:6,name:"service",kind:"message",T:he,repeated:!0},{no:7,name:"extension",kind:"message",T:ee,repeated:!0},{no:8,name:"options",kind:"message",T:Re,opt:!0},{no:9,name:"source_code_info",kind:"message",T:Ne,opt:!0},{no:12,name:"syntax",kind:"scalar",T:9,opt:!0},{no:14,name:"edition",kind:"enum",T:T.getEnumType(Z),opt:!0}]);class se extends O{constructor(e){super(),this.field=[],this.extension=[],this.nestedType=[],this.enumType=[],this.extensionRange=[],this.oneofDecl=[],this.reservedRange=[],this.reservedName=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new se().fromBinary(e,n)}static fromJson(e,n){return new se().fromJson(e,n)}static fromJsonString(e,n){return new se().fromJsonString(e,n)}static equals(e,n){return T.util.equals(se,e,n)}}se.runtime=T,se.typeName="google.protobuf.DescriptorProto",se.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"field",kind:"message",T:ee,repeated:!0},{no:6,name:"extension",kind:"message",T:ee,repeated:!0},{no:3,name:"nested_type",kind:"message",T:se,repeated:!0},{no:4,name:"enum_type",kind:"message",T:oe,repeated:!0},{no:5,name:"extension_range",kind:"message",T:pe,repeated:!0},{no:8,name:"oneof_decl",kind:"message",T:ke,repeated:!0},{no:7,name:"options",kind:"message",T:_e,opt:!0},{no:9,name:"reserved_range",kind:"message",T:ue,repeated:!0},{no:10,name:"reserved_name",kind:"scalar",T:9,repeated:!0}]);class pe extends O{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new pe().fromBinary(e,n)}static fromJson(e,n){return new pe().fromJson(e,n)}static fromJsonString(e,n){return new pe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(pe,e,n)}}pe.runtime=T,pe.typeName="google.protobuf.DescriptorProto.ExtensionRange",pe.fields=T.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0},{no:3,name:"options",kind:"message",T:ge,opt:!0}]);class ue extends O{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new ue().fromBinary(e,n)}static fromJson(e,n){return new ue().fromJson(e,n)}static fromJsonString(e,n){return new ue().fromJsonString(e,n)}static equals(e,n){return T.util.equals(ue,e,n)}}ue.runtime=T,ue.typeName="google.protobuf.DescriptorProto.ReservedRange",ue.fields=T.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0}]);class ge extends O{constructor(e){super(),this.uninterpretedOption=[],this.declaration=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new ge().fromBinary(e,n)}static fromJson(e,n){return new ge().fromJson(e,n)}static fromJsonString(e,n){return new ge().fromJsonString(e,n)}static equals(e,n){return T.util.equals(ge,e,n)}}ge.runtime=T,ge.typeName="google.protobuf.ExtensionRangeOptions",ge.fields=T.util.newFieldList(()=>[{no:999,name:"uninterpreted_option",kind:"message",T:$,repeated:!0},{no:2,name:"declaration",kind:"message",T:Te,repeated:!0},{no:50,name:"features",kind:"message",T:x,opt:!0},{no:3,name:"verification",kind:"enum",T:T.getEnumType(_n),opt:!0,default:_n.UNVERIFIED}]);var _n;(function(t){t[t.DECLARATION=0]="DECLARATION",t[t.UNVERIFIED=1]="UNVERIFIED"})(_n||(_n={})),T.util.setEnumType(_n,"google.protobuf.ExtensionRangeOptions.VerificationState",[{no:0,name:"DECLARATION"},{no:1,name:"UNVERIFIED"}]);class Te extends O{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Te().fromBinary(e,n)}static fromJson(e,n){return new Te().fromJson(e,n)}static fromJsonString(e,n){return new Te().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Te,e,n)}}Te.runtime=T,Te.typeName="google.protobuf.ExtensionRangeOptions.Declaration",Te.fields=T.util.newFieldList(()=>[{no:1,name:"number",kind:"scalar",T:5,opt:!0},{no:2,name:"full_name",kind:"scalar",T:9,opt:!0},{no:3,name:"type",kind:"scalar",T:9,opt:!0},{no:5,name:"reserved",kind:"scalar",T:8,opt:!0},{no:6,name:"repeated",kind:"scalar",T:8,opt:!0}]);class ee extends O{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new ee().fromBinary(e,n)}static fromJson(e,n){return new ee().fromJson(e,n)}static fromJsonString(e,n){return new ee().fromJsonString(e,n)}static equals(e,n){return T.util.equals(ee,e,n)}}ee.runtime=T,ee.typeName="google.protobuf.FieldDescriptorProto",ee.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"number",kind:"scalar",T:5,opt:!0},{no:4,name:"label",kind:"enum",T:T.getEnumType(aa),opt:!0},{no:5,name:"type",kind:"enum",T:T.getEnumType(na),opt:!0},{no:6,name:"type_name",kind:"scalar",T:9,opt:!0},{no:2,name:"extendee",kind:"scalar",T:9,opt:!0},{no:7,name:"default_value",kind:"scalar",T:9,opt:!0},{no:9,name:"oneof_index",kind:"scalar",T:5,opt:!0},{no:10,name:"json_name",kind:"scalar",T:9,opt:!0},{no:8,name:"options",kind:"message",T:Se,opt:!0},{no:17,name:"proto3_optional",kind:"scalar",T:8,opt:!0}]);var na;(function(t){t[t.DOUBLE=1]="DOUBLE",t[t.FLOAT=2]="FLOAT",t[t.INT64=3]="INT64",t[t.UINT64=4]="UINT64",t[t.INT32=5]="INT32",t[t.FIXED64=6]="FIXED64",t[t.FIXED32=7]="FIXED32",t[t.BOOL=8]="BOOL",t[t.STRING=9]="STRING",t[t.GROUP=10]="GROUP",t[t.MESSAGE=11]="MESSAGE",t[t.BYTES=12]="BYTES",t[t.UINT32=13]="UINT32",t[t.ENUM=14]="ENUM",t[t.SFIXED32=15]="SFIXED32",t[t.SFIXED64=16]="SFIXED64",t[t.SINT32=17]="SINT32",t[t.SINT64=18]="SINT64"})(na||(na={})),T.util.setEnumType(na,"google.protobuf.FieldDescriptorProto.Type",[{no:1,name:"TYPE_DOUBLE"},{no:2,name:"TYPE_FLOAT"},{no:3,name:"TYPE_INT64"},{no:4,name:"TYPE_UINT64"},{no:5,name:"TYPE_INT32"},{no:6,name:"TYPE_FIXED64"},{no:7,name:"TYPE_FIXED32"},{no:8,name:"TYPE_BOOL"},{no:9,name:"TYPE_STRING"},{no:10,name:"TYPE_GROUP"},{no:11,name:"TYPE_MESSAGE"},{no:12,name:"TYPE_BYTES"},{no:13,name:"TYPE_UINT32"},{no:14,name:"TYPE_ENUM"},{no:15,name:"TYPE_SFIXED32"},{no:16,name:"TYPE_SFIXED64"},{no:17,name:"TYPE_SINT32"},{no:18,name:"TYPE_SINT64"}]);var aa;(function(t){t[t.OPTIONAL=1]="OPTIONAL",t[t.REPEATED=3]="REPEATED",t[t.REQUIRED=2]="REQUIRED"})(aa||(aa={})),T.util.setEnumType(aa,"google.protobuf.FieldDescriptorProto.Label",[{no:1,name:"LABEL_OPTIONAL"},{no:3,name:"LABEL_REPEATED"},{no:2,name:"LABEL_REQUIRED"}]);class ke extends O{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new ke().fromBinary(e,n)}static fromJson(e,n){return new ke().fromJson(e,n)}static fromJsonString(e,n){return new ke().fromJsonString(e,n)}static equals(e,n){return T.util.equals(ke,e,n)}}ke.runtime=T,ke.typeName="google.protobuf.OneofDescriptorProto",ke.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"options",kind:"message",T:Ee,opt:!0}]);class oe extends O{constructor(e){super(),this.value=[],this.reservedRange=[],this.reservedName=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new oe().fromBinary(e,n)}static fromJson(e,n){return new oe().fromJson(e,n)}static fromJsonString(e,n){return new oe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(oe,e,n)}}oe.runtime=T,oe.typeName="google.protobuf.EnumDescriptorProto",oe.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"value",kind:"message",T:ve,repeated:!0},{no:3,name:"options",kind:"message",T:Me,opt:!0},{no:4,name:"reserved_range",kind:"message",T:ye,repeated:!0},{no:5,name:"reserved_name",kind:"scalar",T:9,repeated:!0}]);class ye extends O{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new ye().fromBinary(e,n)}static fromJson(e,n){return new ye().fromJson(e,n)}static fromJsonString(e,n){return new ye().fromJsonString(e,n)}static equals(e,n){return T.util.equals(ye,e,n)}}ye.runtime=T,ye.typeName="google.protobuf.EnumDescriptorProto.EnumReservedRange",ye.fields=T.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0}]);class ve extends O{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new ve().fromBinary(e,n)}static fromJson(e,n){return new ve().fromJson(e,n)}static fromJsonString(e,n){return new ve().fromJsonString(e,n)}static equals(e,n){return T.util.equals(ve,e,n)}}ve.runtime=T,ve.typeName="google.protobuf.EnumValueDescriptorProto",ve.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"number",kind:"scalar",T:5,opt:!0},{no:3,name:"options",kind:"message",T:be,opt:!0}]);class he extends O{constructor(e){super(),this.method=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new he().fromBinary(e,n)}static fromJson(e,n){return new he().fromJson(e,n)}static fromJsonString(e,n){return new he().fromJsonString(e,n)}static equals(e,n){return T.util.equals(he,e,n)}}he.runtime=T,he.typeName="google.protobuf.ServiceDescriptorProto",he.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"method",kind:"message",T:fe,repeated:!0},{no:3,name:"options",kind:"message",T:Oe,opt:!0}]);class fe extends O{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new fe().fromBinary(e,n)}static fromJson(e,n){return new fe().fromJson(e,n)}static fromJsonString(e,n){return new fe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(fe,e,n)}}fe.runtime=T,fe.typeName="google.protobuf.MethodDescriptorProto",fe.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"input_type",kind:"scalar",T:9,opt:!0},{no:3,name:"output_type",kind:"scalar",T:9,opt:!0},{no:4,name:"options",kind:"message",T:re,opt:!0},{no:5,name:"client_streaming",kind:"scalar",T:8,opt:!0,default:!1},{no:6,name:"server_streaming",kind:"scalar",T:8,opt:!0,default:!1}]);class Re extends O{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Re().fromBinary(e,n)}static fromJson(e,n){return new Re().fromJson(e,n)}static fromJsonString(e,n){return new Re().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Re,e,n)}}Re.runtime=T,Re.typeName="google.protobuf.FileOptions",Re.fields=T.util.newFieldList(()=>[{no:1,name:"java_package",kind:"scalar",T:9,opt:!0},{no:8,name:"java_outer_classname",kind:"scalar",T:9,opt:!0},{no:10,name:"java_multiple_files",kind:"scalar",T:8,opt:!0,default:!1},{no:20,name:"java_generate_equals_and_hash",kind:"scalar",T:8,opt:!0},{no:27,name:"java_string_check_utf8",kind:"scalar",T:8,opt:!0,default:!1},{no:9,name:"optimize_for",kind:"enum",T:T.getEnumType(Sn),opt:!0,default:Sn.SPEED},{no:11,name:"go_package",kind:"scalar",T:9,opt:!0},{no:16,name:"cc_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:17,name:"java_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:18,name:"py_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:23,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:31,name:"cc_enable_arenas",kind:"scalar",T:8,opt:!0,default:!0},{no:36,name:"objc_class_prefix",kind:"scalar",T:9,opt:!0},{no:37,name:"csharp_namespace",kind:"scalar",T:9,opt:!0},{no:39,name:"swift_prefix",kind:"scalar",T:9,opt:!0},{no:40,name:"php_class_prefix",kind:"scalar",T:9,opt:!0},{no:41,name:"php_namespace",kind:"scalar",T:9,opt:!0},{no:44,name:"php_metadata_namespace",kind:"scalar",T:9,opt:!0},{no:45,name:"ruby_package",kind:"scalar",T:9,opt:!0},{no:50,name:"features",kind:"message",T:x,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:$,repeated:!0}]);var Sn;(function(t){t[t.SPEED=1]="SPEED",t[t.CODE_SIZE=2]="CODE_SIZE",t[t.LITE_RUNTIME=3]="LITE_RUNTIME"})(Sn||(Sn={})),T.util.setEnumType(Sn,"google.protobuf.FileOptions.OptimizeMode",[{no:1,name:"SPEED"},{no:2,name:"CODE_SIZE"},{no:3,name:"LITE_RUNTIME"}]);class _e extends O{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new _e().fromBinary(e,n)}static fromJson(e,n){return new _e().fromJson(e,n)}static fromJsonString(e,n){return new _e().fromJsonString(e,n)}static equals(e,n){return T.util.equals(_e,e,n)}}_e.runtime=T,_e.typeName="google.protobuf.MessageOptions",_e.fields=T.util.newFieldList(()=>[{no:1,name:"message_set_wire_format",kind:"scalar",T:8,opt:!0,default:!1},{no:2,name:"no_standard_descriptor_accessor",kind:"scalar",T:8,opt:!0,default:!1},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:7,name:"map_entry",kind:"scalar",T:8,opt:!0},{no:11,name:"deprecated_legacy_json_field_conflicts",kind:"scalar",T:8,opt:!0},{no:12,name:"features",kind:"message",T:x,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:$,repeated:!0}]);class Se extends O{constructor(e){super(),this.targets=[],this.editionDefaults=[],this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Se().fromBinary(e,n)}static fromJson(e,n){return new Se().fromJson(e,n)}static fromJsonString(e,n){return new Se().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Se,e,n)}}Se.runtime=T,Se.typeName="google.protobuf.FieldOptions",Se.fields=T.util.newFieldList(()=>[{no:1,name:"ctype",kind:"enum",T:T.getEnumType(In),opt:!0,default:In.STRING},{no:2,name:"packed",kind:"scalar",T:8,opt:!0},{no:6,name:"jstype",kind:"enum",T:T.getEnumType(En),opt:!0,default:En.JS_NORMAL},{no:5,name:"lazy",kind:"scalar",T:8,opt:!0,default:!1},{no:15,name:"unverified_lazy",kind:"scalar",T:8,opt:!0,default:!1},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:10,name:"weak",kind:"scalar",T:8,opt:!0,default:!1},{no:16,name:"debug_redact",kind:"scalar",T:8,opt:!0,default:!1},{no:17,name:"retention",kind:"enum",T:T.getEnumType(ta),opt:!0},{no:19,name:"targets",kind:"enum",T:T.getEnumType(sa),repeated:!0},{no:20,name:"edition_defaults",kind:"message",T:Ie,repeated:!0},{no:21,name:"features",kind:"message",T:x,opt:!0},{no:22,name:"feature_support",kind:"message",T:ie,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:$,repeated:!0}]);var In;(function(t){t[t.STRING=0]="STRING",t[t.CORD=1]="CORD",t[t.STRING_PIECE=2]="STRING_PIECE"})(In||(In={})),T.util.setEnumType(In,"google.protobuf.FieldOptions.CType",[{no:0,name:"STRING"},{no:1,name:"CORD"},{no:2,name:"STRING_PIECE"}]);var En;(function(t){t[t.JS_NORMAL=0]="JS_NORMAL",t[t.JS_STRING=1]="JS_STRING",t[t.JS_NUMBER=2]="JS_NUMBER"})(En||(En={})),T.util.setEnumType(En,"google.protobuf.FieldOptions.JSType",[{no:0,name:"JS_NORMAL"},{no:1,name:"JS_STRING"},{no:2,name:"JS_NUMBER"}]);var ta;(function(t){t[t.RETENTION_UNKNOWN=0]="RETENTION_UNKNOWN",t[t.RETENTION_RUNTIME=1]="RETENTION_RUNTIME",t[t.RETENTION_SOURCE=2]="RETENTION_SOURCE"})(ta||(ta={})),T.util.setEnumType(ta,"google.protobuf.FieldOptions.OptionRetention",[{no:0,name:"RETENTION_UNKNOWN"},{no:1,name:"RETENTION_RUNTIME"},{no:2,name:"RETENTION_SOURCE"}]);var sa;(function(t){t[t.TARGET_TYPE_UNKNOWN=0]="TARGET_TYPE_UNKNOWN",t[t.TARGET_TYPE_FILE=1]="TARGET_TYPE_FILE",t[t.TARGET_TYPE_EXTENSION_RANGE=2]="TARGET_TYPE_EXTENSION_RANGE",t[t.TARGET_TYPE_MESSAGE=3]="TARGET_TYPE_MESSAGE",t[t.TARGET_TYPE_FIELD=4]="TARGET_TYPE_FIELD",t[t.TARGET_TYPE_ONEOF=5]="TARGET_TYPE_ONEOF",t[t.TARGET_TYPE_ENUM=6]="TARGET_TYPE_ENUM",t[t.TARGET_TYPE_ENUM_ENTRY=7]="TARGET_TYPE_ENUM_ENTRY",t[t.TARGET_TYPE_SERVICE=8]="TARGET_TYPE_SERVICE",t[t.TARGET_TYPE_METHOD=9]="TARGET_TYPE_METHOD"})(sa||(sa={})),T.util.setEnumType(sa,"google.protobuf.FieldOptions.OptionTargetType",[{no:0,name:"TARGET_TYPE_UNKNOWN"},{no:1,name:"TARGET_TYPE_FILE"},{no:2,name:"TARGET_TYPE_EXTENSION_RANGE"},{no:3,name:"TARGET_TYPE_MESSAGE"},{no:4,name:"TARGET_TYPE_FIELD"},{no:5,name:"TARGET_TYPE_ONEOF"},{no:6,name:"TARGET_TYPE_ENUM"},{no:7,name:"TARGET_TYPE_ENUM_ENTRY"},{no:8,name:"TARGET_TYPE_SERVICE"},{no:9,name:"TARGET_TYPE_METHOD"}]);class Ie extends O{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Ie().fromBinary(e,n)}static fromJson(e,n){return new Ie().fromJson(e,n)}static fromJsonString(e,n){return new Ie().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ie,e,n)}}Ie.runtime=T,Ie.typeName="google.protobuf.FieldOptions.EditionDefault",Ie.fields=T.util.newFieldList(()=>[{no:3,name:"edition",kind:"enum",T:T.getEnumType(Z),opt:!0},{no:2,name:"value",kind:"scalar",T:9,opt:!0}]);class ie extends O{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new ie().fromBinary(e,n)}static fromJson(e,n){return new ie().fromJson(e,n)}static fromJsonString(e,n){return new ie().fromJsonString(e,n)}static equals(e,n){return T.util.equals(ie,e,n)}}ie.runtime=T,ie.typeName="google.protobuf.FieldOptions.FeatureSupport",ie.fields=T.util.newFieldList(()=>[{no:1,name:"edition_introduced",kind:"enum",T:T.getEnumType(Z),opt:!0},{no:2,name:"edition_deprecated",kind:"enum",T:T.getEnumType(Z),opt:!0},{no:3,name:"deprecation_warning",kind:"scalar",T:9,opt:!0},{no:4,name:"edition_removed",kind:"enum",T:T.getEnumType(Z),opt:!0}]);class Ee extends O{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ee().fromBinary(e,n)}static fromJson(e,n){return new Ee().fromJson(e,n)}static fromJsonString(e,n){return new Ee().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ee,e,n)}}Ee.runtime=T,Ee.typeName="google.protobuf.OneofOptions",Ee.fields=T.util.newFieldList(()=>[{no:1,name:"features",kind:"message",T:x,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:$,repeated:!0}]);class Me extends O{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Me().fromBinary(e,n)}static fromJson(e,n){return new Me().fromJson(e,n)}static fromJsonString(e,n){return new Me().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Me,e,n)}}Me.runtime=T,Me.typeName="google.protobuf.EnumOptions",Me.fields=T.util.newFieldList(()=>[{no:2,name:"allow_alias",kind:"scalar",T:8,opt:!0},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:6,name:"deprecated_legacy_json_field_conflicts",kind:"scalar",T:8,opt:!0},{no:7,name:"features",kind:"message",T:x,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:$,repeated:!0}]);class be extends O{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new be().fromBinary(e,n)}static fromJson(e,n){return new be().fromJson(e,n)}static fromJsonString(e,n){return new be().fromJsonString(e,n)}static equals(e,n){return T.util.equals(be,e,n)}}be.runtime=T,be.typeName="google.protobuf.EnumValueOptions",be.fields=T.util.newFieldList(()=>[{no:1,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:2,name:"features",kind:"message",T:x,opt:!0},{no:3,name:"debug_redact",kind:"scalar",T:8,opt:!0,default:!1},{no:4,name:"feature_support",kind:"message",T:ie,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:$,repeated:!0}]);class Oe extends O{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Oe().fromBinary(e,n)}static fromJson(e,n){return new Oe().fromJson(e,n)}static fromJsonString(e,n){return new Oe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Oe,e,n)}}Oe.runtime=T,Oe.typeName="google.protobuf.ServiceOptions",Oe.fields=T.util.newFieldList(()=>[{no:34,name:"features",kind:"message",T:x,opt:!0},{no:33,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:999,name:"uninterpreted_option",kind:"message",T:$,repeated:!0}]);class re extends O{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new re().fromBinary(e,n)}static fromJson(e,n){return new re().fromJson(e,n)}static fromJsonString(e,n){return new re().fromJsonString(e,n)}static equals(e,n){return T.util.equals(re,e,n)}}re.runtime=T,re.typeName="google.protobuf.MethodOptions",re.fields=T.util.newFieldList(()=>[{no:33,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:34,name:"idempotency_level",kind:"enum",T:T.getEnumType(Mn),opt:!0,default:Mn.IDEMPOTENCY_UNKNOWN},{no:35,name:"features",kind:"message",T:x,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:$,repeated:!0}]);var Mn;(function(t){t[t.IDEMPOTENCY_UNKNOWN=0]="IDEMPOTENCY_UNKNOWN",t[t.NO_SIDE_EFFECTS=1]="NO_SIDE_EFFECTS",t[t.IDEMPOTENT=2]="IDEMPOTENT"})(Mn||(Mn={})),T.util.setEnumType(Mn,"google.protobuf.MethodOptions.IdempotencyLevel",[{no:0,name:"IDEMPOTENCY_UNKNOWN"},{no:1,name:"NO_SIDE_EFFECTS"},{no:2,name:"IDEMPOTENT"}]);class $ extends O{constructor(e){super(),this.name=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new $().fromBinary(e,n)}static fromJson(e,n){return new $().fromJson(e,n)}static fromJsonString(e,n){return new $().fromJsonString(e,n)}static equals(e,n){return T.util.equals($,e,n)}}$.runtime=T,$.typeName="google.protobuf.UninterpretedOption",$.fields=T.util.newFieldList(()=>[{no:2,name:"name",kind:"message",T:we,repeated:!0},{no:3,name:"identifier_value",kind:"scalar",T:9,opt:!0},{no:4,name:"positive_int_value",kind:"scalar",T:4,opt:!0},{no:5,name:"negative_int_value",kind:"scalar",T:3,opt:!0},{no:6,name:"double_value",kind:"scalar",T:1,opt:!0},{no:7,name:"string_value",kind:"scalar",T:12,opt:!0},{no:8,name:"aggregate_value",kind:"scalar",T:9,opt:!0}]);class we extends O{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new we().fromBinary(e,n)}static fromJson(e,n){return new we().fromJson(e,n)}static fromJsonString(e,n){return new we().fromJsonString(e,n)}static equals(e,n){return T.util.equals(we,e,n)}}we.runtime=T,we.typeName="google.protobuf.UninterpretedOption.NamePart",we.fields=T.util.newFieldList(()=>[{no:1,name:"name_part",kind:"scalar",T:9,req:!0},{no:2,name:"is_extension",kind:"scalar",T:8,req:!0}]);class x extends O{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new x().fromBinary(e,n)}static fromJson(e,n){return new x().fromJson(e,n)}static fromJsonString(e,n){return new x().fromJsonString(e,n)}static equals(e,n){return T.util.equals(x,e,n)}}x.runtime=T,x.typeName="google.protobuf.FeatureSet",x.fields=T.util.newFieldList(()=>[{no:1,name:"field_presence",kind:"enum",T:T.getEnumType(oa),opt:!0},{no:2,name:"enum_type",kind:"enum",T:T.getEnumType(ia),opt:!0},{no:3,name:"repeated_field_encoding",kind:"enum",T:T.getEnumType(ra),opt:!0},{no:4,name:"utf8_validation",kind:"enum",T:T.getEnumType(ma),opt:!0},{no:5,name:"message_encoding",kind:"enum",T:T.getEnumType(ca),opt:!0},{no:6,name:"json_format",kind:"enum",T:T.getEnumType(da),opt:!0}]);var oa;(function(t){t[t.FIELD_PRESENCE_UNKNOWN=0]="FIELD_PRESENCE_UNKNOWN",t[t.EXPLICIT=1]="EXPLICIT",t[t.IMPLICIT=2]="IMPLICIT",t[t.LEGACY_REQUIRED=3]="LEGACY_REQUIRED"})(oa||(oa={})),T.util.setEnumType(oa,"google.protobuf.FeatureSet.FieldPresence",[{no:0,name:"FIELD_PRESENCE_UNKNOWN"},{no:1,name:"EXPLICIT"},{no:2,name:"IMPLICIT"},{no:3,name:"LEGACY_REQUIRED"}]);var ia;(function(t){t[t.ENUM_TYPE_UNKNOWN=0]="ENUM_TYPE_UNKNOWN",t[t.OPEN=1]="OPEN",t[t.CLOSED=2]="CLOSED"})(ia||(ia={})),T.util.setEnumType(ia,"google.protobuf.FeatureSet.EnumType",[{no:0,name:"ENUM_TYPE_UNKNOWN"},{no:1,name:"OPEN"},{no:2,name:"CLOSED"}]);var ra;(function(t){t[t.REPEATED_FIELD_ENCODING_UNKNOWN=0]="REPEATED_FIELD_ENCODING_UNKNOWN",t[t.PACKED=1]="PACKED",t[t.EXPANDED=2]="EXPANDED"})(ra||(ra={})),T.util.setEnumType(ra,"google.protobuf.FeatureSet.RepeatedFieldEncoding",[{no:0,name:"REPEATED_FIELD_ENCODING_UNKNOWN"},{no:1,name:"PACKED"},{no:2,name:"EXPANDED"}]);var ma;(function(t){t[t.UTF8_VALIDATION_UNKNOWN=0]="UTF8_VALIDATION_UNKNOWN",t[t.VERIFY=2]="VERIFY",t[t.NONE=3]="NONE"})(ma||(ma={})),T.util.setEnumType(ma,"google.protobuf.FeatureSet.Utf8Validation",[{no:0,name:"UTF8_VALIDATION_UNKNOWN"},{no:2,name:"VERIFY"},{no:3,name:"NONE"}]);var ca;(function(t){t[t.MESSAGE_ENCODING_UNKNOWN=0]="MESSAGE_ENCODING_UNKNOWN",t[t.LENGTH_PREFIXED=1]="LENGTH_PREFIXED",t[t.DELIMITED=2]="DELIMITED"})(ca||(ca={})),T.util.setEnumType(ca,"google.protobuf.FeatureSet.MessageEncoding",[{no:0,name:"MESSAGE_ENCODING_UNKNOWN"},{no:1,name:"LENGTH_PREFIXED"},{no:2,name:"DELIMITED"}]);var da;(function(t){t[t.JSON_FORMAT_UNKNOWN=0]="JSON_FORMAT_UNKNOWN",t[t.ALLOW=1]="ALLOW",t[t.LEGACY_BEST_EFFORT=2]="LEGACY_BEST_EFFORT"})(da||(da={})),T.util.setEnumType(da,"google.protobuf.FeatureSet.JsonFormat",[{no:0,name:"JSON_FORMAT_UNKNOWN"},{no:1,name:"ALLOW"},{no:2,name:"LEGACY_BEST_EFFORT"}]);class Je extends O{constructor(e){super(),this.defaults=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Je().fromBinary(e,n)}static fromJson(e,n){return new Je().fromJson(e,n)}static fromJsonString(e,n){return new Je().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Je,e,n)}}Je.runtime=T,Je.typeName="google.protobuf.FeatureSetDefaults",Je.fields=T.util.newFieldList(()=>[{no:1,name:"defaults",kind:"message",T:Ce,repeated:!0},{no:4,name:"minimum_edition",kind:"enum",T:T.getEnumType(Z),opt:!0},{no:5,name:"maximum_edition",kind:"enum",T:T.getEnumType(Z),opt:!0}]);class Ce extends O{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Ce().fromBinary(e,n)}static fromJson(e,n){return new Ce().fromJson(e,n)}static fromJsonString(e,n){return new Ce().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ce,e,n)}}Ce.runtime=T,Ce.typeName="google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault",Ce.fields=T.util.newFieldList(()=>[{no:3,name:"edition",kind:"enum",T:T.getEnumType(Z),opt:!0},{no:4,name:"overridable_features",kind:"message",T:x,opt:!0},{no:5,name:"fixed_features",kind:"message",T:x,opt:!0}]);class Ne extends O{constructor(e){super(),this.location=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ne().fromBinary(e,n)}static fromJson(e,n){return new Ne().fromJson(e,n)}static fromJsonString(e,n){return new Ne().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ne,e,n)}}Ne.runtime=T,Ne.typeName="google.protobuf.SourceCodeInfo",Ne.fields=T.util.newFieldList(()=>[{no:1,name:"location",kind:"message",T:Pe,repeated:!0}]);class Pe extends O{constructor(e){super(),this.path=[],this.span=[],this.leadingDetachedComments=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Pe().fromBinary(e,n)}static fromJson(e,n){return new Pe().fromJson(e,n)}static fromJsonString(e,n){return new Pe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Pe,e,n)}}Pe.runtime=T,Pe.typeName="google.protobuf.SourceCodeInfo.Location",Pe.fields=T.util.newFieldList(()=>[{no:1,name:"path",kind:"scalar",T:5,repeated:!0,packed:!0},{no:2,name:"span",kind:"scalar",T:5,repeated:!0,packed:!0},{no:3,name:"leading_comments",kind:"scalar",T:9,opt:!0},{no:4,name:"trailing_comments",kind:"scalar",T:9,opt:!0},{no:6,name:"leading_detached_comments",kind:"scalar",T:9,repeated:!0}]);class ze extends O{constructor(e){super(),this.annotation=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new ze().fromBinary(e,n)}static fromJson(e,n){return new ze().fromJson(e,n)}static fromJsonString(e,n){return new ze().fromJsonString(e,n)}static equals(e,n){return T.util.equals(ze,e,n)}}ze.runtime=T,ze.typeName="google.protobuf.GeneratedCodeInfo",ze.fields=T.util.newFieldList(()=>[{no:1,name:"annotation",kind:"message",T:De,repeated:!0}]);class De extends O{constructor(e){super(),this.path=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new De().fromBinary(e,n)}static fromJson(e,n){return new De().fromJson(e,n)}static fromJsonString(e,n){return new De().fromJsonString(e,n)}static equals(e,n){return T.util.equals(De,e,n)}}De.runtime=T,De.typeName="google.protobuf.GeneratedCodeInfo.Annotation",De.fields=T.util.newFieldList(()=>[{no:1,name:"path",kind:"scalar",T:5,repeated:!0,packed:!0},{no:2,name:"source_file",kind:"scalar",T:9,opt:!0},{no:3,name:"begin",kind:"scalar",T:5,opt:!0},{no:4,name:"end",kind:"scalar",T:5,opt:!0},{no:5,name:"semantic",kind:"enum",T:T.getEnumType(la),opt:!0}]);var la;(function(t){t[t.NONE=0]="NONE",t[t.SET=1]="SET",t[t.ALIAS=2]="ALIAS"})(la||(la={})),T.util.setEnumType(la,"google.protobuf.GeneratedCodeInfo.Annotation.Semantic",[{no:0,name:"NONE"},{no:1,name:"SET"},{no:2,name:"ALIAS"}]);class S extends O{constructor(e){super(),this.seconds=V.zero,this.nanos=0,s.util.initPartial(e,this)}fromJson(e,n){if(typeof e!="string")throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${s.json.debug(e)}`);const a=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!a)throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");const o=Date.parse(a[1]+"-"+a[2]+"-"+a[3]+"T"+a[4]+":"+a[5]+":"+a[6]+(a[8]?a[8]:"Z"));if(Number.isNaN(o))throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");if(o<Date.parse("0001-01-01T00:00:00Z")||o>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");return this.seconds=V.parse(o/1e3),this.nanos=0,a[7]&&(this.nanos=parseInt("1"+a[7]+"0".repeat(9-a[7].length))-1e9),this}toJson(e){const n=Number(this.seconds)*1e3;if(n<Date.parse("0001-01-01T00:00:00Z")||n>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");if(this.nanos<0)throw new Error("cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative");let a="Z";if(this.nanos>0){const o=(this.nanos+1e9).toString().substring(1);o.substring(3)==="000000"?a="."+o.substring(0,3)+"Z":o.substring(6)==="000"?a="."+o.substring(0,6)+"Z":a="."+o+"Z"}return new Date(n).toISOString().replace(".000Z",a)}toDate(){return new Date(Number(this.seconds)*1e3+Math.ceil(this.nanos/1e6))}static now(){return S.fromDate(new Date)}static fromDate(e){const n=e.getTime();return new S({seconds:V.parse(Math.floor(n/1e3)),nanos:n%1e3*1e6})}static fromBinary(e,n){return new S().fromBinary(e,n)}static fromJson(e,n){return new S().fromJson(e,n)}static fromJsonString(e,n){return new S().fromJsonString(e,n)}static equals(e,n){return s.util.equals(S,e,n)}}S.runtime=s,S.typeName="google.protobuf.Timestamp",S.fields=s.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);class B extends O{constructor(e){super(),this.seconds=V.zero,this.nanos=0,s.util.initPartial(e,this)}fromJson(e,n){if(typeof e!="string")throw new Error(`cannot decode google.protobuf.Duration from JSON: ${s.json.debug(e)}`);const a=e.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/);if(a===null)throw new Error(`cannot decode google.protobuf.Duration from JSON: ${s.json.debug(e)}`);const o=Number(a[1]);if(o>315576e6||o<-315576e6)throw new Error(`cannot decode google.protobuf.Duration from JSON: ${s.json.debug(e)}`);if(this.seconds=V.parse(o),typeof a[2]=="string"){const i=a[2]+"0".repeat(9-a[2].length);this.nanos=parseInt(i),(o<0||Object.is(o,-0))&&(this.nanos=-this.nanos)}return this}toJson(e){if(Number(this.seconds)>315576e6||Number(this.seconds)<-315576e6)throw new Error("cannot encode google.protobuf.Duration to JSON: value out of range");let n=this.seconds.toString();if(this.nanos!==0){let a=Math.abs(this.nanos).toString();a="0".repeat(9-a.length)+a,a.substring(3)==="000000"?a=a.substring(0,3):a.substring(6)==="000"&&(a=a.substring(0,6)),n+="."+a,this.nanos<0&&Number(this.seconds)==0&&(n="-"+n)}return n+"s"}static fromBinary(e,n){return new B().fromBinary(e,n)}static fromJson(e,n){return new B().fromJson(e,n)}static fromJsonString(e,n){return new B().fromJsonString(e,n)}static equals(e,n){return s.util.equals(B,e,n)}}B.runtime=s,B.typeName="google.protobuf.Duration",B.fields=s.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);class K extends O{constructor(e){super(),this.typeUrl="",this.value=new Uint8Array(0),s.util.initPartial(e,this)}toJson(e){var n;if(this.typeUrl==="")return{};const a=this.typeUrlToName(this.typeUrl),o=(n=e?.typeRegistry)===null||n===void 0?void 0:n.findMessage(a);if(!o)throw new Error(`cannot encode message google.protobuf.Any to JSON: "${this.typeUrl}" is not in the type registry`);let r=o.fromBinary(this.value).toJson(e);return(a.startsWith("google.protobuf.")||r===null||Array.isArray(r)||typeof r!="object")&&(r={value:r}),r["@type"]=this.typeUrl,r}fromJson(e,n){var a;if(e===null||Array.isArray(e)||typeof e!="object")throw new Error(`cannot decode message google.protobuf.Any from JSON: expected object but got ${e===null?"null":Array.isArray(e)?"array":typeof e}`);if(Object.keys(e).length==0)return this;const o=e["@type"];if(typeof o!="string"||o=="")throw new Error('cannot decode message google.protobuf.Any from JSON: "@type" is empty');const i=this.typeUrlToName(o),r=(a=n?.typeRegistry)===null||a===void 0?void 0:a.findMessage(i);if(!r)throw new Error(`cannot decode message google.protobuf.Any from JSON: ${o} is not in the type registry`);let c;if(i.startsWith("google.protobuf.")&&Object.prototype.hasOwnProperty.call(e,"value"))c=r.fromJson(e.value,n);else{const l=Object.assign({},e);delete l["@type"],c=r.fromJson(l,n)}return this.packFrom(c),this}packFrom(e){this.value=e.toBinary(),this.typeUrl=this.typeNameToUrl(e.getType().typeName)}unpackTo(e){return this.is(e.getType())?(e.fromBinary(this.value),!0):!1}unpack(e){if(this.typeUrl==="")return;const n=e.findMessage(this.typeUrlToName(this.typeUrl));if(n)return n.fromBinary(this.value)}is(e){if(this.typeUrl==="")return!1;const n=this.typeUrlToName(this.typeUrl);let a="";return typeof e=="string"?a=e:a=e.typeName,n===a}typeNameToUrl(e){return`type.googleapis.com/${e}`}typeUrlToName(e){if(!e.length)throw new Error(`invalid type url: ${e}`);const n=e.lastIndexOf("/"),a=n>=0?e.substring(n+1):e;if(!a.length)throw new Error(`invalid type url: ${e}`);return a}static pack(e){const n=new K;return n.packFrom(e),n}static fromBinary(e,n){return new K().fromBinary(e,n)}static fromJson(e,n){return new K().fromJson(e,n)}static fromJsonString(e,n){return new K().fromJsonString(e,n)}static equals(e,n){return s.util.equals(K,e,n)}}K.runtime=s,K.typeName="google.protobuf.Any",K.fields=s.util.newFieldList(()=>[{no:1,name:"type_url",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:12}]);class Ae extends O{constructor(e){super(),this.paths=[],s.util.initPartial(e,this)}toJson(e){function n(a){let o=!1;const i=[];for(let r=0;r<a.length;r++){let c=a.charAt(r);switch(c){case"_":o=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":i.push(c),o=!1;break;default:o&&(o=!1,c=c.toUpperCase()),i.push(c);break}}return i.join("")}return this.paths.map(a=>{if(a.match(/_[0-9]?_/g)||a.match(/[A-Z]/g))throw new Error('cannot encode google.protobuf.FieldMask to JSON: lowerCamelCase of path name "'+a+'" is irreversible');return n(a)}).join(",")}fromJson(e,n){if(typeof e!="string")throw new Error("cannot decode google.protobuf.FieldMask from JSON: "+s.json.debug(e));if(e==="")return this;function a(o){if(o.includes("_"))throw new Error("cannot decode google.protobuf.FieldMask from JSON: path names must be lowerCamelCase");const i=o.replace(/[A-Z]/g,r=>"_"+r.toLowerCase());return i[0]==="_"?i.substring(1):i}return this.paths=e.split(",").map(a),this}static fromBinary(e,n){return new Ae().fromBinary(e,n)}static fromJson(e,n){return new Ae().fromJson(e,n)}static fromJsonString(e,n){return new Ae().fromJsonString(e,n)}static equals(e,n){return s.util.equals(Ae,e,n)}}Ae.runtime=s,Ae.typeName="google.protobuf.FieldMask",Ae.fields=s.util.newFieldList(()=>[{no:1,name:"paths",kind:"scalar",T:9,repeated:!0}]);var bn;(function(t){t[t.NULL_VALUE=0]="NULL_VALUE"})(bn||(bn={})),s.util.setEnumType(bn,"google.protobuf.NullValue",[{no:0,name:"NULL_VALUE"}]);class p extends O{constructor(e){super(),this.fields={},s.util.initPartial(e,this)}toJson(e){const n={};for(const[a,o]of Object.entries(this.fields))n[a]=o.toJson(e);return n}fromJson(e,n){if(typeof e!="object"||e==null||Array.isArray(e))throw new Error("cannot decode google.protobuf.Struct from JSON "+s.json.debug(e));for(const[a,o]of Object.entries(e))this.fields[a]=X.fromJson(o);return this}static fromBinary(e,n){return new p().fromBinary(e,n)}static fromJson(e,n){return new p().fromJson(e,n)}static fromJsonString(e,n){return new p().fromJsonString(e,n)}static equals(e,n){return s.util.equals(p,e,n)}}p.runtime=s,p.typeName="google.protobuf.Struct",p.fields=s.util.newFieldList(()=>[{no:1,name:"fields",kind:"map",K:9,V:{kind:"message",T:X}}]);class X extends O{constructor(e){super(),this.kind={case:void 0},s.util.initPartial(e,this)}toJson(e){switch(this.kind.case){case"nullValue":return null;case"numberValue":if(!Number.isFinite(this.kind.value))throw new Error("google.protobuf.Value cannot be NaN or Infinity");return this.kind.value;case"boolValue":return this.kind.value;case"stringValue":return this.kind.value;case"structValue":case"listValue":return this.kind.value.toJson(Object.assign(Object.assign({},e),{emitDefaultValues:!0}))}throw new Error("google.protobuf.Value must have a value")}fromJson(e,n){switch(typeof e){case"number":this.kind={case:"numberValue",value:e};break;case"string":this.kind={case:"stringValue",value:e};break;case"boolean":this.kind={case:"boolValue",value:e};break;case"object":e===null?this.kind={case:"nullValue",value:bn.NULL_VALUE}:Array.isArray(e)?this.kind={case:"listValue",value:me.fromJson(e)}:this.kind={case:"structValue",value:p.fromJson(e)};break;default:throw new Error("cannot decode google.protobuf.Value from JSON "+s.json.debug(e))}return this}static fromBinary(e,n){return new X().fromBinary(e,n)}static fromJson(e,n){return new X().fromJson(e,n)}static fromJsonString(e,n){return new X().fromJsonString(e,n)}static equals(e,n){return s.util.equals(X,e,n)}}X.runtime=s,X.typeName="google.protobuf.Value",X.fields=s.util.newFieldList(()=>[{no:1,name:"null_value",kind:"enum",T:s.getEnumType(bn),oneof:"kind"},{no:2,name:"number_value",kind:"scalar",T:1,oneof:"kind"},{no:3,name:"string_value",kind:"scalar",T:9,oneof:"kind"},{no:4,name:"bool_value",kind:"scalar",T:8,oneof:"kind"},{no:5,name:"struct_value",kind:"message",T:p,oneof:"kind"},{no:6,name:"list_value",kind:"message",T:me,oneof:"kind"}]);class me extends O{constructor(e){super(),this.values=[],s.util.initPartial(e,this)}toJson(e){return this.values.map(n=>n.toJson())}fromJson(e,n){if(!Array.isArray(e))throw new Error("cannot decode google.protobuf.ListValue from JSON "+s.json.debug(e));for(let a of e)this.values.push(X.fromJson(a));return this}static fromBinary(e,n){return new me().fromBinary(e,n)}static fromJson(e,n){return new me().fromJson(e,n)}static fromJsonString(e,n){return new me().fromJsonString(e,n)}static equals(e,n){return s.util.equals(me,e,n)}}me.runtime=s,me.typeName="google.protobuf.ListValue",me.fields=s.util.newFieldList(()=>[{no:1,name:"values",kind:"message",T:X,repeated:!0}]),u.Code=void 0,function(t){t[t.Canceled=1]="Canceled",t[t.Unknown=2]="Unknown",t[t.InvalidArgument=3]="InvalidArgument",t[t.DeadlineExceeded=4]="DeadlineExceeded",t[t.NotFound=5]="NotFound",t[t.AlreadyExists=6]="AlreadyExists",t[t.PermissionDenied=7]="PermissionDenied",t[t.ResourceExhausted=8]="ResourceExhausted",t[t.FailedPrecondition=9]="FailedPrecondition",t[t.Aborted=10]="Aborted",t[t.OutOfRange=11]="OutOfRange",t[t.Unimplemented=12]="Unimplemented",t[t.Internal=13]="Internal",t[t.Unavailable=14]="Unavailable",t[t.DataLoss=15]="DataLoss",t[t.Unauthenticated=16]="Unauthenticated"}(u.Code||(u.Code={}));function nr(t){const e=u.Code[t];return typeof e!="string"?t.toString():e[0].toLowerCase()+e.substring(1).replace(/[A-Z]/g,n=>"_"+n.toLowerCase())}class C extends Error{constructor(e,n=u.Code.Unknown,a,o,i){super(cR(e,n)),this.name="ConnectError",Object.setPrototypeOf(this,new.target.prototype),this.rawMessage=e,this.code=n,this.metadata=new Headers(a??{}),this.details=o??[],this.cause=i}static from(e,n=u.Code.Unknown){return e instanceof C?e:e instanceof Error?e.name=="AbortError"?new C(e.message,u.Code.Canceled):new C(e.message,n,void 0,void 0,e):new C(String(e),n,void 0,void 0,e)}static[Symbol.hasInstance](e){return e instanceof Error?Object.getPrototypeOf(e)===C.prototype?!0:e.name==="ConnectError"&&"code"in e&&typeof e.code=="number"&&"metadata"in e&&"details"in e&&Array.isArray(e.details)&&"rawMessage"in e&&typeof e.rawMessage=="string"&&"cause"in e:!1}findDetails(e){const n="typeName"in e?{findMessage:o=>o===e.typeName?e:void 0}:e,a=[];for(const o of this.details){if("getType"in o){n.findMessage(o.getType().typeName)&&a.push(o);continue}const i=n.findMessage(o.type);if(i)try{a.push(i.fromBinary(o.value))}catch{}}return a}}function cR(t,e){return t.length?`[${nr(e)}] ${t}`:`[${nr(e)}]`}function dR(t,e,n){try{const a=nt.dec(t);return e?e.fromBinary(a,n):a}catch(a){throw C.from(a,u.Code.DataLoss)}}function lR(t,e){const n={};for(const[a,o]of Object.entries(t.methods)){const i=e(Object.assign(Object.assign({},o),{localName:a,service:t}));i!=null&&(n[a]=i)}return n}const ar=1;function tr(t){let e,n=new Uint8Array(0);function a(o){const i=new Uint8Array(n.length+o.length);i.set(n),i.set(o,n.length),n=i}return new ReadableStream({start(){e=t.getReader()},async pull(o){let i;for(;;){if(i===void 0&&n.byteLength>=5){let l=0;for(let d=1;d<5;d++)l=(l<<8)+n[d];i={flags:n[0],length:l}}if(i!==void 0&&n.byteLength>=i.length+5)break;const c=await e.read();if(c.done)break;a(c.value)}if(i===void 0){if(n.byteLength==0){o.close();return}o.error(new C("premature end of stream",u.Code.DataLoss));return}const r=n.subarray(5,5+i.length);n=n.subarray(5+i.length),o.enqueue({flags:i.flags,data:r})}})}function sr(t,e){const n=new Uint8Array(e.length+5);n.set(e,5);const a=new DataView(n.buffer,n.byteOffset,n.byteLength);return a.setUint8(0,t),a.setUint32(1,e.length),n}var pR=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n);function a(i){n[i]=t[i]&&function(r){return new Promise(function(c,l){r=t[i](r),o(c,l,r.done,r.value)})}}function o(i,r,c,l){Promise.resolve(l).then(function(d){i({value:d,done:c})},r)}},On=function(t){return this instanceof On?(this.v=t,this):new On(t)},uR=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=n.apply(t,e||[]),o,i=[];return o={},c("next"),c("throw"),c("return",r),o[Symbol.asyncIterator]=function(){return this},o;function r(R){return function(E){return Promise.resolve(E).then(R,f)}}function c(R,E){a[R]&&(o[R]=function(w){return new Promise(function(N,J){i.push([R,w,N,J])>1||l(R,w)})},E&&(o[R]=E(o[R])))}function l(R,E){try{d(a[R](E))}catch(w){I(i[0][3],w)}}function d(R){R.value instanceof On?Promise.resolve(R.value.v).then(g,f):I(i[0][2],R)}function g(R){l("next",R)}function f(R){l("throw",R)}function I(R,E){R(E),i.shift(),i.length&&l(i[0][0],i[0][1])}},gR=function(t){var e,n;return e={},a("next"),a("throw",function(o){throw o}),a("return"),e[Symbol.iterator]=function(){return this},e;function a(o,i){e[o]=t[o]?function(r){return(n=!n)?{value:On(t[o](r)),done:!1}:i?i(r):r}:i}};function TR(){const t=[],e=[];let n,a,o,i=new Promise((l,d)=>{a=l,o=d}),r=!1;function c(){for(const l of t.splice(0,t.length))l({done:!0,value:void 0})}return{close(){r=!0,c()},async write(l){if(r)throw n??new Error("cannot write, WritableIterable already closed");const d=t.shift();if(d===void 0)e.push(l);else if(d({done:!1,value:l}),t.length>0)return;const g=e.length+1;for(let f=0;f<g;f++)await i},[Symbol.asyncIterator](){return{next(){a(),i=new Promise((f,I)=>{a=f,o=I});const l=e.shift();if(l!==void 0)return Promise.resolve({done:!1,value:l});if(r)return Promise.resolve({done:!0,value:void 0});let d;const g=new Promise(f=>d=f);return t.push(d),g},throw(l){return n=l,r=!0,e.splice(0,e.length),i.catch(()=>{}),o(n),c(),Promise.resolve({done:!0,value:void 0})},return(){return r=!0,e.splice(0,e.length),a(),i=Promise.reject(new Error("cannot write, consumer called return")),i.catch(()=>{}),c(),Promise.resolve({done:!0,value:void 0})}}}}}function st(t){return uR(this,arguments,function*(){yield On(yield*gR(pR(t)))})}var or=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n);function a(i){n[i]=t[i]&&function(r){return new Promise(function(c,l){r=t[i](r),o(c,l,r.done,r.value)})}}function o(i,r,c,l){Promise.resolve(l).then(function(d){i({value:d,done:c})},r)}},cn=function(t){return this instanceof cn?(this.v=t,this):new cn(t)},kR=function(t){var e,n;return e={},a("next"),a("throw",function(o){throw o}),a("return"),e[Symbol.iterator]=function(){return this},e;function a(o,i){e[o]=t[o]?function(r){return(n=!n)?{value:cn(t[o](r)),done:!1}:i?i(r):r}:i}},yR=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=n.apply(t,e||[]),o,i=[];return o={},c("next"),c("throw"),c("return",r),o[Symbol.asyncIterator]=function(){return this},o;function r(R){return function(E){return Promise.resolve(E).then(R,f)}}function c(R,E){a[R]&&(o[R]=function(w){return new Promise(function(N,J){i.push([R,w,N,J])>1||l(R,w)})},E&&(o[R]=E(o[R])))}function l(R,E){try{d(a[R](E))}catch(w){I(i[0][3],w)}}function d(R){R.value instanceof cn?Promise.resolve(R.value.v).then(g,f):I(i[0][2],R)}function g(R){l("next",R)}function f(R){l("throw",R)}function I(R,E){R(E),i.shift(),i.length&&l(i[0][0],i[0][1])}};function W(t,e){return lR(t,n=>{switch(n.kind){case m.Unary:return vR(e,t,n);case m.ServerStreaming:return hR(e,t,n);case m.ClientStreaming:return fR(e,t,n);case m.BiDiStreaming:return RR(e,t,n);default:return null}})}function vR(t,e,n){return async function(a,o){var i,r;const c=await t.unary(e,n,o?.signal,o?.timeoutMs,o?.headers,a,o?.contextValues);return(i=o?.onHeader)===null||i===void 0||i.call(o,c.header),(r=o?.onTrailer)===null||r===void 0||r.call(o,c.trailer),c.message}}function hR(t,e,n){return function(a,o){return ir(t.stream(e,n,o?.signal,o?.timeoutMs,o?.headers,st([a]),o?.contextValues),o)}}function fR(t,e,n){return async function(a,o){var i,r,c,l,d,g;const f=await t.stream(e,n,o?.signal,o?.timeoutMs,o?.headers,a,o?.contextValues);(d=o?.onHeader)===null||d===void 0||d.call(o,f.header);let I,R=0;try{for(var E=!0,w=or(f.message),N;N=await w.next(),i=N.done,!i;E=!0)l=N.value,E=!1,I=l,R++}catch(J){r={error:J}}finally{try{!E&&!i&&(c=w.return)&&await c.call(w)}finally{if(r)throw r.error}}if(!I)throw new C("protocol error: missing response message",u.Code.Unimplemented);if(R>1)throw new C("protocol error: received extra messages for client streaming method",u.Code.Unimplemented);return(g=o?.onTrailer)===null||g===void 0||g.call(o,f.trailer),I}}function RR(t,e,n){return function(a,o){return ir(t.stream(e,n,o?.signal,o?.timeoutMs,o?.headers,a,o?.contextValues),o)}}function ir(t,e){const n=function(){return yR(this,arguments,function*(){var a,o;const i=yield cn(t);(a=e?.onHeader)===null||a===void 0||a.call(e,i.header),yield cn(yield*kR(or(i.message))),(o=e?.onTrailer)===null||o===void 0||o.call(e,i.trailer)})}()[Symbol.asyncIterator]();return{[Symbol.asyncIterator]:()=>({next:()=>n.next()})}}function _R(...t){const e=new AbortController,n=t.filter(o=>o!==void 0).concat(e.signal);for(const o of n){if(o.aborted){a.apply(o);break}o.addEventListener("abort",a)}function a(){e.signal.aborted||e.abort(rr(this));for(const o of n)o.removeEventListener("abort",a)}return e}function SR(t){const e=new AbortController,n=()=>{e.abort(new C("the operation timed out",u.Code.DeadlineExceeded))};let a;return t!==void 0&&(t<=0?n():a=setTimeout(n,t)),{signal:e.signal,cleanup:()=>clearTimeout(a)}}function rr(t){if(!t.aborted)return;if(t.reason!==void 0)return t.reason;const e=new Error("This operation was aborted");return e.name="AbortError",e}function pa(){return{get(t){return t.id in this?this[t.id]:t.defaultValue},set(t,e){return this[t.id]=e,this},delete(t){return delete this[t.id],this}}}const ot=128;function mr(t){const e=new Headers,n=new TextDecoder().decode(t).split(`\r
|
|
3
3
|
`);for(const a of n){if(a==="")continue;const o=a.indexOf(":");if(o>0){const i=a.substring(0,o).trim(),r=a.substring(o+1).trim();e.append(i,r)}}return e}const IR="Content-Type",ER="Grpc-Timeout",dn="Grpc-Status",cr="Grpc-Message",MR="Grpc-Status-Details-Bin",bR="X-User-Agent",OR="X-Grpc-Web",wR="application/grpc-web+proto",CR="application/grpc-web+json";let ua=class $n extends O{constructor(e){super(),this.code=0,this.message="",this.details=[],s.util.initPartial(e,this)}static fromBinary(e,n){return new $n().fromBinary(e,n)}static fromJson(e,n){return new $n().fromJson(e,n)}static fromJsonString(e,n){return new $n().fromJsonString(e,n)}static equals(e,n){return s.util.equals($n,e,n)}};ua.runtime=s,ua.typeName="google.rpc.Status",ua.fields=s.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"details",kind:"message",T:K,repeated:!0}]);const NR="0";function dr(t){var e;const n=t.get(MR);if(n!=null){const o=dR(n,ua);if(o.code==0)return;const i=new C(o.message,o.code,t);return i.details=o.details.map(r=>({type:r.typeUrl.substring(r.typeUrl.lastIndexOf("/")+1),value:r.value})),i}const a=t.get(dn);if(a!=null){if(a===NR)return;const o=parseInt(a,10);return o in u.Code?new C(decodeURIComponent((e=t.get(cr))!==null&&e!==void 0?e:""),o,t):new C(`invalid grpc-status: ${a}`,u.Code.Internal,t)}}function lr(t,e,n){const a=typeof e=="string"?e:e.typeName,o=typeof n=="string"?n:n.name;return t.toString().replace(/\/?$/,`/${a}/${o}`)}function pr(t,e){return e instanceof t?e:new t(e)}function PR(t,e){function n(a){return a.done===!0?a:{done:a.done,value:pr(t,a.value)}}return{[Symbol.asyncIterator](){const a=e[Symbol.asyncIterator](),o={next:()=>a.next().then(n)};return a.throw!==void 0&&(o.throw=i=>a.throw(i).then(n)),a.return!==void 0&&(o.return=i=>a.return(i).then(n)),o}}}function ur(t,e){var n;return(n=e?.concat().reverse().reduce((a,o)=>o(a),t))!==null&&n!==void 0?n:t}function DR(t){var e;const n=Object.assign({},t);return(e=n.ignoreUnknownFields)!==null&&e!==void 0||(n.ignoreUnknownFields=!0),n}function it(t,e,n,a){const o=e?gr(t.I,a):Tr(t.I,n);return{parse:(e?gr(t.O,a):Tr(t.O,n)).parse,serialize:o.serialize}}function gr(t,e){return{parse(n){try{return t.fromBinary(n,e)}catch(a){const o=a instanceof Error?a.message:String(a);throw new C(`parse binary: ${o}`,u.Code.Internal)}},serialize(n){try{return n.toBinary(e)}catch(a){const o=a instanceof Error?a.message:String(a);throw new C(`serialize binary: ${o}`,u.Code.Internal)}}}}function Tr(t,e){var n,a;const o=(n=e?.textEncoder)!==null&&n!==void 0?n:new TextEncoder,i=(a=e?.textDecoder)!==null&&a!==void 0?a:new TextDecoder,r=DR(e);return{parse(c){try{const l=i.decode(c);return t.fromJsonString(l,r)}catch(l){throw C.from(l,u.Code.InvalidArgument)}},serialize(c){try{const l=c.toJsonString(r);return o.encode(l)}catch(l){throw C.from(l,u.Code.Internal)}}}}function kr(t){const e=ur(t.next,t.interceptors),[n,a,o]=vr(t),i=Object.assign(Object.assign({},t.req),{message:pr(t.req.method.I,t.req.message),signal:n});return e(i).then(r=>(o(),r),a)}function yr(t){const e=ur(t.next,t.interceptors),[n,a,o]=vr(t),i=Object.assign(Object.assign({},t.req),{message:PR(t.req.method.I,t.req.message),signal:n});let r=!1;return n.addEventListener("abort",function(){var c,l;const d=t.req.message[Symbol.asyncIterator]();r||(c=d.throw)===null||c===void 0||c.call(d,this.reason).catch(()=>{}),(l=d.return)===null||l===void 0||l.call(d).catch(()=>{})}),e(i).then(c=>Object.assign(Object.assign({},c),{message:{[Symbol.asyncIterator](){const l=c.message[Symbol.asyncIterator]();return{next(){return l.next().then(d=>(d.done==!0&&(r=!0,o()),d),a)}}}}}),a)}function vr(t){const{signal:e,cleanup:n}=SR(t.timeoutMs),a=_R(t.signal,e);return[a.signal,function(i){const r=C.from(e.aborted?rr(e):i);return a.abort(r),n(),Promise.reject(r)},function(){n(),a.abort()}]}var j=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},hr={},rt={},ga=j&&j.__assign||function(){return ga=Object.assign||function(t){for(var e,n=1,a=arguments.length;n<a;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},ga.apply(this,arguments)};Object.defineProperty(rt,"__esModule",{value:!0});var AR={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function UR(t){var e=ga(ga({},AR),t);return e.numOfAttempts<1&&(e.numOfAttempts=1),e}rt.getSanitizedOptions=UR;var mt={},ct={},Ta={},dt={},lt={};Object.defineProperty(lt,"__esModule",{value:!0});function qR(t){var e=Math.random()*t;return Math.round(e)}lt.fullJitter=qR;var pt={};Object.defineProperty(pt,"__esModule",{value:!0});function LR(t){return t}pt.noJitter=LR,Object.defineProperty(dt,"__esModule",{value:!0});var GR=lt,BR=pt;function FR(t){switch(t.jitter){case"full":return GR.fullJitter;case"none":default:return BR.noJitter}}dt.JitterFactory=FR,Object.defineProperty(Ta,"__esModule",{value:!0});var xR=dt,JR=function(){function t(e){this.options=e,this.attempt=0}return t.prototype.apply=function(){var e=this;return new Promise(function(n){return setTimeout(n,e.jitteredDelay)})},t.prototype.setAttemptNumber=function(e){this.attempt=e},Object.defineProperty(t.prototype,"jitteredDelay",{get:function(){var e=xR.JitterFactory(this.options);return e(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"delay",{get:function(){var e=this.options.startingDelay,n=this.options.timeMultiple,a=this.numOfDelayedAttempts,o=e*Math.pow(n,a);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),t}();Ta.Delay=JR;var zR=j&&j.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var i in o)o.hasOwnProperty(i)&&(a[i]=o[i])},t(e,n)};return function(e,n){t(e,n);function a(){this.constructor=e}e.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}}(),VR=j&&j.__awaiter||function(t,e,n,a){function o(i){return i instanceof n?i:new n(function(r){r(i)})}return new(n||(n=Promise))(function(i,r){function c(g){try{d(a.next(g))}catch(f){r(f)}}function l(g){try{d(a.throw(g))}catch(f){r(f)}}function d(g){g.done?i(g.value):o(g.value).then(c,l)}d((a=a.apply(t,e||[])).next())})},$R=j&&j.__generator||function(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,o,i,r;return r={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(r[Symbol.iterator]=function(){return this}),r;function c(d){return function(g){return l([d,g])}}function l(d){if(a)throw new TypeError("Generator is already executing.");for(;n;)try{if(a=1,o&&(i=d[0]&2?o.return:d[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,d[1])).done)return i;switch(o=0,i&&(d=[d[0]&2,i.value]),d[0]){case 0:case 1:i=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,o=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]<i[3])){n.label=d[1];break}if(d[0]===6&&n.label<i[1]){n.label=i[1],i=d;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(d);break}i[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(t,n)}catch(g){d=[6,g],o=0}finally{a=i=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}};Object.defineProperty(ct,"__esModule",{value:!0});var YR=Ta,WR=function(t){zR(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.apply=function(){return VR(this,void 0,void 0,function(){return $R(this,function(n){return[2,this.isFirstAttempt?!0:t.prototype.apply.call(this)]})})},Object.defineProperty(e.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),e}(YR.Delay);ct.SkipFirstDelay=WR;var ut={},jR=j&&j.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var i in o)o.hasOwnProperty(i)&&(a[i]=o[i])},t(e,n)};return function(e,n){t(e,n);function a(){this.constructor=e}e.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}}();Object.defineProperty(ut,"__esModule",{value:!0});var HR=Ta,KR=function(t){jR(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(HR.Delay);ut.AlwaysDelay=KR,Object.defineProperty(mt,"__esModule",{value:!0});var XR=ct,QR=ut;function ZR(t,e){var n=e1(t);return n.setAttemptNumber(e),n}mt.DelayFactory=ZR;function e1(t){return t.delayFirstAttempt?new QR.AlwaysDelay(t):new XR.SkipFirstDelay(t)}var gt=j&&j.__awaiter||function(t,e,n,a){function o(i){return i instanceof n?i:new n(function(r){r(i)})}return new(n||(n=Promise))(function(i,r){function c(g){try{d(a.next(g))}catch(f){r(f)}}function l(g){try{d(a.throw(g))}catch(f){r(f)}}function d(g){g.done?i(g.value):o(g.value).then(c,l)}d((a=a.apply(t,e||[])).next())})},Tt=j&&j.__generator||function(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,o,i,r;return r={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(r[Symbol.iterator]=function(){return this}),r;function c(d){return function(g){return l([d,g])}}function l(d){if(a)throw new TypeError("Generator is already executing.");for(;n;)try{if(a=1,o&&(i=d[0]&2?o.return:d[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,d[1])).done)return i;switch(o=0,i&&(d=[d[0]&2,i.value]),d[0]){case 0:case 1:i=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,o=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]<i[3])){n.label=d[1];break}if(d[0]===6&&n.label<i[1]){n.label=i[1],i=d;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(d);break}i[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(t,n)}catch(g){d=[6,g],o=0}finally{a=i=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}};Object.defineProperty(hr,"__esModule",{value:!0});var n1=rt,a1=mt;function t1(t,e){return e===void 0&&(e={}),gt(this,void 0,void 0,function(){var n,a;return Tt(this,function(o){switch(o.label){case 0:return n=n1.getSanitizedOptions(e),a=new s1(t,n),[4,a.execute()];case 1:return[2,o.sent()]}})})}var kt=hr.backOff=t1,s1=function(){function t(e,n){this.request=e,this.options=n,this.attemptNumber=0}return t.prototype.execute=function(){return gt(this,void 0,void 0,function(){var e,n;return Tt(this,function(a){switch(a.label){case 0:if(this.attemptLimitReached)return[3,7];a.label=1;case 1:return a.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return a.sent(),[4,this.request()];case 3:return[2,a.sent()];case 4:return e=a.sent(),this.attemptNumber++,[4,this.options.retry(e,this.attemptNumber)];case 5:if(n=a.sent(),!n||this.attemptLimitReached)throw e;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(t.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),t.prototype.applyDelay=function(){return gt(this,void 0,void 0,function(){var e;return Tt(this,function(n){switch(n.label){case 0:return e=a1.DelayFactory(this.options,this.attemptNumber),[4,e.apply()];case 1:return n.sent(),[2]}})})},t}();const fr=s.makeMessageType("proto.rpc.v1.Credentials",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"payload",kind:"scalar",T:9}]),yt=s.makeMessageType("proto.rpc.v1.AuthenticateRequest",()=>[{no:1,name:"entity",kind:"scalar",T:9},{no:2,name:"credentials",kind:"message",T:fr}]),o1=s.makeMessageType("proto.rpc.v1.AuthenticateResponse",()=>[{no:1,name:"access_token",kind:"scalar",T:9}]),i1=s.makeMessageType("proto.rpc.v1.AuthenticateToRequest",()=>[{no:1,name:"entity",kind:"scalar",T:9}]),r1=s.makeMessageType("proto.rpc.v1.AuthenticateToResponse",()=>[{no:1,name:"access_token",kind:"scalar",T:9}]),m1={typeName:"proto.rpc.v1.AuthService",methods:{authenticate:{name:"Authenticate",I:yt,O:o1,kind:m.Unary}}},c1={typeName:"proto.rpc.v1.ExternalAuthService",methods:{authenticateTo:{name:"AuthenticateTo",I:i1,O:r1,kind:m.Unary}}},ln=s.makeMessageType("google.rpc.Status",()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"details",kind:"message",T:K,repeated:!0}]),wn=s.makeMessageType("proto.rpc.webrtc.v1.ICECandidate",()=>[{no:1,name:"candidate",kind:"scalar",T:9},{no:2,name:"sdp_mid",kind:"scalar",T:9,opt:!0},{no:3,name:"sdpm_line_index",kind:"scalar",T:13,opt:!0},{no:4,name:"username_fragment",kind:"scalar",T:9,opt:!0}]),Rr=s.makeMessageType("proto.rpc.webrtc.v1.CallRequest",()=>[{no:1,name:"sdp",kind:"scalar",T:9},{no:2,name:"disable_trickle",kind:"scalar",T:8}]),d1=s.makeMessageType("proto.rpc.webrtc.v1.CallResponseInitStage",()=>[{no:1,name:"sdp",kind:"scalar",T:9}]),l1=s.makeMessageType("proto.rpc.webrtc.v1.CallResponseUpdateStage",()=>[{no:1,name:"candidate",kind:"message",T:wn}]),p1=s.makeMessageType("proto.rpc.webrtc.v1.CallResponse",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"init",kind:"message",T:d1,oneof:"stage"},{no:3,name:"update",kind:"message",T:l1,oneof:"stage"}]),ka=s.makeMessageType("proto.rpc.webrtc.v1.CallUpdateRequest",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"candidate",kind:"message",T:wn,oneof:"update"},{no:3,name:"done",kind:"scalar",T:8,oneof:"update"},{no:4,name:"error",kind:"message",T:ln,oneof:"update"}]),u1=s.makeMessageType("proto.rpc.webrtc.v1.CallUpdateResponse",[]),g1=s.makeMessageType("proto.rpc.webrtc.v1.ICEServer",()=>[{no:1,name:"urls",kind:"scalar",T:9,repeated:!0},{no:2,name:"username",kind:"scalar",T:9},{no:3,name:"credential",kind:"scalar",T:9}]),ya=s.makeMessageType("proto.rpc.webrtc.v1.WebRTCConfig",()=>[{no:1,name:"additional_ice_servers",kind:"message",T:g1,repeated:!0},{no:2,name:"disable_trickle",kind:"scalar",T:8}]),T1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestInitStage",()=>[{no:1,name:"sdp",kind:"scalar",T:9},{no:2,name:"optional_config",kind:"message",T:ya},{no:3,name:"deadline",kind:"message",T:S,opt:!0}]),k1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestUpdateStage",()=>[{no:1,name:"candidate",kind:"message",T:wn}]),y1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestDoneStage",[]),v1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestErrorStage",()=>[{no:1,name:"status",kind:"message",T:ln}]),h1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestHeartbeatStage",[]),f1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequest",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"init",kind:"message",T:T1,oneof:"stage"},{no:3,name:"update",kind:"message",T:k1,oneof:"stage"},{no:4,name:"done",kind:"message",T:y1,oneof:"stage"},{no:5,name:"error",kind:"message",T:v1,oneof:"stage"},{no:6,name:"heartbeat",kind:"message",T:h1,oneof:"stage"}]),R1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseInitStage",()=>[{no:1,name:"sdp",kind:"scalar",T:9}]),_1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseUpdateStage",()=>[{no:1,name:"candidate",kind:"message",T:wn}]),S1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseDoneStage",[]),I1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseErrorStage",()=>[{no:1,name:"status",kind:"message",T:ln}]),E1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponse",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"init",kind:"message",T:R1,oneof:"stage"},{no:3,name:"update",kind:"message",T:_1,oneof:"stage"},{no:4,name:"done",kind:"message",T:S1,oneof:"stage"},{no:5,name:"error",kind:"message",T:I1,oneof:"stage"}]),M1=s.makeMessageType("proto.rpc.webrtc.v1.OptionalWebRTCConfigRequest",[]),b1=s.makeMessageType("proto.rpc.webrtc.v1.OptionalWebRTCConfigResponse",()=>[{no:1,name:"config",kind:"message",T:ya}]),O1={typeName:"proto.rpc.webrtc.v1.SignalingService",methods:{call:{name:"Call",I:Rr,O:p1,kind:m.ServerStreaming},callUpdate:{name:"CallUpdate",I:ka,O:u1,kind:m.Unary},answer:{name:"Answer",I:E1,O:f1,kind:m.BiDiStreaming},optionalWebRTCConfig:{name:"OptionalWebRTCConfig",I:M1,O:b1,kind:m.Unary}}},_r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",vt=(t="")=>{const e=t;let n="";for(let a=0,o,i=0,r=_r;e.charAt(Math.trunc(i))||(r="=",i%1);n+=r.charAt(63&a>>8-i%1*8)){if(o=e.charCodeAt(i+=3/4),o>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");a=a<<8|o}return n},Sr=(t="")=>{const e=t.replace(/=+$/,"");let n="";if(e.length%4===1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(let a=0,o=0,i,r=0;i=e.charAt(r++);~i&&(o=a%4?o*64+i:i,a++%4)?n+=String.fromCharCode(255&o>>(-2*a&6)):0)i=_r.indexOf(i);return n},ht=(t,e)=>{const n={sdp:t?.sdp,type:t?.type};if(e)for(const[a,o]of Object.entries(e))n.sdp=[n.sdp,`a=${a}:${o}\r
|
|
4
|
-
`].join("");return n},w1=async(t,e,n)=>{const a=e??{iceServers:[{urls:"stun:global.stun.twilio.com:3478"}]},o=new RTCPeerConnection(a);let i;const r=new Promise(f=>{i=f}),c=o.createDataChannel("data",{id:0,negotiated:!0,ordered:!0});c.binaryType="arraybuffer";const l=o.createDataChannel("negotiation",{id:1,negotiated:!0,ordered:!0});l.binaryType="arraybuffer";let d=!1;if(l.addEventListener("open",()=>{d=!0}),l.addEventListener("message",f=>{(async()=>{const I=new RTCSessionDescription(JSON.parse(Sr(f.data)));if(await o.setRemoteDescription(I),I.type==="offer"){await o.setLocalDescription();const R=ht(o.localDescription,n);l.send(vt(JSON.stringify(R)))}})().catch(console.error)}),o.addEventListener("negotiationneeded",()=>{(async()=>{if(!d)return;await o.setLocalDescription();const f=ht(o.localDescription,n);l.send(vt(JSON.stringify(f)))})().catch(console.error)}),!t)return{pc:o,dc:c};const g=await o.createOffer({});return await o.setLocalDescription(g),o.addEventListener("icecandidate",f=>{f.candidate===null&&i({pc:o,dc:c})}),r};function C1(){try{new Headers}catch{throw new Error("connect-web requires the fetch API. Are you running on an old version of Node.js? Node.js is not supported in Connect for Web - please stay tuned for Connect for Node.")}}function Ir(t,e){const n=dr(t);if(n)throw e.forEach((a,o)=>{n.metadata.append(o,a)}),n;if(!e.has(dn)&&!t.has(dn))throw new C("protocol error: missing status",u.Code.Internal)}function Er(t,e,n,a){const o=new Headers(n??{});return o.set(IR,t?wR:CR),o.set(OR,"1"),o.set(bR,"connect-es/1.6.1"),e!==void 0&&o.set(ER,`${e}m`),o}function N1(t){switch(t){case 400:return u.Code.Internal;case 401:return u.Code.Unauthenticated;case 403:return u.Code.PermissionDenied;case 404:return u.Code.Unimplemented;case 429:return u.Code.Unavailable;case 502:return u.Code.Unavailable;case 503:return u.Code.Unavailable;case 504:return u.Code.Unavailable;default:return u.Code.Unknown}}function Mr(t,e){var n;if(t>=200&&t<300)return{foundStatus:e.has(dn),headerError:dr(e)};throw new C(decodeURIComponent((n=e.get(cr))!==null&&n!==void 0?n:`HTTP ${t}`),N1(t),e)}var Xe=function(t){return this instanceof Xe?(this.v=t,this):new Xe(t)},P1=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=n.apply(t,e||[]),o,i=[];return o={},c("next"),c("throw"),c("return",r),o[Symbol.asyncIterator]=function(){return this},o;function r(R){return function(E){return Promise.resolve(E).then(R,f)}}function c(R,E){a[R]&&(o[R]=function(w){return new Promise(function(N,J){i.push([R,w,N,J])>1||l(R,w)})},E&&(o[R]=E(o[R])))}function l(R,E){try{d(a[R](E))}catch(w){I(i[0][3],w)}}function d(R){R.value instanceof Xe?Promise.resolve(R.value.v).then(g,f):I(i[0][2],R)}function g(R){l("next",R)}function f(R){l("throw",R)}function I(R,E){R(E),i.shift(),i.length&&l(i[0][0],i[0][1])}};function D1(t){var e;C1();const n=(e=t.useBinaryFormat)!==null&&e!==void 0?e:!0;return{async unary(a,o,i,r,c,l,d){var g;const{serialize:f,parse:I}=it(o,n,t.jsonOptions,t.binaryOptions);return r=r===void 0?t.defaultTimeoutMs:r<=0?void 0:r,await kr({interceptors:t.interceptors,signal:i,timeoutMs:r,req:{stream:!1,service:a,method:o,url:lr(t.baseUrl,a,o),init:{method:"POST",credentials:(g=t.credentials)!==null&&g!==void 0?g:"same-origin",redirect:"error",mode:"cors"},header:Er(n,r,c),contextValues:d??pa(),message:l},next:async R=>{var E;const N=await((E=t.fetch)!==null&&E!==void 0?E:globalThis.fetch)(R.url,Object.assign(Object.assign({},R.init),{headers:R.header,signal:R.signal,body:sr(0,f(R.message))})),{headerError:J}=Mr(N.status,N.headers);if(!N.body)throw J!==void 0?J:"missing response body";const y=tr(N.body).getReader();let h,k;for(;;){const v=await y.read();if(v.done)break;const{flags:b,data:M}=v.value;if((b&ar)===ar)throw new C("protocol error: received unsupported compressed output",u.Code.Internal);if(b===ot){if(h!==void 0)throw"extra trailer";h=mr(M);continue}if(k!==void 0)throw new C("extra message",u.Code.Unimplemented);k=I(M)}if(h===void 0)throw J!==void 0?J:new C("missing trailer",N.headers.has(dn)?u.Code.Unimplemented:u.Code.Unknown);if(Ir(h,N.headers),k===void 0)throw new C("missing message",h.has(dn)?u.Code.Unimplemented:u.Code.Unknown);return{stream:!1,service:a,method:o,header:N.headers,message:k,trailer:h}}})},async stream(a,o,i,r,c,l,d){var g;const{serialize:f,parse:I}=it(o,n,t.jsonOptions,t.binaryOptions);function R(w,N,J,y,h){return P1(this,arguments,function*(){const v=tr(w).getReader();if(N){if(!(yield Xe(v.read())).done)throw"extra data for trailers-only";return yield Xe(void 0)}let b=!1;for(;;){const M=yield Xe(v.read());if(M.done)break;const{flags:ne,data:q}=M.value;if((ne&ot)===ot){if(b)throw"extra trailer";b=!0;const z=mr(q);Ir(z,y),z.forEach((vi,hi)=>J.set(hi,vi));continue}if(b)throw"extra message";yield yield Xe(I(q))}if("throwIfAborted"in h&&h.throwIfAborted(),!b)throw"missing trailer"})}async function E(w){if(o.kind!=m.ServerStreaming)throw"The fetch API does not support streaming request bodies";const N=await w[Symbol.asyncIterator]().next();if(N.done==!0)throw"missing request message";return sr(0,f(N.value))}return r=r===void 0?t.defaultTimeoutMs:r<=0?void 0:r,yr({interceptors:t.interceptors,signal:i,timeoutMs:r,req:{stream:!0,service:a,method:o,url:lr(t.baseUrl,a,o),init:{method:"POST",credentials:(g=t.credentials)!==null&&g!==void 0?g:"same-origin",redirect:"error",mode:"cors"},header:Er(n,r,c),contextValues:d??pa(),message:l},next:async w=>{var N;const y=await((N=t.fetch)!==null&&N!==void 0?N:globalThis.fetch)(w.url,Object.assign(Object.assign({},w.init),{headers:w.header,signal:w.signal,body:await E(w.message)})),{foundStatus:h,headerError:k}=Mr(y.status,y.headers);if(k!=null)throw k;if(!y.body)throw"missing response body";const v=new Headers;return Object.assign(Object.assign({},w),{header:y.headers,trailer:v,message:R(y.body,h,v,y.headers,w.signal)})}})}}}const va=s.makeMessageType("proto.rpc.webrtc.v1.PacketMessage",()=>[{no:1,name:"data",kind:"scalar",T:12},{no:2,name:"eom",kind:"scalar",T:8}]),ft=s.makeMessageType("proto.rpc.webrtc.v1.Stream",()=>[{no:1,name:"id",kind:"scalar",T:4}]),Rt=s.makeMessageType("proto.rpc.webrtc.v1.Request",()=>[{no:1,name:"stream",kind:"message",T:ft},{no:2,name:"headers",kind:"message",T:br,oneof:"type"},{no:3,name:"message",kind:"message",T:_t,oneof:"type"},{no:4,name:"rst_stream",kind:"scalar",T:8,oneof:"type"}]),br=s.makeMessageType("proto.rpc.webrtc.v1.RequestHeaders",()=>[{no:1,name:"method",kind:"scalar",T:9},{no:2,name:"metadata",kind:"message",T:ha},{no:3,name:"timeout",kind:"message",T:B}]),_t=s.makeMessageType("proto.rpc.webrtc.v1.RequestMessage",()=>[{no:1,name:"has_message",kind:"scalar",T:8},{no:2,name:"packet_message",kind:"message",T:va},{no:3,name:"eos",kind:"scalar",T:8}]),A1=s.makeMessageType("proto.rpc.webrtc.v1.Response",()=>[{no:1,name:"stream",kind:"message",T:ft},{no:2,name:"headers",kind:"message",T:U1,oneof:"type"},{no:3,name:"message",kind:"message",T:q1,oneof:"type"},{no:4,name:"trailers",kind:"message",T:L1,oneof:"type"}]),U1=s.makeMessageType("proto.rpc.webrtc.v1.ResponseHeaders",()=>[{no:1,name:"metadata",kind:"message",T:ha}]),q1=s.makeMessageType("proto.rpc.webrtc.v1.ResponseMessage",()=>[{no:1,name:"packet_message",kind:"message",T:va}]),L1=s.makeMessageType("proto.rpc.webrtc.v1.ResponseTrailers",()=>[{no:1,name:"status",kind:"message",T:ln},{no:2,name:"metadata",kind:"message",T:ha}]),Or=s.makeMessageType("proto.rpc.webrtc.v1.Strings",()=>[{no:1,name:"values",kind:"scalar",T:9,repeated:!0}]),ha=s.makeMessageType("proto.rpc.webrtc.v1.Metadata",()=>[{no:1,name:"md",kind:"map",K:9,V:{kind:"message",T:Or}}]);class ce extends Error{name="ConnectionClosedError";constructor(e){super(e),Object.setPrototypeOf(this,ce.prototype)}static isError(e){return e instanceof ce||e instanceof C&&e.rawMessage==="closed"?!0:typeof e=="string"?e==="Response closed without headers":e instanceof Error?e.message==="Response closed without headers":!1}}class G1{ready;peerConn;dataChannel;pResolve;pReject;closed=!1;closedReason;maxDataChannelSize=65535;constructor(e,n){this.peerConn=e,this.dataChannel=n,this.ready=new Promise((a,o)=>{this.pResolve=a,this.pReject=o}),n.addEventListener("open",()=>this.onChannelOpen()),n.addEventListener("close",()=>this.onChannelClose()),n.addEventListener("error",a=>{this.onChannelError(a)}),e.addEventListener("iceconnectionstatechange",()=>{const a=e.iceConnectionState;(a==="failed"||a==="disconnected"||a==="closed")&&this.pReject?.(new Error(`ICE connection failed with state: ${a}`))})}isClosed(){return this.closed}isClosedReason(){return this.closedReason}closeWithReason(e){this.closed||(this.closed=!0,this.closedReason=e,this.pReject?.(e),this.peerConn.close(),this.dataChannel.close())}onChannelOpen(){this.pResolve?.(void 0)}onChannelClose(){this.closeWithReason(new ce("data channel closed"))}onChannelError(e){console.error("channel error",e),this.closeWithReason(new Error(JSON.stringify(e)))}write(e){this.dataChannel.send(e.toBinary())}}const wr=33554432;class B1{grpcStream;onDone;closed=!1;packetBuf=[];packetBufSize=0;constructor(e,n){this.grpcStream=e,this.onDone=n}closeWithRecvError(){this.closed||(this.closed=!0,this.onDone(this.grpcStream.id))}processPacketMessage(e){const{data:n}=e;if(n.length+this.packetBufSize>wr){this.packetBuf.length=0,this.packetBufSize=0,console.error(`message size larger than max ${wr}; discarding`);return}if(this.packetBuf.push(n),this.packetBufSize+=n.length,e.eom){const a=new Uint8Array(this.packetBufSize);let o=0;for(const i of this.packetBuf)a.set(i,o),o+=i.length;return this.packetBuf.length=0,this.packetBufSize=0,a}}}const F1=16373;class Cr extends B1{channel;service;method;parseMessage;requestHeaders;headersReceived=!1;trailersReceived=!1;constructor(e,n,a,o,i,r){super(n,a),this.channel=e,this.service=o,this.method=i;const{parse:c}=it(i,!0,void 0,void 0);this.parseMessage=c;const l=`/${o.typeName}/${i.name}`;this.requestHeaders=new br({method:l});const d=x1(Cn(r));d&&(this.requestHeaders.metadata=d)}startRequest(e){e&&e.addEventListener("abort",()=>{this.resetStream()});try{this.channel.writeHeaders(this.grpcStream,this.requestHeaders)}catch(n){console.error("error writing headers",n),this.closeWithRecvError()}}sendMessage(e){if(e){this.writeMessage(!1,e);return}this.writeMessage(!1,void 0)}resetStream(){if(!this.closed)try{this.channel.writeReset(this.grpcStream)}catch(e){console.error("error writing reset",e),this.closeWithRecvError()}}writeMessage(e,n){try{if(!n||n.length===0){const o=new va({eom:!0}),i=new _t({hasMessage:!!n,packetMessage:o,eos:e});this.channel.writeMessage(this.grpcStream,i);return}let a=n;for(;a.length>0;){const o=Math.min(a.length,F1),i=new va;i.data=a.slice(0,o),a=a.slice(o),a.length===0&&(i.eom=!0);const r=new _t({hasMessage:!!a,packetMessage:i,eos:e});this.channel.writeMessage(this.grpcStream,r)}}catch(a){console.error("error writing message",a),this.closeWithRecvError()}}onResponse(e){switch(e.type.case){case"headers":{if(this.headersReceived){console.error(`invariant: headers already received for ${this.grpcStream.id}`);return}if(this.trailersReceived){console.error(`invariant: headers received after trailers for ${this.grpcStream.id}`);return}this.processHeaders(e.type.value);break}case"message":{if(!this.headersReceived){console.error(`invariant: headers not yet received for ${this.grpcStream.id}`);return}if(this.trailersReceived){console.error(`invariant: headers received after trailers for ${this.grpcStream.id}`);return}this.processMessage(e.type.value);break}case"trailers":{this.processTrailers(e.type.value);break}default:{console.error("unknown response type",e.type.case);break}}}processHeaders(e){this.headersReceived=!0,this.onHeaders(e)}processMessage(e){if(!e.packetMessage)return;const n=super.processPacketMessage(e.packetMessage);n&&this.onMessage(n)}processTrailers(e){this.trailersReceived=!0;const{status:n}=e,a=n?n.code:0;if(this.onTrailers(e),a===0){this.closeWithRecvError();return}this.closeWithRecvError()}}const x1=t=>{if(!t)return;const e=new ha({md:Object.fromEntries([...t.entries()].map(([n,a])=>[n,new Or({values:[a]})]))});return Object.keys(e.md).length>0?e:void 0},St=t=>{const e=Object.entries(t?.md??{}).flatMap(([n,{values:a}])=>a.map(o=>[n,o]));return new Headers(e)};class J1 extends Cr{awaitingHeadersResult;gotHeaders=!1;respStream=TR();trailers=new Headers;respStreamQueue;async run(e,n,a,o){const r={req:{stream:!0,url:"",init:{},service:this.service,method:this.method,header:new Headers,contextValues:o??pa(),message:a},next:async c=>{const d=await new Promise((g,f)=>{this.awaitingHeadersResult={success:g,failure:f},this.startRequest(e),this.sendMessages(c.message).catch(I=>{console.error("error sending streaming message",I),this.closeWithRecvError()})});return{...c,header:d,trailer:this.trailers,message:this.respStream}}};return e&&(r.signal=e),n!==void 0&&(r.timeoutMs=n),yr(r)}async sendMessages(e){for await(const n of e)this.sendMessage(n.toBinary());this.writeMessage(!0,void 0)}onHeaders(e){this.gotHeaders=!0,this.awaitingHeadersResult?.success(St(e.metadata))}onTrailers(e){if(e.metadata?.md){for(const n in e.metadata.md)if(Object.hasOwn(e.metadata.md,n)){const a=e.metadata.md[n];for(const o of a?.values??[])this.trailers.append(n,o)}}if(this.respStream.close(),!e.status||e.status.code===0){if(this.gotHeaders)return;this.awaitingHeadersResult?.success(new Headers);return}this.gotHeaders||this.awaitingHeadersResult?.failure(e.status.message)}onMessage(e){const n=this.parseMessage(e);this.respStreamQueue=this.respStreamQueue?this.respStreamQueue.then(async()=>this.respStream.write(n)):this.respStream.write(n),this.respStreamQueue.catch(a=>{console.error(`error pushing received message into stream; failing: ${a}`),this.resetStream()})}}class z1 extends Cr{result;headers;message;async run(e,n,a,o){const r={req:{stream:!1,url:"",init:{},service:this.service,method:this.method,header:new Headers,contextValues:o??pa(),message:a},next:async c=>new Promise((l,d)=>{this.result={success:l,failure:d},this.startRequest(),this.sendMessage(c.message.toBinary())})};return e&&(r.signal=e),n!==void 0&&(r.timeoutMs=n),kr(r)}onHeaders(e){if(this.headers!==void 0){this.result?.failure(new Error("invariant: received headers more than once"));return}this.headers=St(e.metadata)}onTrailers(e){const n=St(e.metadata);if(!e.status||e.status.code===0){if(!this.headers){this.result?.failure(new Error("invariant: received trailers for successful unary request without headers"));return}if(this.message===void 0){this.result?.failure(new Error("invariant: received trailers for successful unary request without message"));return}this.result?.success({stream:!1,header:this.headers,message:this.message,trailer:n,service:this.service,method:this.method});return}this.result?.failure(e.status.message)}onMessage(e){if(this.message!==void 0){this.result?.failure(new Error("invariant: received two response messages for unary request"));return}this.message=this.parseMessage(e)}}const V1=256;class $1 extends G1{streamIDCounter=0;streams=new Map;constructor(e,n){super(e,n),n.addEventListener("message",a=>{this.onChannelMessage(a)}),e.addEventListener("iceconnectionstatechange",()=>{const a=e.iceConnectionState;(a==="failed"||a==="disconnected"||a==="closed")&&this.onConnectionTerminated()}),n.addEventListener("close",()=>this.onConnectionTerminated())}onConnectionTerminated(){this.closeWithReason(new ce("data channel closed"));for(const e of this.streams.values())e.cs.closeWithRecvError()}onChannelMessage(e){const n=A1.fromBinary(new Uint8Array(e.data)),{stream:a}=n;if(a===void 0){console.error("no stream id; discarding");return}const{id:o}=a,i=this.streams.get(o.toString());if(i===void 0){console.error("no stream for id; discarding","id",o);return}i.cs.onResponse(n)}nextStreamID(){const e=this.streamIDCounter;return this.streamIDCounter+=1,new ft({id:BigInt(e)})}newStream(e,n,a,o,i){if(this.isClosed())throw new ce("connection closed");let r=this.streams.get(n.id.toString());if(r!==void 0)throw new Error("invariant: stream should not exist yet");if(Object.keys(this.streams).length>V1)throw new Error("stream limit hit");const c=new e(this,n,l=>this.removeStreamByID(l),a,o,i);return r={cs:c},this.streams.set(n.id.toString(),r),c}removeStreamByID(e){this.streams.delete(e.toString())}writeHeaders(e,n){this.write(new Rt({stream:e,type:{case:"headers",value:n}}))}writeMessage(e,n){this.write(new Rt({stream:e,type:{case:"message",value:n}}))}writeReset(e){this.write(new Rt({stream:e,type:{case:"rstStream",value:!0}}))}async unary(e,n,a,o,i,r,c){return this.newStream(z1,this.nextStreamID(),e,n,i).run(a,o,r,c)}async stream(e,n,a,o,i,r,c){return this.newStream(J1,this.nextStreamID(),e,n,i).run(a,o,r,c)}}const fa="invariant: call uuid unset";class Y1{constructor(e,n,a,o,i){this.signalingClient=e,this.callOpts=n,this.pc=a,this.dc=o,this.dialOpts=i,this.clientChannel=new $1(this.pc,this.dc)}clientChannel;callUuid;sentDoneOrErrorOnce=!1;exchangeDone=!1;iceComplete=!1;haveInitResponse=!1;awaitingRemoteDescription;remoteDescriptionSet;numCallUpdates=0;maxCallUpdateDuration=0;totalCallUpdateDuration=0;async doExchange(){await this.setup();const e=ht(this.pc.localDescription,this.dialOpts?.additionalSdpFields),n=vt(JSON.stringify(e)),a=new Rr({sdp:n});this.dialOpts&&this.dialOpts.disableTrickleICE&&(a.disableTrickle=this.dialOpts.disableTrickleICE),this.clientChannel.ready.then(async()=>{this.exchangeDone=!0,await this.sendDone()}).catch(console.error);const o=this.signalingClient.call(a,this.callOpts),i=this.processCallResponses(o);return await Promise.all([this.clientChannel.ready,i]),this.clientChannel}async setup(){if(this.remoteDescriptionSet=new Promise((e,n)=>{this.awaitingRemoteDescription={success:e,failure:n}}),!this.dialOpts?.disableTrickleICE){const e=await this.pc.createOffer({});this.pc.addEventListener("iceconnectionstatechange",()=>{if(this.pc.iceConnectionState!=="completed"||this.numCallUpdates===0)return;const n=this.totalCallUpdateDuration/this.numCallUpdates;console.groupCollapsed("Caller update statistics"),console.table({num_updates:this.numCallUpdates,average_duration:`${n}ms`,max_duration:`${this.maxCallUpdateDuration}ms`}),console.groupEnd()}),this.pc.addEventListener("icecandidate",n=>{this.onLocalICECandidate(n).catch(a=>{console.error(`error processing local ICE candidate ${a}`)})}),await this.pc.setLocalDescription(e)}}terminate(e){this.clientChannel.closeWithReason(e)}async processCallResponses(e){try{for await(const n of e)switch(n.stage.case){case"init":{if(!await this.handleInitResponse(n.uuid,n.stage.value))return;break}case"update":{if(!await this.handleUpdateResponse(n.uuid,n.stage.value))return;break}default:{await this.sendError("unknown CallResponse stage");return}}}catch(n){this.handleInitError(n)}}handleInitError(e){if(!(this.exchangeDone||this.pc.iceConnectionState==="connected")){if(e instanceof C&&e.code===u.Code.Unimplemented){if(e.message==="Response closed without headers")throw new ce("failed to dial");if(this.clientChannel.isClosed())throw new ce("client channel is closed");console.error(e.message)}throw e}}async handleInitResponse(e,n){if(this.haveInitResponse)return await this.sendError("got init stage more than once"),!1;this.haveInitResponse=!0,this.callUuid=e;const a=new RTCSessionDescription(JSON.parse(Sr(n.sdp)));return this.clientChannel.isClosed()?(await this.sendError("client channel is closed"),!1):(await this.pc.setRemoteDescription(a),this.awaitingRemoteDescription?.success(!0),this.dialOpts?.disableTrickleICE?(this.exchangeDone=!0,await this.sendDone(),!1):!0)}async handleUpdateResponse(e,n){if(!this.haveInitResponse)return await this.sendError("got update stage before init stage"),!1;if(e!==this.callUuid)return await this.sendError(`uuid mismatch; have=${e} want=${this.callUuid}`),!1;if(n.candidate===void 0)return await this.sendError("no candidate"),!1;const a=W1(n.candidate);a.candidate!==void 0&&console.debug(`received remote ICE ${a.candidate}`);try{await this.pc.addIceCandidate(a)}catch(o){throw console.log("error adding ice candidate",o),await this.sendError(JSON.stringify(o)),o}return!0}async onLocalICECandidate(e){if(await this.remoteDescriptionSet,this.exchangeDone||this.pc.iceConnectionState==="connected"){e.candidate!==null&&console.info("Dropping ICE candidate - exchange done or already connected",{exchangeDone:this.exchangeDone,iceConnectionState:this.pc.iceConnectionState,candidate:e.candidate.candidate});return}if(e.candidate===null){console.info("ICE gathering complete"),this.iceComplete=!0,await this.sendDone();return}if(this.callUuid===void 0||this.callUuid==="")throw console.error(fa),new Error(fa);e.candidate.candidate!==void 0&&console.info(`Gathered local ICE ${e.candidate.candidate}`);const n=j1(e.candidate),a=new ka({uuid:this.callUuid,update:{case:"candidate",value:n}}),o=new Date;try{await this.signalingClient.callUpdate(a,this.callOpts),this.numCallUpdates+=1;const r=new Date().getTime()-o.getTime();r>this.maxCallUpdateDuration&&(this.maxCallUpdateDuration=r),this.totalCallUpdateDuration+=r}catch(i){if(this.exchangeDone||this.iceComplete||this.pc.iceConnectionState==="connected")return;console.error(i)}}async sendError(e){if(this.sentDoneOrErrorOnce)return;if(this.callUuid===void 0||this.callUuid==="")throw new Error(fa);this.sentDoneOrErrorOnce=!0;const n=new ka({uuid:this.callUuid,update:{case:"error",value:new ln({code:u.Code.Unknown,message:e})}});try{await this.signalingClient.callUpdate(n,this.callOpts)}catch(a){console.error("failed to send call update; continuing",a)}}async sendDone(){if(this.sentDoneOrErrorOnce)return;if(this.callUuid===void 0||this.callUuid==="")throw new Error(fa);this.sentDoneOrErrorOnce=!0;const e=new ka({uuid:this.callUuid,update:{case:"done",value:!0}});try{await this.signalingClient.callUpdate(e,this.callOpts)}catch(n){console.error(n)}}}const W1=t=>{const e={candidate:t.candidate};return t.sdpMid!==void 0&&(e.sdpMid=t.sdpMid),t.sdpmLineIndex!==void 0&&(e.sdpMLineIndex=t.sdpmLineIndex),t.usernameFragment!==void 0&&(e.usernameFragment=t.usernameFragment),e},j1=t=>{const e=new wn;return t.candidate!==void 0&&(e.candidate=t.candidate),t.sdpMid!==void 0&&t.sdpMid!==null&&(e.sdpMid=t.sdpMid),t.sdpMLineIndex!==void 0&&t.sdpMLineIndex!==null&&(e.sdpmLineIndex=t.sdpMLineIndex),t.usernameFragment!==void 0&&t.usernameFragment!==null&&(e.usernameFragment=t.usernameFragment),e};var Nr={exports:{}};(function(t,e){(function(n,a){t.exports=a()})(j,function(){return function(n){var a={};function o(i){if(a[i])return a[i].exports;var r=a[i]={i,l:!1,exports:{}};return n[i].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=n,o.c=a,o.d=function(i,r,c){o.o(i,r)||Object.defineProperty(i,r,{enumerable:!0,get:c})},o.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},o.t=function(i,r){if(1&r&&(i=o(i)),8&r||4&r&&typeof i=="object"&&i&&i.__esModule)return i;var c=Object.create(null);if(o.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:i}),2&r&&typeof i!="string")for(var l in i)o.d(c,l,function(d){return i[d]}.bind(null,l));return c},o.n=function(i){var r=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(r,"a",r),r},o.o=function(i,r){return Object.prototype.hasOwnProperty.call(i,r)},o.p="",o(o.s=0)}([function(n,a,o){o.r(a),o.d(a,"UuidTool",function(){return c}),o.d(a,"Uuid",function(){return r});var i={uuid:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i},r=function(){function l(d){this.id="",typeof d=="string"?this.fromString(d):Array.isArray(d)?this.fromBytes(d):this.generate()}return l.fromJson=function(d){if(typeof d=="string"&&(d=JSON.parse(d)),!d||!d.id)throw new TypeError("The input cannot be converted to Uuid.");return new l(d.id)},l.prototype.generate=function(){var d=new Array(16).fill(0).map(function(){return 256*Math.random()&255});return d[6]=79&(64|d[6]),this.fromBytes(d),this},l.prototype.fromBytes=function(d){return this.id=d.map(function(g){return("00"+g.toString(16)).slice(-2)}).join("").replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5"),this.id=this.toString(),this},l.prototype.toBytes=function(){return(this.id.replace(/-/g,"").match(/.{2}/g)||[]).map(function(d){return parseInt(d,16)})},l.prototype.fromString=function(d){return this.id=d.trim(),this.id=this.toString(),this},l.prototype.toString=function(){switch(l.stringExportFormat){default:case"lowercase":return this.id.toLowerCase();case"uppercase":return this.id.toUpperCase()}},l.prototype.isValid=function(){return typeof this.id=="string"&&this.id.length===36&&i.uuid.test(this.id)},l.prototype.equals=function(d){return typeof d=="string"&&(d=new l(d)),this.toString()===d.toString()},l.stringExportFormat="lowercase",l}(),c=function(){function l(){}return l.toBytes=function(d){return new r().fromString(d).toBytes()},l.toString=function(d){return new r().fromBytes(d).toString()},l.newUuid=function(){return new r().toString()},l.isUuid=function(d){return new r().fromString(d).isValid()},l.compare=function(d,g){return new r(d).equals(new r(g))},l}()}])})})(Nr);var Ra=Nr.exports;const _a=(t,e)=>globalThis.VIAM?.GRPC_TRACE_LOGGING===!0?{...t,unary:async(o,i,r,c,l,d,g)=>{const f=Ra.UuidTool.newUuid();console.trace(`Unary request ${f} : ${e}/${o.typeName}.${i.name}`);const I=await t.unary(o,i,r,c,l,d,g);return console.debug(`Unary response received: ${f}`),I},stream:async(o,i,r,c,l,d,g)=>{const f=Ra.UuidTool.newUuid();console.trace(`Stream request ${f} : ${e}/${o.typeName}.${i.name}`);const I=await t.stream(o,i,r,c,l,d,g);return console.debug(`Stream response received: ${f}`),I}}:t,Sa=async(t,e,n=!1)=>{Dr(e);const a=globalThis.VIAM?.GRPC_TRANSPORT_FACTORY??D1,o={baseUrl:t,credentials:"same-origin"};if(e?.accessToken!==void 0&&e.accessToken!==""&&!(e.externalAuthAddress!==void 0&&e.externalAuthAddress!==""&&e.externalAuthToEntity!==void 0&&e.externalAuthToEntity!=="")){const r=new Headers(e.extraHeaders);r.set("authorization",`Bearer ${e.accessToken}`);const c=new Pr(o,a,r);return _a(c,t)}if(e===void 0||e.credentials===void 0&&e.accessToken===void 0){n&&(o.credentials="include");const r=a(o);return _a(r,t)}const i=await H1(t,a,e,o);return _a(i,t)},It=/^.*:\/\//u,H1=async(t,e,n,a)=>{const o=new Headers(n.extraHeaders);let i;if(n.accessToken===void 0||n.accessToken===""){const r=new yt({entity:Un(n.credentials)&&n.credentials.authEntity?n.credentials.authEntity:t.replace(It,"")});n.credentials&&(r.credentials=new fr({type:n.credentials.type,payload:n.credentials.payload}));const c=n.externalAuthAddress??t,l=e({baseUrl:c});i=(await W(m1,l).authenticate(r)).accessToken}else i=n.accessToken;if(n.externalAuthAddress!==void 0&&n.externalAuthAddress!==""&&n.externalAuthToEntity!==void 0&&n.externalAuthToEntity!==""){const r=new Headers;r.set("authorization",`Bearer ${i}`),i="";const c=new yt({entity:n.externalAuthToEntity}),l=e({baseUrl:n.externalAuthAddress});i=(await W(c1,l).authenticateTo(c,{headers:r})).accessToken}return o.set("authorization",`Bearer ${i}`),new Pr(a,e,o)};class Pr{transport;extraHeaders;constructor(e,n,a){this.extraHeaders=a,this.transport=n(e)}unary=async(e,n,a,o,i,r,c)=>{const l=Cn(i);for(const[d,g]of this.extraHeaders)l.set(d,g);return this.transport.unary(e,n,a,o,l,r,c)};stream=async(e,n,a,o,i,r,c)=>{const l=Cn(i);for(const[d,g]of this.extraHeaders)l.set(d,g);return this.transport.stream(e,n,a,o,l,r,c)}}const Cn=t=>{const e=new Headers;if(t!==void 0)if(Array.isArray(t))for(const[n,a]of t)e.append(n,a);else if("forEach"in t)typeof t.forEach=="function"&&t.forEach((n,a)=>{e.append(a,n)});else for(const[n,a]of Object.entries(t))e.append(n,a);return e},K1=async(t,e,n=!1)=>{const a=await Sa(t,e,n);return W(O1,a)},X1=async(t,e)=>{try{return(await e.optionalWebRTCConfig({},t)).config??new ya}catch(n){if(n instanceof C&&n.code===u.Code.Unimplemented)return new ya;throw n}},Q1=async(t,e,n,a=!1)=>{const o=t.replace(/\/$/u,"");Dr(n);const i={headers:{"rpc-host":e}},r=e_(o,n),c=await K1(o,r,a),l=await Z1(c,i,n),{pc:d,dc:g}=await w1(l.disableTrickleICE,l.rtcConfig,l.additionalSdpFields);let f=!1;const I=new Y1(c,i,d,g,l);let R;n?.dialTimeout!==void 0&&n.dialTimeout>0&&(R=setTimeout(()=>{f||I.terminate(new Error("timed out"))},n.dialTimeout));try{const E=await I.doExchange();return n?.externalAuthAddress!==void 0&&n.externalAuthAddress!==""||n?.credentials?.type,f=!0,{transport:_a(E,e),peerConnection:d,dataChannel:g}}catch(E){throw console.error("error dialing",E),E}finally{R!==void 0&&(clearTimeout(R),R=void 0),f||(d.close(),g.close())}},Z1=async(t,e,n)=>{const a=await X1(e,t),o=a.additionalIceServers.map(c=>{const l=[];for(const d of c.urls)d.endsWith("udp")&&l.push(`${d.slice(0,-3)}tcp`),l.push(d);return{urls:l,credential:c.credential,username:c.username}}),i=n;let r;return i.webrtcOptions===void 0?r={disableTrickleICE:a.disableTrickle,rtcConfig:{iceServers:o}}:(r=JSON.parse(JSON.stringify(i.webrtcOptions)),r.rtcConfig===void 0?r.rtcConfig={iceServers:o}:r.rtcConfig.iceServers=[...r.rtcConfig.iceServers??[],...o]),r},e_=(t,e)=>{let n=e;return n={...e},e.accessToken===void 0&&(Un(n.credentials)&&!n.credentials.authEntity&&(n.credentials.authEntity=n.externalAuthAddress!==void 0&&n.externalAuthAddress!==""?n.externalAuthAddress.replace(It,""):t.replace(It,"")),n.credentials=e.webrtcOptions?.signalingCredentials,n.accessToken=e.webrtcOptions?.signalingAccessToken),n.externalAuthAddress=e.webrtcOptions?.signalingExternalAuthAddress,n.externalAuthToEntity=e.webrtcOptions?.signalingExternalAuthToEntity,n},Dr=t=>{if(t){if(t.accessToken!==void 0&&t.accessToken.length>0){if(t.credentials)throw new Error("cannot set credentials with accessToken");if(t.webrtcOptions?.signalingAccessToken!==void 0)throw new Error("cannot set webrtcOptions.signalingAccessToken with accessToken");if(t.webrtcOptions?.signalingCredentials!==void 0)throw new Error("cannot set webrtcOptions.signalingCredentials with accessToken")}if(t.webrtcOptions?.signalingAccessToken!==void 0&&t.webrtcOptions.signalingAccessToken.length>0&&t.webrtcOptions.signalingCredentials!==void 0)throw new Error("cannot set webrtcOptions.signalingCredentials with webrtcOptions.signalingAccessToken")}},n_="v0.1.518",Ar=s.makeEnum("viam.common.v1.KinematicsFileFormat",[{no:0,name:"KINEMATICS_FILE_FORMAT_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"KINEMATICS_FILE_FORMAT_SVA",localName:"SVA"},{no:2,name:"KINEMATICS_FILE_FORMAT_URDF",localName:"URDF"}]),F=s.makeMessageType("viam.common.v1.ResourceName",()=>[{no:1,name:"namespace",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"subtype",kind:"scalar",T:9},{no:4,name:"name",kind:"scalar",T:9}]),Ue=s.makeMessageType("viam.common.v1.Pose",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1},{no:4,name:"o_x",kind:"scalar",T:1},{no:5,name:"o_y",kind:"scalar",T:1},{no:6,name:"o_z",kind:"scalar",T:1},{no:7,name:"theta",kind:"scalar",T:1}]),Ur=s.makeMessageType("viam.common.v1.Orientation",()=>[{no:1,name:"o_x",kind:"scalar",T:1},{no:2,name:"o_y",kind:"scalar",T:1},{no:3,name:"o_z",kind:"scalar",T:1},{no:4,name:"theta",kind:"scalar",T:1}]),Ve=s.makeMessageType("viam.common.v1.PoseInFrame",()=>[{no:1,name:"reference_frame",kind:"scalar",T:9},{no:2,name:"pose",kind:"message",T:Ue}]),qe=s.makeMessageType("viam.common.v1.Vector3",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1}]),qr=s.makeMessageType("viam.common.v1.Sphere",()=>[{no:1,name:"radius_mm",kind:"scalar",T:1}]),Lr=s.makeMessageType("viam.common.v1.Capsule",()=>[{no:1,name:"radius_mm",kind:"scalar",T:1},{no:2,name:"length_mm",kind:"scalar",T:1}]),Gr=s.makeMessageType("viam.common.v1.RectangularPrism",()=>[{no:1,name:"dims_mm",kind:"message",T:qe}]),Ia=s.makeMessageType("viam.common.v1.Mesh",()=>[{no:1,name:"content_type",kind:"scalar",T:9},{no:2,name:"mesh",kind:"scalar",T:12}]),Br=s.makeMessageType("viam.common.v1.PointCloud",()=>[{no:1,name:"point_cloud",kind:"scalar",T:12}]),Qe=s.makeMessageType("viam.common.v1.Geometry",()=>[{no:1,name:"center",kind:"message",T:Ue},{no:2,name:"sphere",kind:"message",T:qr,oneof:"geometry_type"},{no:3,name:"box",kind:"message",T:Gr,oneof:"geometry_type"},{no:5,name:"capsule",kind:"message",T:Lr,oneof:"geometry_type"},{no:6,name:"mesh",kind:"message",T:Ia,oneof:"geometry_type"},{no:7,name:"pointcloud",kind:"message",T:Br,oneof:"geometry_type"},{no:4,name:"label",kind:"scalar",T:9}]),Et=s.makeMessageType("viam.common.v1.GeometriesInFrame",()=>[{no:1,name:"reference_frame",kind:"scalar",T:9},{no:2,name:"geometries",kind:"message",T:Qe,repeated:!0}]),Mt=s.makeMessageType("viam.common.v1.PointCloudObject",()=>[{no:1,name:"point_cloud",kind:"scalar",T:12},{no:2,name:"geometries",kind:"message",T:Et}]),$e=s.makeMessageType("viam.common.v1.GeoPoint",()=>[{no:1,name:"latitude",kind:"scalar",T:1},{no:2,name:"longitude",kind:"scalar",T:1}]),Ea=s.makeMessageType("viam.common.v1.GeoGeometry",()=>[{no:1,name:"location",kind:"message",T:$e},{no:2,name:"geometries",kind:"message",T:Qe,repeated:!0}]),Le=s.makeMessageType("viam.common.v1.Transform",()=>[{no:1,name:"reference_frame",kind:"scalar",T:9},{no:2,name:"pose_in_observer_frame",kind:"message",T:Ve},{no:3,name:"physical_object",kind:"message",T:Qe,opt:!0},{no:4,name:"uuid",kind:"scalar",T:12},{no:5,name:"metadata",kind:"message",T:p,opt:!0}]),Fr=s.makeMessageType("viam.common.v1.WorldState",()=>[{no:1,name:"obstacles",kind:"message",T:Et,repeated:!0},{no:3,name:"transforms",kind:"message",T:Le,repeated:!0}]),a_=s.makeMessageType("viam.common.v1.ActuatorStatus",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),xr=s.makeMessageType("viam.common.v1.ResponseMetadata",()=>[{no:1,name:"captured_at",kind:"message",T:S,opt:!0}]),P=s.makeMessageType("viam.common.v1.DoCommandRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"command",kind:"message",T:p}]),D=s.makeMessageType("viam.common.v1.DoCommandResponse",()=>[{no:1,name:"result",kind:"message",T:p}]),Nn=s.makeMessageType("viam.common.v1.GetKinematicsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ma=s.makeMessageType("viam.common.v1.GetKinematicsResponse",()=>[{no:1,name:"format",kind:"enum",T:s.getEnumType(Ar)},{no:2,name:"kinematics_data",kind:"scalar",T:12},{no:3,name:"meshes_by_urdf_filepath",kind:"map",K:9,V:{kind:"message",T:Ia}}]),L=s.makeMessageType("viam.common.v1.GetGeometriesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Y=s.makeMessageType("viam.common.v1.GetGeometriesResponse",()=>[{no:1,name:"geometries",kind:"message",T:Qe,repeated:!0}]),bt=s.makeMessageType("viam.common.v1.Get3DModelsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Jr=s.makeMessageType("viam.common.v1.Get3DModelsResponse",()=>[{no:1,name:"models",kind:"map",K:9,V:{kind:"message",T:Ia}}]),Ze=s.makeMessageType("viam.common.v1.GetReadingsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),ba=s.makeMessageType("viam.common.v1.GetReadingsResponse",()=>[{no:1,name:"readings",kind:"map",K:9,V:{kind:"message",T:X}}]),Pn=s.makeMessageType("viam.common.v1.LogEntry",()=>[{no:1,name:"host",kind:"scalar",T:9},{no:2,name:"level",kind:"scalar",T:9},{no:3,name:"time",kind:"message",T:S},{no:4,name:"logger_name",kind:"scalar",T:9},{no:5,name:"message",kind:"scalar",T:9},{no:6,name:"caller",kind:"message",T:p},{no:7,name:"stack",kind:"scalar",T:9},{no:8,name:"fields",kind:"message",T:p,repeated:!0}]),Ot=s.makeMessageType("viam.common.v1.AudioInfo",()=>[{no:1,name:"codec",kind:"scalar",T:9},{no:2,name:"sample_rate_hz",kind:"scalar",T:5},{no:3,name:"num_channels",kind:"scalar",T:5}]),Dn=s.makeMessageType("viam.common.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),wt=s.makeMessageType("viam.common.v1.GetPropertiesResponse",()=>[{no:1,name:"supported_codecs",kind:"scalar",T:9,repeated:!0},{no:2,name:"sample_rate_hz",kind:"scalar",T:5},{no:3,name:"num_channels",kind:"scalar",T:5}]),zr=s.makeExtension("viam.common.v1.safety_heartbeat_monitored",re,{no:84260,kind:"scalar",T:8,opt:!0}),Ct=Object.freeze(Object.defineProperty({__proto__:null,ActuatorStatus:a_,AudioInfo:Ot,Capsule:Lr,DoCommandRequest:P,DoCommandResponse:D,GeoGeometry:Ea,GeoPoint:$e,GeometriesInFrame:Et,Geometry:Qe,Get3DModelsRequest:bt,Get3DModelsResponse:Jr,GetGeometriesRequest:L,GetGeometriesResponse:Y,GetKinematicsRequest:Nn,GetKinematicsResponse:Ma,GetPropertiesRequest:Dn,GetPropertiesResponse:wt,GetReadingsRequest:Ze,GetReadingsResponse:ba,KinematicsFileFormat:Ar,LogEntry:Pn,Mesh:Ia,Orientation:Ur,PointCloud:Br,PointCloudObject:Mt,Pose:Ue,PoseInFrame:Ve,RectangularPrism:Gr,ResourceName:F,ResponseMetadata:xr,Sphere:qr,Transform:Le,Vector3:qe,WorldState:Fr,safety_heartbeat_monitored:zr},Symbol.toStringTag,{value:"Module"})),An=new Headers({viam_client:`typescript;v0.63.0;${n_}`}),A=async function(e,n,a,o={},i={}){const r=new P({name:n,command:a});o.requestLogger?.(r);const l=(await e(r,i)).result?.toJson();return l===void 0?{}:l},t_=(t,e)=>{const n=e??{headers:{}};let a="";if(t===void 0){const o="abcdefghijklmnopqrstuvwxyz";for(let i=0;i<6;i+=1)a+=o[Math.floor(Math.random()*26)]}else a=t;return n.headers.dtname=a,n},s_=t=>{if(t.headers){const{_:e,...n}=t.headers;t.headers=n}},o_=(t,e,n)=>{const a=n??{headers:{}};return a.headers[t]=e,a},i_=(t,e)=>{const{[e]:n,...a}=t.headers;t.headers=a},Vr=async function(e,n,a=p.fromJson({}),o={}){const i=new Nn({name:n,extra:a}),r=await e(i,o),l=new TextDecoder("utf8").decode(r.kinematicsData),d=JSON.parse(l);return{...d,kinematicsData:d,meshesByUrdfFilepath:r.meshesByUrdfFilepath}},$r=async function(e,n,a=p.fromJson({}),o={}){const i=new L({name:n,extra:a});return(await e(i,o)).geometries},Un=t=>t!==void 0&&"authEntity"in t,r_=async(t,e)=>e.type==="access-token"?Sa(t,{accessToken:e.payload,extraHeaders:An}):Sa(t,{credentials:e,extraHeaders:An}),Nt=1e4;var H=(t=>(t.CONNECTING="connecting",t.CONNECTED="connected",t.DISCONNECTING="disconnecting",t.DISCONNECTED="disconnected",t.DIALING="dialing",t))(H||{});class Yr{listeners={};on(e,n){const{listeners:a}=this;a[e]??=new Set,a[e]?.add(n)}once(e,n){const a=o=>{n(o),this.off(e,n)};this.on(e,a)}has(e,n){return this.listeners[e]?.has(n)}off(e,n){this.listeners[e]?.delete(n)}emit(e,n){for(const a of this.listeners[e]??[])a(n)}}const Pt=s.makeMessageType("viam.component.arm.v1.GetEndPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Wr=s.makeMessageType("viam.component.arm.v1.GetEndPositionResponse",()=>[{no:1,name:"pose",kind:"message",T:Ue}]),pn=s.makeMessageType("viam.component.arm.v1.JointPositions",()=>[{no:1,name:"values",kind:"scalar",T:1,repeated:!0}]),Dt=s.makeMessageType("viam.component.arm.v1.GetJointPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),jr=s.makeMessageType("viam.component.arm.v1.GetJointPositionsResponse",()=>[{no:1,name:"positions",kind:"message",T:pn}]),At=s.makeMessageType("viam.component.arm.v1.MoveToPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"to",kind:"message",T:Ue},{no:99,name:"extra",kind:"message",T:p}]),Hr=s.makeMessageType("viam.component.arm.v1.MoveToPositionResponse",[]),Ut=s.makeMessageType("viam.component.arm.v1.MoveToJointPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"positions",kind:"message",T:pn},{no:99,name:"extra",kind:"message",T:p}]),Kr=s.makeMessageType("viam.component.arm.v1.MoveToJointPositionsResponse",[]),Xr=s.makeMessageType("viam.component.arm.v1.MoveThroughJointPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"positions",kind:"message",T:pn,repeated:!0},{no:3,name:"options",kind:"message",T:nm,opt:!0},{no:99,name:"extra",kind:"message",T:p}]),Qr=s.makeMessageType("viam.component.arm.v1.MoveThroughJointPositionsResponse",[]),qt=s.makeMessageType("viam.component.arm.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Zr=s.makeMessageType("viam.component.arm.v1.StopResponse",[]),m_=s.makeMessageType("viam.component.arm.v1.Status",()=>[{no:1,name:"end_position",kind:"message",T:Ue},{no:2,name:"joint_positions",kind:"message",T:pn},{no:3,name:"is_moving",kind:"scalar",T:8}]),Lt=s.makeMessageType("viam.component.arm.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),em=s.makeMessageType("viam.component.arm.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),nm=s.makeMessageType("viam.component.arm.v1.MoveOptions",()=>[{no:1,name:"max_vel_degs_per_sec",kind:"scalar",T:1,opt:!0},{no:2,name:"max_acc_degs_per_sec2",kind:"scalar",T:1,opt:!0}]),am=Object.freeze(Object.defineProperty({__proto__:null,GetEndPositionRequest:Pt,GetEndPositionResponse:Wr,GetJointPositionsRequest:Dt,GetJointPositionsResponse:jr,IsMovingRequest:Lt,IsMovingResponse:em,JointPositions:pn,MoveOptions:nm,MoveThroughJointPositionsRequest:Xr,MoveThroughJointPositionsResponse:Qr,MoveToJointPositionsRequest:Ut,MoveToJointPositionsResponse:Kr,MoveToPositionRequest:At,MoveToPositionResponse:Hr,Status:m_,StopRequest:qt,StopResponse:Zr},Symbol.toStringTag,{value:"Module"})),tm={typeName:"viam.component.arm.v1.ArmService",methods:{getEndPosition:{name:"GetEndPosition",I:Pt,O:Wr,kind:m.Unary},moveToPosition:{name:"MoveToPosition",I:At,O:Hr,kind:m.Unary},getJointPositions:{name:"GetJointPositions",I:Dt,O:jr,kind:m.Unary},moveToJointPositions:{name:"MoveToJointPositions",I:Ut,O:Kr,kind:m.Unary},moveThroughJointPositions:{name:"MoveThroughJointPositions",I:Xr,O:Qr,kind:m.Unary},stop:{name:"Stop",I:qt,O:Zr,kind:m.Unary},isMoving:{name:"IsMoving",I:Lt,O:em,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getKinematics:{name:"GetKinematics",I:Nn,O:Ma,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary},get3DModels:{name:"Get3DModels",I:bt,O:Jr,kind:m.Unary}}},Gt=s.makeMessageType("viam.component.base.v1.MoveStraightRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"distance_mm",kind:"scalar",T:3},{no:3,name:"mm_per_sec",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),sm=s.makeMessageType("viam.component.base.v1.MoveStraightResponse",[]),Bt=s.makeMessageType("viam.component.base.v1.SpinRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"angle_deg",kind:"scalar",T:1},{no:3,name:"degs_per_sec",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),om=s.makeMessageType("viam.component.base.v1.SpinResponse",[]),Ft=s.makeMessageType("viam.component.base.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),im=s.makeMessageType("viam.component.base.v1.StopResponse",[]),xt=s.makeMessageType("viam.component.base.v1.SetPowerRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"linear",kind:"message",T:qe},{no:3,name:"angular",kind:"message",T:qe},{no:99,name:"extra",kind:"message",T:p}]),rm=s.makeMessageType("viam.component.base.v1.SetPowerResponse",[]),Jt=s.makeMessageType("viam.component.base.v1.SetVelocityRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"linear",kind:"message",T:qe},{no:3,name:"angular",kind:"message",T:qe},{no:99,name:"extra",kind:"message",T:p}]),mm=s.makeMessageType("viam.component.base.v1.SetVelocityResponse",[]),zt=s.makeMessageType("viam.component.base.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),cm=s.makeMessageType("viam.component.base.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),Oa=s.makeMessageType("viam.component.base.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),dm=s.makeMessageType("viam.component.base.v1.GetPropertiesResponse",()=>[{no:1,name:"width_meters",kind:"scalar",T:1},{no:2,name:"turning_radius_meters",kind:"scalar",T:1},{no:3,name:"wheel_circumference_meters",kind:"scalar",T:1}]),lm=Object.freeze(Object.defineProperty({__proto__:null,GetPropertiesRequest:Oa,GetPropertiesResponse:dm,IsMovingRequest:zt,IsMovingResponse:cm,MoveStraightRequest:Gt,MoveStraightResponse:sm,SetPowerRequest:xt,SetPowerResponse:rm,SetVelocityRequest:Jt,SetVelocityResponse:mm,SpinRequest:Bt,SpinResponse:om,StopRequest:Ft,StopResponse:im},Symbol.toStringTag,{value:"Module"})),pm={typeName:"viam.component.base.v1.BaseService",methods:{moveStraight:{name:"MoveStraight",I:Gt,O:sm,kind:m.Unary},spin:{name:"Spin",I:Bt,O:om,kind:m.Unary},setPower:{name:"SetPower",I:xt,O:rm,kind:m.Unary},setVelocity:{name:"SetVelocity",I:Jt,O:mm,kind:m.Unary},stop:{name:"Stop",I:Ft,O:im,kind:m.Unary},isMoving:{name:"IsMoving",I:zt,O:cm,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary},getProperties:{name:"GetProperties",I:Oa,O:dm,kind:m.Unary}}},um=s.makeEnum("viam.component.board.v1.PowerMode",[{no:0,name:"POWER_MODE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"POWER_MODE_NORMAL",localName:"NORMAL"},{no:2,name:"POWER_MODE_OFFLINE_DEEP",localName:"OFFLINE_DEEP"}]),c_=s.makeMessageType("viam.component.board.v1.Status",()=>[{no:1,name:"analogs",kind:"map",K:9,V:{kind:"scalar",T:5}},{no:2,name:"digital_interrupts",kind:"map",K:9,V:{kind:"scalar",T:3}}]),Vt=s.makeMessageType("viam.component.board.v1.SetGPIORequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"high",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),gm=s.makeMessageType("viam.component.board.v1.SetGPIOResponse",[]),$t=s.makeMessageType("viam.component.board.v1.GetGPIORequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Tm=s.makeMessageType("viam.component.board.v1.GetGPIOResponse",()=>[{no:1,name:"high",kind:"scalar",T:8}]),Yt=s.makeMessageType("viam.component.board.v1.PWMRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),km=s.makeMessageType("viam.component.board.v1.PWMResponse",()=>[{no:1,name:"duty_cycle_pct",kind:"scalar",T:1}]),Wt=s.makeMessageType("viam.component.board.v1.SetPWMRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"duty_cycle_pct",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),ym=s.makeMessageType("viam.component.board.v1.SetPWMResponse",[]),jt=s.makeMessageType("viam.component.board.v1.PWMFrequencyRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),vm=s.makeMessageType("viam.component.board.v1.PWMFrequencyResponse",()=>[{no:1,name:"frequency_hz",kind:"scalar",T:4}]),Ht=s.makeMessageType("viam.component.board.v1.SetPWMFrequencyRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"frequency_hz",kind:"scalar",T:4},{no:99,name:"extra",kind:"message",T:p}]),hm=s.makeMessageType("viam.component.board.v1.SetPWMFrequencyResponse",[]),Kt=s.makeMessageType("viam.component.board.v1.ReadAnalogReaderRequest",()=>[{no:1,name:"board_name",kind:"scalar",T:9},{no:2,name:"analog_reader_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),fm=s.makeMessageType("viam.component.board.v1.ReadAnalogReaderResponse",()=>[{no:1,name:"value",kind:"scalar",T:5},{no:2,name:"min_range",kind:"scalar",T:2},{no:3,name:"max_range",kind:"scalar",T:2},{no:4,name:"step_size",kind:"scalar",T:2}]),Xt=s.makeMessageType("viam.component.board.v1.WriteAnalogRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"value",kind:"scalar",T:5},{no:99,name:"extra",kind:"message",T:p}]),Rm=s.makeMessageType("viam.component.board.v1.WriteAnalogResponse",[]),Qt=s.makeMessageType("viam.component.board.v1.GetDigitalInterruptValueRequest",()=>[{no:1,name:"board_name",kind:"scalar",T:9},{no:2,name:"digital_interrupt_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),_m=s.makeMessageType("viam.component.board.v1.GetDigitalInterruptValueResponse",()=>[{no:1,name:"value",kind:"scalar",T:3}]),Zt=s.makeMessageType("viam.component.board.v1.StreamTicksRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin_names",kind:"scalar",T:9,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Sm=s.makeMessageType("viam.component.board.v1.StreamTicksResponse",()=>[{no:1,name:"pin_name",kind:"scalar",T:9},{no:2,name:"time",kind:"scalar",T:4},{no:3,name:"high",kind:"scalar",T:8}]),es=s.makeMessageType("viam.component.board.v1.SetPowerModeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"power_mode",kind:"enum",T:s.getEnumType(um)},{no:3,name:"duration",kind:"message",T:B,opt:!0},{no:99,name:"extra",kind:"message",T:p}]),Im=s.makeMessageType("viam.component.board.v1.SetPowerModeResponse",[]),Em=Object.freeze(Object.defineProperty({__proto__:null,GetDigitalInterruptValueRequest:Qt,GetDigitalInterruptValueResponse:_m,GetGPIORequest:$t,GetGPIOResponse:Tm,PWMFrequencyRequest:jt,PWMFrequencyResponse:vm,PWMRequest:Yt,PWMResponse:km,PowerMode:um,ReadAnalogReaderRequest:Kt,ReadAnalogReaderResponse:fm,SetGPIORequest:Vt,SetGPIOResponse:gm,SetPWMFrequencyRequest:Ht,SetPWMFrequencyResponse:hm,SetPWMRequest:Wt,SetPWMResponse:ym,SetPowerModeRequest:es,SetPowerModeResponse:Im,Status:c_,StreamTicksRequest:Zt,StreamTicksResponse:Sm,WriteAnalogRequest:Xt,WriteAnalogResponse:Rm},Symbol.toStringTag,{value:"Module"})),Mm={typeName:"viam.component.board.v1.BoardService",methods:{setGPIO:{name:"SetGPIO",I:Vt,O:gm,kind:m.Unary},getGPIO:{name:"GetGPIO",I:$t,O:Tm,kind:m.Unary},pWM:{name:"PWM",I:Yt,O:km,kind:m.Unary},setPWM:{name:"SetPWM",I:Wt,O:ym,kind:m.Unary},pWMFrequency:{name:"PWMFrequency",I:jt,O:vm,kind:m.Unary},setPWMFrequency:{name:"SetPWMFrequency",I:Ht,O:hm,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},readAnalogReader:{name:"ReadAnalogReader",I:Kt,O:fm,kind:m.Unary},writeAnalog:{name:"WriteAnalog",I:Xt,O:Rm,kind:m.Unary},getDigitalInterruptValue:{name:"GetDigitalInterruptValue",I:Qt,O:_m,kind:m.Unary},streamTicks:{name:"StreamTicks",I:Zt,O:Sm,kind:m.ServerStreaming},setPowerMode:{name:"SetPowerMode",I:es,O:Im,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}},ns=s.makeEnum("viam.component.encoder.v1.PositionType",[{no:0,name:"POSITION_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"POSITION_TYPE_TICKS_COUNT",localName:"TICKS_COUNT"},{no:2,name:"POSITION_TYPE_ANGLE_DEGREES",localName:"ANGLE_DEGREES"}]),as=s.makeMessageType("viam.component.encoder.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"position_type",kind:"enum",T:s.getEnumType(ns),opt:!0},{no:99,name:"extra",kind:"message",T:p}]),bm=s.makeMessageType("viam.component.encoder.v1.GetPositionResponse",()=>[{no:1,name:"value",kind:"scalar",T:2},{no:2,name:"position_type",kind:"enum",T:s.getEnumType(ns)}]),ts=s.makeMessageType("viam.component.encoder.v1.ResetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Om=s.makeMessageType("viam.component.encoder.v1.ResetPositionResponse",[]),ss=s.makeMessageType("viam.component.encoder.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),wm=s.makeMessageType("viam.component.encoder.v1.GetPropertiesResponse",()=>[{no:1,name:"ticks_count_supported",kind:"scalar",T:8},{no:2,name:"angle_degrees_supported",kind:"scalar",T:8}]),Cm=Object.freeze(Object.defineProperty({__proto__:null,GetPositionRequest:as,GetPositionResponse:bm,GetPropertiesRequest:ss,GetPropertiesResponse:wm,PositionType:ns,ResetPositionRequest:ts,ResetPositionResponse:Om},Symbol.toStringTag,{value:"Module"})),Nm={typeName:"viam.component.encoder.v1.EncoderService",methods:{getPosition:{name:"GetPosition",I:as,O:bm,kind:m.Unary},resetPosition:{name:"ResetPosition",I:ts,O:Om,kind:m.Unary},getProperties:{name:"GetProperties",I:ss,O:wm,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}},os=s.makeMessageType("viam.component.gantry.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Pm=s.makeMessageType("viam.component.gantry.v1.GetPositionResponse",()=>[{no:1,name:"positions_mm",kind:"scalar",T:1,repeated:!0}]),is=s.makeMessageType("viam.component.gantry.v1.MoveToPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"positions_mm",kind:"scalar",T:1,repeated:!0},{no:3,name:"speeds_mm_per_sec",kind:"scalar",T:1,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Dm=s.makeMessageType("viam.component.gantry.v1.MoveToPositionResponse",[]),rs=s.makeMessageType("viam.component.gantry.v1.HomeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Am=s.makeMessageType("viam.component.gantry.v1.HomeResponse",()=>[{no:1,name:"homed",kind:"scalar",T:8}]),ms=s.makeMessageType("viam.component.gantry.v1.GetLengthsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Um=s.makeMessageType("viam.component.gantry.v1.GetLengthsResponse",()=>[{no:1,name:"lengths_mm",kind:"scalar",T:1,repeated:!0}]),cs=s.makeMessageType("viam.component.gantry.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),qm=s.makeMessageType("viam.component.gantry.v1.StopResponse",[]),d_=s.makeMessageType("viam.component.gantry.v1.Status",()=>[{no:1,name:"positions_mm",kind:"scalar",T:1,repeated:!0},{no:2,name:"lengths_mm",kind:"scalar",T:1,repeated:!0},{no:3,name:"is_moving",kind:"scalar",T:8}]),ds=s.makeMessageType("viam.component.gantry.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Lm=s.makeMessageType("viam.component.gantry.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),l_=Object.freeze(Object.defineProperty({__proto__:null,GetLengthsRequest:ms,GetLengthsResponse:Um,GetPositionRequest:os,GetPositionResponse:Pm,HomeRequest:rs,HomeResponse:Am,IsMovingRequest:ds,IsMovingResponse:Lm,MoveToPositionRequest:is,MoveToPositionResponse:Dm,Status:d_,StopRequest:cs,StopResponse:qm},Symbol.toStringTag,{value:"Module"})),Gm={typeName:"viam.component.gantry.v1.GantryService",methods:{getPosition:{name:"GetPosition",I:os,O:Pm,kind:m.Unary},moveToPosition:{name:"MoveToPosition",I:is,O:Dm,kind:m.Unary},home:{name:"Home",I:rs,O:Am,kind:m.Unary},getLengths:{name:"GetLengths",I:ms,O:Um,kind:m.Unary},stop:{name:"Stop",I:cs,O:qm,kind:m.Unary},isMoving:{name:"IsMoving",I:ds,O:Lm,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getKinematics:{name:"GetKinematics",I:Nn,O:Ma,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}},ls={typeName:"viam.component.generic.v1.GenericService",methods:{doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}},p_=Object.freeze(Object.defineProperty({__proto__:null,GenericService:ls},Symbol.toStringTag,{value:"Module"})),ps=s.makeMessageType("viam.component.gripper.v1.OpenRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Bm=s.makeMessageType("viam.component.gripper.v1.OpenResponse",[]),us=s.makeMessageType("viam.component.gripper.v1.GrabRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Fm=s.makeMessageType("viam.component.gripper.v1.GrabResponse",()=>[{no:1,name:"success",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),gs=s.makeMessageType("viam.component.gripper.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),xm=s.makeMessageType("viam.component.gripper.v1.StopResponse",[]),Ts=s.makeMessageType("viam.component.gripper.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Jm=s.makeMessageType("viam.component.gripper.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),zm=s.makeMessageType("viam.component.gripper.v1.IsHoldingSomethingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Vm=s.makeMessageType("viam.component.gripper.v1.IsHoldingSomethingResponse",()=>[{no:1,name:"is_holding_something",kind:"scalar",T:8},{no:99,name:"meta",kind:"message",T:p}]),u_=Object.freeze(Object.defineProperty({__proto__:null,GrabRequest:us,GrabResponse:Fm,IsHoldingSomethingRequest:zm,IsHoldingSomethingResponse:Vm,IsMovingRequest:Ts,IsMovingResponse:Jm,OpenRequest:ps,OpenResponse:Bm,StopRequest:gs,StopResponse:xm},Symbol.toStringTag,{value:"Module"})),$m={typeName:"viam.component.gripper.v1.GripperService",methods:{open:{name:"Open",I:ps,O:Bm,kind:m.Unary},grab:{name:"Grab",I:us,O:Fm,kind:m.Unary},stop:{name:"Stop",I:gs,O:xm,kind:m.Unary},isMoving:{name:"IsMoving",I:Ts,O:Jm,kind:m.Unary},isHoldingSomething:{name:"IsHoldingSomething",I:zm,O:Vm,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary},getKinematics:{name:"GetKinematics",I:Nn,O:Ma,kind:m.Unary}}},Ym=s.makeMessageType("viam.component.inputcontroller.v1.GetControlsRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Wm=s.makeMessageType("viam.component.inputcontroller.v1.GetControlsResponse",()=>[{no:1,name:"controls",kind:"scalar",T:9,repeated:!0}]),ks=s.makeMessageType("viam.component.inputcontroller.v1.GetEventsRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),jm=s.makeMessageType("viam.component.inputcontroller.v1.GetEventsResponse",()=>[{no:1,name:"events",kind:"message",T:qn,repeated:!0}]),ys=s.makeMessageType("viam.component.inputcontroller.v1.TriggerEventRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:2,name:"event",kind:"message",T:qn},{no:99,name:"extra",kind:"message",T:p}]),Hm=s.makeMessageType("viam.component.inputcontroller.v1.TriggerEventResponse",[]),qn=s.makeMessageType("viam.component.inputcontroller.v1.Event",()=>[{no:1,name:"time",kind:"message",T:S},{no:2,name:"event",kind:"scalar",T:9},{no:3,name:"control",kind:"scalar",T:9},{no:4,name:"value",kind:"scalar",T:1}]),Km=s.makeMessageType("viam.component.inputcontroller.v1.StreamEventsRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:2,name:"events",kind:"message",T:Xm,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Xm=s.makeMessageType("viam.component.inputcontroller.v1.StreamEventsRequest.Events",()=>[{no:1,name:"control",kind:"scalar",T:9},{no:2,name:"events",kind:"scalar",T:9,repeated:!0},{no:3,name:"cancelled_events",kind:"scalar",T:9,repeated:!0}],{localName:"StreamEventsRequest_Events"}),Qm=s.makeMessageType("viam.component.inputcontroller.v1.StreamEventsResponse",()=>[{no:1,name:"event",kind:"message",T:qn}]),Zm=Object.freeze(Object.defineProperty({__proto__:null,Event:qn,GetControlsRequest:Ym,GetControlsResponse:Wm,GetEventsRequest:ks,GetEventsResponse:jm,Status:s.makeMessageType("viam.component.inputcontroller.v1.Status",()=>[{no:1,name:"events",kind:"message",T:qn,repeated:!0}]),StreamEventsRequest:Km,StreamEventsRequest_Events:Xm,StreamEventsResponse:Qm,TriggerEventRequest:ys,TriggerEventResponse:Hm},Symbol.toStringTag,{value:"Module"})),ec={typeName:"viam.component.inputcontroller.v1.InputControllerService",methods:{getControls:{name:"GetControls",I:Ym,O:Wm,kind:m.Unary},getEvents:{name:"GetEvents",I:ks,O:jm,kind:m.Unary},streamEvents:{name:"StreamEvents",I:Km,O:Qm,kind:m.ServerStreaming},triggerEvent:{name:"TriggerEvent",I:ys,O:Hm,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}},vs=s.makeMessageType("viam.component.motor.v1.SetPowerRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"power_pct",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),nc=s.makeMessageType("viam.component.motor.v1.SetPowerResponse",[]),hs=s.makeMessageType("viam.component.motor.v1.GoForRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"rpm",kind:"scalar",T:1},{no:3,name:"revolutions",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),ac=s.makeMessageType("viam.component.motor.v1.GoForResponse",[]),fs=s.makeMessageType("viam.component.motor.v1.GoToRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"rpm",kind:"scalar",T:1},{no:3,name:"position_revolutions",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),tc=s.makeMessageType("viam.component.motor.v1.GoToResponse",[]),Rs=s.makeMessageType("viam.component.motor.v1.SetRPMRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"rpm",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),sc=s.makeMessageType("viam.component.motor.v1.SetRPMResponse",[]),_s=s.makeMessageType("viam.component.motor.v1.ResetZeroPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"offset",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),oc=s.makeMessageType("viam.component.motor.v1.ResetZeroPositionResponse",[]),Ss=s.makeMessageType("viam.component.motor.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),ic=s.makeMessageType("viam.component.motor.v1.GetPositionResponse",()=>[{no:1,name:"position",kind:"scalar",T:1}]),Is=s.makeMessageType("viam.component.motor.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),rc=s.makeMessageType("viam.component.motor.v1.StopResponse",[]),Es=s.makeMessageType("viam.component.motor.v1.IsPoweredRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),mc=s.makeMessageType("viam.component.motor.v1.IsPoweredResponse",()=>[{no:1,name:"is_on",kind:"scalar",T:8},{no:2,name:"power_pct",kind:"scalar",T:1}]),Ms=s.makeMessageType("viam.component.motor.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),cc=s.makeMessageType("viam.component.motor.v1.GetPropertiesResponse",()=>[{no:1,name:"position_reporting",kind:"scalar",T:8}]),g_=s.makeMessageType("viam.component.motor.v1.Status",()=>[{no:1,name:"is_powered",kind:"scalar",T:8},{no:3,name:"position",kind:"scalar",T:1},{no:4,name:"is_moving",kind:"scalar",T:8}]),bs=s.makeMessageType("viam.component.motor.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),dc=s.makeMessageType("viam.component.motor.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),T_=Object.freeze(Object.defineProperty({__proto__:null,GetPositionRequest:Ss,GetPositionResponse:ic,GetPropertiesRequest:Ms,GetPropertiesResponse:cc,GoForRequest:hs,GoForResponse:ac,GoToRequest:fs,GoToResponse:tc,IsMovingRequest:bs,IsMovingResponse:dc,IsPoweredRequest:Es,IsPoweredResponse:mc,ResetZeroPositionRequest:_s,ResetZeroPositionResponse:oc,SetPowerRequest:vs,SetPowerResponse:nc,SetRPMRequest:Rs,SetRPMResponse:sc,Status:g_,StopRequest:Is,StopResponse:rc},Symbol.toStringTag,{value:"Module"})),lc={typeName:"viam.component.motor.v1.MotorService",methods:{setPower:{name:"SetPower",I:vs,O:nc,kind:m.Unary},goFor:{name:"GoFor",I:hs,O:ac,kind:m.Unary},goTo:{name:"GoTo",I:fs,O:tc,kind:m.Unary},setRPM:{name:"SetRPM",I:Rs,O:sc,kind:m.Unary},resetZeroPosition:{name:"ResetZeroPosition",I:_s,O:oc,kind:m.Unary},getPosition:{name:"GetPosition",I:Ss,O:ic,kind:m.Unary},getProperties:{name:"GetProperties",I:Ms,O:cc,kind:m.Unary},stop:{name:"Stop",I:Is,O:rc,kind:m.Unary},isPowered:{name:"IsPowered",I:Es,O:mc,kind:m.Unary},isMoving:{name:"IsMoving",I:bs,O:dc,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}},Os=s.makeMessageType("viam.component.movementsensor.v1.GetLinearVelocityRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),pc=s.makeMessageType("viam.component.movementsensor.v1.GetLinearVelocityResponse",()=>[{no:1,name:"linear_velocity",kind:"message",T:qe}]),ws=s.makeMessageType("viam.component.movementsensor.v1.GetAngularVelocityRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),uc=s.makeMessageType("viam.component.movementsensor.v1.GetAngularVelocityResponse",()=>[{no:1,name:"angular_velocity",kind:"message",T:qe}]),Cs=s.makeMessageType("viam.component.movementsensor.v1.GetCompassHeadingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),gc=s.makeMessageType("viam.component.movementsensor.v1.GetCompassHeadingResponse",()=>[{no:1,name:"value",kind:"scalar",T:1}]),Ns=s.makeMessageType("viam.component.movementsensor.v1.GetOrientationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Tc=s.makeMessageType("viam.component.movementsensor.v1.GetOrientationResponse",()=>[{no:1,name:"orientation",kind:"message",T:Ur}]),Ps=s.makeMessageType("viam.component.movementsensor.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),kc=s.makeMessageType("viam.component.movementsensor.v1.GetPositionResponse",()=>[{no:1,name:"coordinate",kind:"message",T:$e},{no:2,name:"altitude_m",kind:"scalar",T:2}]),Ds=s.makeMessageType("viam.component.movementsensor.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),yc=s.makeMessageType("viam.component.movementsensor.v1.GetPropertiesResponse",()=>[{no:1,name:"linear_velocity_supported",kind:"scalar",T:8},{no:2,name:"angular_velocity_supported",kind:"scalar",T:8},{no:3,name:"orientation_supported",kind:"scalar",T:8},{no:4,name:"position_supported",kind:"scalar",T:8},{no:5,name:"compass_heading_supported",kind:"scalar",T:8},{no:6,name:"linear_acceleration_supported",kind:"scalar",T:8}]),As=s.makeMessageType("viam.component.movementsensor.v1.GetAccuracyRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),vc=s.makeMessageType("viam.component.movementsensor.v1.GetAccuracyResponse",()=>[{no:1,name:"accuracy",kind:"map",K:9,V:{kind:"scalar",T:2}},{no:2,name:"position_hdop",kind:"scalar",T:2,opt:!0},{no:3,name:"position_vdop",kind:"scalar",T:2,opt:!0},{no:4,name:"position_nmea_gga_fix",kind:"scalar",T:5,opt:!0},{no:5,name:"compass_degrees_error",kind:"scalar",T:2,opt:!0}]),Us=s.makeMessageType("viam.component.movementsensor.v1.GetLinearAccelerationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),hc=s.makeMessageType("viam.component.movementsensor.v1.GetLinearAccelerationResponse",()=>[{no:1,name:"linear_acceleration",kind:"message",T:qe}]),fc=Object.freeze(Object.defineProperty({__proto__:null,GetAccuracyRequest:As,GetAccuracyResponse:vc,GetAngularVelocityRequest:ws,GetAngularVelocityResponse:uc,GetCompassHeadingRequest:Cs,GetCompassHeadingResponse:gc,GetLinearAccelerationRequest:Us,GetLinearAccelerationResponse:hc,GetLinearVelocityRequest:Os,GetLinearVelocityResponse:pc,GetOrientationRequest:Ns,GetOrientationResponse:Tc,GetPositionRequest:Ps,GetPositionResponse:kc,GetPropertiesRequest:Ds,GetPropertiesResponse:yc},Symbol.toStringTag,{value:"Module"})),Rc={typeName:"viam.component.movementsensor.v1.MovementSensorService",methods:{getLinearVelocity:{name:"GetLinearVelocity",I:Os,O:pc,kind:m.Unary},getAngularVelocity:{name:"GetAngularVelocity",I:ws,O:uc,kind:m.Unary},getCompassHeading:{name:"GetCompassHeading",I:Cs,O:gc,kind:m.Unary},getOrientation:{name:"GetOrientation",I:Ns,O:Tc,kind:m.Unary},getPosition:{name:"GetPosition",I:Ps,O:kc,kind:m.Unary},getProperties:{name:"GetProperties",I:Ds,O:yc,kind:m.Unary},getAccuracy:{name:"GetAccuracy",I:As,O:vc,kind:m.Unary},getLinearAcceleration:{name:"GetLinearAcceleration",I:Us,O:hc,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary},getReadings:{name:"GetReadings",I:Ze,O:ba,kind:m.Unary}}},qs=s.makeMessageType("viam.component.powersensor.v1.GetVoltageRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),_c=s.makeMessageType("viam.component.powersensor.v1.GetVoltageResponse",()=>[{no:1,name:"volts",kind:"scalar",T:1},{no:2,name:"is_ac",kind:"scalar",T:8}]),Ls=s.makeMessageType("viam.component.powersensor.v1.GetCurrentRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Sc=s.makeMessageType("viam.component.powersensor.v1.GetCurrentResponse",()=>[{no:1,name:"amperes",kind:"scalar",T:1},{no:2,name:"is_ac",kind:"scalar",T:8}]),Gs=s.makeMessageType("viam.component.powersensor.v1.GetPowerRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ic=s.makeMessageType("viam.component.powersensor.v1.GetPowerResponse",()=>[{no:1,name:"watts",kind:"scalar",T:1}]),k_=Object.freeze(Object.defineProperty({__proto__:null,GetCurrentRequest:Ls,GetCurrentResponse:Sc,GetPowerRequest:Gs,GetPowerResponse:Ic,GetVoltageRequest:qs,GetVoltageResponse:_c},Symbol.toStringTag,{value:"Module"})),Ec={typeName:"viam.component.powersensor.v1.PowerSensorService",methods:{getVoltage:{name:"GetVoltage",I:qs,O:_c,kind:m.Unary},getCurrent:{name:"GetCurrent",I:Ls,O:Sc,kind:m.Unary},getPower:{name:"GetPower",I:Gs,O:Ic,kind:m.Unary},getReadings:{name:"GetReadings",I:Ze,O:ba,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}},Bs=s.makeMessageType("viam.component.servo.v1.MoveRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"angle_deg",kind:"scalar",T:13},{no:99,name:"extra",kind:"message",T:p}]),Mc=s.makeMessageType("viam.component.servo.v1.MoveResponse",[]),Fs=s.makeMessageType("viam.component.servo.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),bc=s.makeMessageType("viam.component.servo.v1.GetPositionResponse",()=>[{no:1,name:"position_deg",kind:"scalar",T:13}]),xs=s.makeMessageType("viam.component.servo.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Oc=s.makeMessageType("viam.component.servo.v1.StopResponse",[]),y_=s.makeMessageType("viam.component.servo.v1.Status",()=>[{no:1,name:"position_deg",kind:"scalar",T:13},{no:2,name:"is_moving",kind:"scalar",T:8}]),Js=s.makeMessageType("viam.component.servo.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),wc=s.makeMessageType("viam.component.servo.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),v_=Object.freeze(Object.defineProperty({__proto__:null,GetPositionRequest:Fs,GetPositionResponse:bc,IsMovingRequest:Js,IsMovingResponse:wc,MoveRequest:Bs,MoveResponse:Mc,Status:y_,StopRequest:xs,StopResponse:Oc},Symbol.toStringTag,{value:"Module"})),Cc={typeName:"viam.component.servo.v1.ServoService",methods:{move:{name:"Move",I:Bs,O:Mc,kind:m.Unary},getPosition:{name:"GetPosition",I:Fs,O:bc,kind:m.Unary},stop:{name:"Stop",I:xs,O:Oc,kind:m.Unary},isMoving:{name:"IsMoving",I:Js,O:wc,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}},Nc=s.makeMessageType("opentelemetry.proto.common.v1.AnyValue",()=>[{no:1,name:"string_value",kind:"scalar",T:9,oneof:"value"},{no:2,name:"bool_value",kind:"scalar",T:8,oneof:"value"},{no:3,name:"int_value",kind:"scalar",T:3,oneof:"value"},{no:4,name:"double_value",kind:"scalar",T:1,oneof:"value"},{no:5,name:"array_value",kind:"message",T:h_,oneof:"value"},{no:6,name:"kvlist_value",kind:"message",T:f_,oneof:"value"},{no:7,name:"bytes_value",kind:"scalar",T:12,oneof:"value"}]),h_=s.makeMessageType("opentelemetry.proto.common.v1.ArrayValue",()=>[{no:1,name:"values",kind:"message",T:Nc,repeated:!0}]),f_=s.makeMessageType("opentelemetry.proto.common.v1.KeyValueList",()=>[{no:1,name:"values",kind:"message",T:un,repeated:!0}]),un=s.makeMessageType("opentelemetry.proto.common.v1.KeyValue",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"message",T:Nc}]),R_=s.makeMessageType("opentelemetry.proto.common.v1.InstrumentationScope",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:un,repeated:!0},{no:4,name:"dropped_attributes_count",kind:"scalar",T:13}]),__=s.makeMessageType("opentelemetry.proto.common.v1.EntityRef",()=>[{no:1,name:"schema_url",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"id_keys",kind:"scalar",T:9,repeated:!0},{no:4,name:"description_keys",kind:"scalar",T:9,repeated:!0}]),S_=s.makeMessageType("opentelemetry.proto.resource.v1.Resource",()=>[{no:1,name:"attributes",kind:"message",T:un,repeated:!0},{no:2,name:"dropped_attributes_count",kind:"scalar",T:13},{no:3,name:"entity_refs",kind:"message",T:__,repeated:!0}]),I_=s.makeMessageType("opentelemetry.proto.trace.v1.ResourceSpans",()=>[{no:1,name:"resource",kind:"message",T:S_},{no:2,name:"scope_spans",kind:"message",T:E_,repeated:!0},{no:3,name:"schema_url",kind:"scalar",T:9}]),E_=s.makeMessageType("opentelemetry.proto.trace.v1.ScopeSpans",()=>[{no:1,name:"scope",kind:"message",T:R_},{no:2,name:"spans",kind:"message",T:M_,repeated:!0},{no:3,name:"schema_url",kind:"scalar",T:9}]),M_=s.makeMessageType("opentelemetry.proto.trace.v1.Span",()=>[{no:1,name:"trace_id",kind:"scalar",T:12},{no:2,name:"span_id",kind:"scalar",T:12},{no:3,name:"trace_state",kind:"scalar",T:9},{no:4,name:"parent_span_id",kind:"scalar",T:12},{no:16,name:"flags",kind:"scalar",T:7},{no:5,name:"name",kind:"scalar",T:9},{no:6,name:"kind",kind:"enum",T:s.getEnumType(b_)},{no:7,name:"start_time_unix_nano",kind:"scalar",T:6},{no:8,name:"end_time_unix_nano",kind:"scalar",T:6},{no:9,name:"attributes",kind:"message",T:un,repeated:!0},{no:10,name:"dropped_attributes_count",kind:"scalar",T:13},{no:11,name:"events",kind:"message",T:O_,repeated:!0},{no:12,name:"dropped_events_count",kind:"scalar",T:13},{no:13,name:"links",kind:"message",T:w_,repeated:!0},{no:14,name:"dropped_links_count",kind:"scalar",T:13},{no:15,name:"status",kind:"message",T:C_}]),b_=s.makeEnum("opentelemetry.proto.trace.v1.Span.SpanKind",[{no:0,name:"SPAN_KIND_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"SPAN_KIND_INTERNAL",localName:"INTERNAL"},{no:2,name:"SPAN_KIND_SERVER",localName:"SERVER"},{no:3,name:"SPAN_KIND_CLIENT",localName:"CLIENT"},{no:4,name:"SPAN_KIND_PRODUCER",localName:"PRODUCER"},{no:5,name:"SPAN_KIND_CONSUMER",localName:"CONSUMER"}]),O_=s.makeMessageType("opentelemetry.proto.trace.v1.Span.Event",()=>[{no:1,name:"time_unix_nano",kind:"scalar",T:6},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:un,repeated:!0},{no:4,name:"dropped_attributes_count",kind:"scalar",T:13}],{localName:"Span_Event"}),w_=s.makeMessageType("opentelemetry.proto.trace.v1.Span.Link",()=>[{no:1,name:"trace_id",kind:"scalar",T:12},{no:2,name:"span_id",kind:"scalar",T:12},{no:3,name:"trace_state",kind:"scalar",T:9},{no:4,name:"attributes",kind:"message",T:un,repeated:!0},{no:5,name:"dropped_attributes_count",kind:"scalar",T:13},{no:6,name:"flags",kind:"scalar",T:7}],{localName:"Span_Link"}),C_=s.makeMessageType("opentelemetry.proto.trace.v1.Status",()=>[{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"code",kind:"enum",T:s.getEnumType(N_)}]),N_=s.makeEnum("opentelemetry.proto.trace.v1.Status.StatusCode",[{no:0,name:"STATUS_CODE_UNSET",localName:"UNSET"},{no:1,name:"STATUS_CODE_OK",localName:"OK"},{no:2,name:"STATUS_CODE_ERROR",localName:"ERROR"}]),Pc=s.makeEnum("viam.robot.v1.PeerConnectionType",[{no:0,name:"PEER_CONNECTION_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PEER_CONNECTION_TYPE_GRPC",localName:"GRPC"},{no:2,name:"PEER_CONNECTION_TYPE_WEBRTC",localName:"WEBRTC"}]),Dc=s.makeMessageType("viam.robot.v1.SendTracesRequest",()=>[{no:1,name:"resource_spans",kind:"message",T:I_,repeated:!0}]),Ac=s.makeMessageType("viam.robot.v1.SendTracesResponse",[]),Uc=s.makeMessageType("viam.robot.v1.TunnelRequest",()=>[{no:1,name:"destination_port",kind:"scalar",T:13},{no:2,name:"data",kind:"scalar",T:12}]),qc=s.makeMessageType("viam.robot.v1.TunnelResponse",()=>[{no:1,name:"data",kind:"scalar",T:12}]),Lc=s.makeMessageType("viam.robot.v1.ListTunnelsRequest",[]),Gc=s.makeMessageType("viam.robot.v1.ListTunnelsResponse",()=>[{no:1,name:"tunnels",kind:"message",T:Bc,repeated:!0}]),Bc=s.makeMessageType("viam.robot.v1.Tunnel",()=>[{no:1,name:"port",kind:"scalar",T:13},{no:2,name:"connection_timeout",kind:"message",T:B}]),Fc=s.makeMessageType("viam.robot.v1.FrameSystemConfig",()=>[{no:1,name:"frame",kind:"message",T:Le},{no:2,name:"kinematics",kind:"message",T:p}]),xc=s.makeMessageType("viam.robot.v1.FrameSystemConfigRequest",()=>[{no:1,name:"supplemental_transforms",kind:"message",T:Le,repeated:!0}]),Jc=s.makeMessageType("viam.robot.v1.FrameSystemConfigResponse",()=>[{no:1,name:"frame_system_configs",kind:"message",T:Fc,repeated:!0}]),zs=s.makeMessageType("viam.robot.v1.TransformPoseRequest",()=>[{no:1,name:"source",kind:"message",T:Ve},{no:2,name:"destination",kind:"scalar",T:9},{no:3,name:"supplemental_transforms",kind:"message",T:Le,repeated:!0}]),zc=s.makeMessageType("viam.robot.v1.TransformPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:Ve}]),Vs=s.makeMessageType("viam.robot.v1.TransformPCDRequest",()=>[{no:1,name:"point_cloud_pcd",kind:"scalar",T:12},{no:2,name:"source",kind:"scalar",T:9},{no:3,name:"destination",kind:"scalar",T:9}]),Vc=s.makeMessageType("viam.robot.v1.TransformPCDResponse",()=>[{no:1,name:"point_cloud_pcd",kind:"scalar",T:12}]),$c=s.makeMessageType("viam.robot.v1.ResourceNamesRequest",[]),Yc=s.makeMessageType("viam.robot.v1.ResourceNamesResponse",()=>[{no:1,name:"resources",kind:"message",T:F,repeated:!0}]),Wc=s.makeMessageType("viam.robot.v1.ResourceRPCSubtype",()=>[{no:1,name:"subtype",kind:"message",T:F},{no:2,name:"proto_service",kind:"scalar",T:9}]),jc=s.makeMessageType("viam.robot.v1.ResourceRPCSubtypesRequest",[]),Hc=s.makeMessageType("viam.robot.v1.ResourceRPCSubtypesResponse",()=>[{no:1,name:"resource_rpc_subtypes",kind:"message",T:Wc,repeated:!0}]),Kc=s.makeMessageType("viam.robot.v1.Operation",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"method",kind:"scalar",T:9},{no:3,name:"arguments",kind:"message",T:p},{no:4,name:"started",kind:"message",T:S},{no:5,name:"session_id",kind:"scalar",T:9,opt:!0}]),Xc=s.makeMessageType("viam.robot.v1.GetOperationsRequest",[]),Qc=s.makeMessageType("viam.robot.v1.GetOperationsResponse",()=>[{no:1,name:"operations",kind:"message",T:Kc,repeated:!0}]),Zc=s.makeMessageType("viam.robot.v1.CancelOperationRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ed=s.makeMessageType("viam.robot.v1.CancelOperationResponse",[]),nd=s.makeMessageType("viam.robot.v1.BlockForOperationRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ad=s.makeMessageType("viam.robot.v1.BlockForOperationResponse",[]),td=s.makeMessageType("viam.robot.v1.PeerConnectionInfo",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(Pc)},{no:2,name:"remote_address",kind:"scalar",T:9,opt:!0},{no:3,name:"local_address",kind:"scalar",T:9,opt:!0}]),sd=s.makeMessageType("viam.robot.v1.Session",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"peer_connection_info",kind:"message",T:td,opt:!0}]),od=s.makeMessageType("viam.robot.v1.GetSessionsRequest",[]),id=s.makeMessageType("viam.robot.v1.GetSessionsResponse",()=>[{no:1,name:"sessions",kind:"message",T:sd,repeated:!0}]),rd=s.makeMessageType("viam.robot.v1.ModuleModel",()=>[{no:1,name:"module_name",kind:"scalar",T:9},{no:2,name:"model",kind:"scalar",T:9},{no:3,name:"api",kind:"scalar",T:9},{no:4,name:"from_local_module",kind:"scalar",T:8}]),$s=s.makeMessageType("viam.robot.v1.GetModelsFromModulesRequest",[]),md=s.makeMessageType("viam.robot.v1.GetModelsFromModulesResponse",()=>[{no:1,name:"models",kind:"message",T:rd,repeated:!0}]),Ys=s.makeMessageType("viam.robot.v1.Status",()=>[{no:1,name:"name",kind:"message",T:F},{no:2,name:"status",kind:"message",T:p},{no:3,name:"last_reconfigured",kind:"message",T:S}]),cd=s.makeMessageType("viam.robot.v1.GetStatusRequest",()=>[{no:1,name:"resource_names",kind:"message",T:F,repeated:!0}]),dd=s.makeMessageType("viam.robot.v1.GetStatusResponse",()=>[{no:1,name:"status",kind:"message",T:Ys,repeated:!0}]),ld=s.makeMessageType("viam.robot.v1.StreamStatusRequest",()=>[{no:1,name:"resource_names",kind:"message",T:F,repeated:!0},{no:2,name:"every",kind:"message",T:B}]),pd=s.makeMessageType("viam.robot.v1.StreamStatusResponse",()=>[{no:1,name:"status",kind:"message",T:Ys,repeated:!0}]),ud=s.makeMessageType("viam.robot.v1.StopExtraParameters",()=>[{no:1,name:"name",kind:"message",T:F},{no:2,name:"params",kind:"message",T:p}]),gd=s.makeMessageType("viam.robot.v1.StopAllRequest",()=>[{no:99,name:"extra",kind:"message",T:ud,repeated:!0}]),Td=s.makeMessageType("viam.robot.v1.StopAllResponse",[]),Ws=s.makeMessageType("viam.robot.v1.StartSessionRequest",()=>[{no:1,name:"resume",kind:"scalar",T:9}]),kd=s.makeMessageType("viam.robot.v1.StartSessionResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"heartbeat_window",kind:"message",T:B}]),js=s.makeMessageType("viam.robot.v1.SendSessionHeartbeatRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),yd=s.makeMessageType("viam.robot.v1.SendSessionHeartbeatResponse",[]),vd=s.makeMessageType("viam.robot.v1.LogRequest",()=>[{no:1,name:"logs",kind:"message",T:Pn,repeated:!0}]),hd=s.makeMessageType("viam.robot.v1.LogResponse",[]),fd=s.makeMessageType("viam.robot.v1.GetCloudMetadataRequest",[]),Hs=s.makeMessageType("viam.robot.v1.GetCloudMetadataResponse",()=>[{no:1,name:"robot_part_id",kind:"scalar",T:9},{no:2,name:"primary_org_id",kind:"scalar",T:9},{no:3,name:"location_id",kind:"scalar",T:9},{no:4,name:"machine_id",kind:"scalar",T:9},{no:5,name:"machine_part_id",kind:"scalar",T:9}]),Ks=s.makeMessageType("viam.robot.v1.RestartModuleRequest",()=>[{no:1,name:"module_id",kind:"scalar",T:9,oneof:"id_or_name"},{no:2,name:"module_name",kind:"scalar",T:9,oneof:"id_or_name"}]),Rd=s.makeMessageType("viam.robot.v1.RestartModuleResponse",[]),_d=s.makeMessageType("viam.robot.v1.ShutdownRequest",[]),Sd=s.makeMessageType("viam.robot.v1.ShutdownResponse",[]),Id=s.makeMessageType("viam.robot.v1.GetMachineStatusRequest",[]),Ed=s.makeMessageType("viam.robot.v1.GetMachineStatusResponse",()=>[{no:1,name:"resources",kind:"message",T:Od,repeated:!0},{no:2,name:"config",kind:"message",T:Cd},{no:3,name:"state",kind:"enum",T:s.getEnumType(Md)},{no:4,name:"job_statuses",kind:"message",T:bd,repeated:!0}]),Md=s.makeEnum("viam.robot.v1.GetMachineStatusResponse.State",[{no:0,name:"STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"STATE_INITIALIZING",localName:"INITIALIZING"},{no:2,name:"STATE_RUNNING",localName:"RUNNING"}]),bd=s.makeMessageType("viam.robot.v1.JobStatus",()=>[{no:1,name:"job_name",kind:"scalar",T:9},{no:2,name:"recent_successful_runs",kind:"message",T:S,repeated:!0},{no:3,name:"recent_failed_runs",kind:"message",T:S,repeated:!0}]),Od=s.makeMessageType("viam.robot.v1.ResourceStatus",()=>[{no:1,name:"name",kind:"message",T:F},{no:2,name:"state",kind:"enum",T:s.getEnumType(wd)},{no:3,name:"last_updated",kind:"message",T:S},{no:4,name:"revision",kind:"scalar",T:9},{no:5,name:"error",kind:"scalar",T:9},{no:6,name:"cloud_metadata",kind:"message",T:Hs,opt:!0}]),wd=s.makeEnum("viam.robot.v1.ResourceStatus.State",[{no:0,name:"STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"STATE_UNCONFIGURED",localName:"UNCONFIGURED"},{no:2,name:"STATE_CONFIGURING",localName:"CONFIGURING"},{no:3,name:"STATE_READY",localName:"READY"},{no:4,name:"STATE_REMOVING",localName:"REMOVING"},{no:5,name:"STATE_UNHEALTHY",localName:"UNHEALTHY"}]),Cd=s.makeMessageType("viam.robot.v1.ConfigStatus",()=>[{no:1,name:"revision",kind:"scalar",T:9},{no:2,name:"last_updated",kind:"message",T:S}]),Nd=s.makeMessageType("viam.robot.v1.GetVersionRequest",[]),Pd=s.makeMessageType("viam.robot.v1.GetVersionResponse",()=>[{no:1,name:"platform",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"api_version",kind:"scalar",T:9}]),Xs=s.makeMessageType("viam.robot.v1.GetPoseRequest",()=>[{no:1,name:"component_name",kind:"scalar",T:9},{no:2,name:"destination_frame",kind:"scalar",T:9},{no:3,name:"supplemental_transforms",kind:"message",T:Le,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Dd=s.makeMessageType("viam.robot.v1.GetPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:Ve}]),P_=Object.freeze(Object.defineProperty({__proto__:null,BlockForOperationRequest:nd,BlockForOperationResponse:ad,CancelOperationRequest:Zc,CancelOperationResponse:ed,ConfigStatus:Cd,FrameSystemConfig:Fc,FrameSystemConfigRequest:xc,FrameSystemConfigResponse:Jc,GetCloudMetadataRequest:fd,GetCloudMetadataResponse:Hs,GetMachineStatusRequest:Id,GetMachineStatusResponse:Ed,GetMachineStatusResponse_State:Md,GetModelsFromModulesRequest:$s,GetModelsFromModulesResponse:md,GetOperationsRequest:Xc,GetOperationsResponse:Qc,GetPoseRequest:Xs,GetPoseResponse:Dd,GetSessionsRequest:od,GetSessionsResponse:id,GetStatusRequest:cd,GetStatusResponse:dd,GetVersionRequest:Nd,GetVersionResponse:Pd,JobStatus:bd,ListTunnelsRequest:Lc,ListTunnelsResponse:Gc,LogRequest:vd,LogResponse:hd,ModuleModel:rd,Operation:Kc,PeerConnectionInfo:td,PeerConnectionType:Pc,ResourceNamesRequest:$c,ResourceNamesResponse:Yc,ResourceRPCSubtype:Wc,ResourceRPCSubtypesRequest:jc,ResourceRPCSubtypesResponse:Hc,ResourceStatus:Od,ResourceStatus_State:wd,RestartModuleRequest:Ks,RestartModuleResponse:Rd,SendSessionHeartbeatRequest:js,SendSessionHeartbeatResponse:yd,SendTracesRequest:Dc,SendTracesResponse:Ac,Session:sd,ShutdownRequest:_d,ShutdownResponse:Sd,StartSessionRequest:Ws,StartSessionResponse:kd,Status:Ys,StopAllRequest:gd,StopAllResponse:Td,StopExtraParameters:ud,StreamStatusRequest:ld,StreamStatusResponse:pd,TransformPCDRequest:Vs,TransformPCDResponse:Vc,TransformPoseRequest:zs,TransformPoseResponse:zc,Tunnel:Bc,TunnelRequest:Uc,TunnelResponse:qc},Symbol.toStringTag,{value:"Module"})),Qs={typeName:"viam.robot.v1.RobotService",methods:{getOperations:{name:"GetOperations",I:Xc,O:Qc,kind:m.Unary},getSessions:{name:"GetSessions",I:od,O:id,kind:m.Unary},resourceNames:{name:"ResourceNames",I:$c,O:Yc,kind:m.Unary},resourceRPCSubtypes:{name:"ResourceRPCSubtypes",I:jc,O:Hc,kind:m.Unary},cancelOperation:{name:"CancelOperation",I:Zc,O:ed,kind:m.Unary},blockForOperation:{name:"BlockForOperation",I:nd,O:ad,kind:m.Unary},getModelsFromModules:{name:"GetModelsFromModules",I:$s,O:md,kind:m.Unary},getStatus:{name:"GetStatus",I:cd,O:dd,kind:m.Unary},streamStatus:{name:"StreamStatus",I:ld,O:pd,kind:m.ServerStreaming},stopAll:{name:"StopAll",I:gd,O:Td,kind:m.Unary},startSession:{name:"StartSession",I:Ws,O:kd,kind:m.Unary},sendSessionHeartbeat:{name:"SendSessionHeartbeat",I:js,O:yd,kind:m.Unary},log:{name:"Log",I:vd,O:hd,kind:m.Unary},getCloudMetadata:{name:"GetCloudMetadata",I:fd,O:Hs,kind:m.Unary},restartModule:{name:"RestartModule",I:Ks,O:Rd,kind:m.Unary},shutdown:{name:"Shutdown",I:_d,O:Sd,kind:m.Unary},getMachineStatus:{name:"GetMachineStatus",I:Id,O:Ed,kind:m.Unary},getVersion:{name:"GetVersion",I:Nd,O:Pd,kind:m.Unary},tunnel:{name:"Tunnel",I:Uc,O:qc,kind:m.BiDiStreaming},listTunnels:{name:"ListTunnels",I:Lc,O:Gc,kind:m.Unary},frameSystemConfig:{name:"FrameSystemConfig",I:xc,O:Jc,kind:m.Unary},getPose:{name:"GetPose",I:Xs,O:Dd,kind:m.Unary},transformPose:{name:"TransformPose",I:zs,O:zc,kind:m.Unary},transformPCD:{name:"TransformPCD",I:Vs,O:Vc,kind:m.Unary},sendTraces:{name:"SendTraces",I:Dc,O:Ac,kind:m.Unary}}},Zs=s.makeEnum("viam.app.v1.CredentialsType",[{no:0,name:"CREDENTIALS_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"CREDENTIALS_TYPE_INTERNAL",localName:"INTERNAL"},{no:2,name:"CREDENTIALS_TYPE_API_KEY",localName:"API_KEY"},{no:3,name:"CREDENTIALS_TYPE_ROBOT_SECRET",localName:"ROBOT_SECRET"},{no:4,name:"CREDENTIALS_TYPE_ROBOT_LOCATION_SECRET",localName:"ROBOT_LOCATION_SECRET"}]),Ad=s.makeMessageType("viam.app.v1.RobotConfig",()=>[{no:1,name:"cloud",kind:"message",T:Bd},{no:2,name:"remotes",kind:"message",T:tl,repeated:!0},{no:3,name:"components",kind:"message",T:eo,repeated:!0},{no:4,name:"processes",kind:"message",T:Fd,repeated:!0},{no:5,name:"services",kind:"message",T:xd,repeated:!0},{no:6,name:"network",kind:"message",T:Jd,opt:!0},{no:7,name:"auth",kind:"message",T:$d,opt:!0},{no:8,name:"debug",kind:"scalar",T:8,opt:!0},{no:9,name:"modules",kind:"message",T:rl,repeated:!0},{no:10,name:"disable_partial_start",kind:"scalar",T:8,opt:!0},{no:11,name:"packages",kind:"message",T:ml,repeated:!0},{no:12,name:"overwrite_fragment_status",kind:"message",T:wa,repeated:!0},{no:13,name:"enable_web_profile",kind:"scalar",T:8},{no:14,name:"log",kind:"message",T:Ud,repeated:!0},{no:15,name:"revision",kind:"scalar",T:9},{no:16,name:"maintenance",kind:"message",T:cl,opt:!0},{no:17,name:"disable_log_deduplication",kind:"scalar",T:8},{no:18,name:"jobs",kind:"message",T:qd,repeated:!0},{no:19,name:"tracing",kind:"message",T:Ld,opt:!0}]),Ud=s.makeMessageType("viam.app.v1.LogPatternConfig",()=>[{no:1,name:"pattern",kind:"scalar",T:9},{no:2,name:"level",kind:"scalar",T:9}]),qd=s.makeMessageType("viam.app.v1.JobConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"schedule",kind:"scalar",T:9},{no:3,name:"resource",kind:"scalar",T:9},{no:4,name:"method",kind:"scalar",T:9},{no:5,name:"command",kind:"message",T:p},{no:6,name:"log_configuration",kind:"message",T:Na}]),Ld=s.makeMessageType("viam.app.v1.TracingConfig",()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"disk",kind:"scalar",T:8},{no:3,name:"console",kind:"scalar",T:8},{no:4,name:"otlp_endpoint",kind:"scalar",T:9}]),Gd=s.makeMessageType("viam.app.v1.LocationSecret",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"secret",kind:"scalar",T:9}]),wa=s.makeMessageType("viam.app.v1.AppValidationStatus",()=>[{no:1,name:"error",kind:"scalar",T:9}]),Bd=s.makeMessageType("viam.app.v1.CloudConfig",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"fqdn",kind:"scalar",T:9},{no:3,name:"local_fqdn",kind:"scalar",T:9},{no:4,name:"managed_by",kind:"scalar",T:9},{no:5,name:"signaling_address",kind:"scalar",T:9},{no:6,name:"signaling_insecure",kind:"scalar",T:8},{no:7,name:"location_secret",kind:"scalar",T:9},{no:8,name:"secret",kind:"scalar",T:9},{no:9,name:"location_secrets",kind:"message",T:Gd,repeated:!0},{no:10,name:"primary_org_id",kind:"scalar",T:9},{no:11,name:"location_id",kind:"scalar",T:9},{no:12,name:"machine_id",kind:"scalar",T:9}]),eo=s.makeMessageType("viam.app.v1.ComponentConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"namespace",kind:"scalar",T:9},{no:3,name:"type",kind:"scalar",T:9},{no:4,name:"model",kind:"scalar",T:9},{no:5,name:"frame",kind:"message",T:no},{no:6,name:"depends_on",kind:"scalar",T:9,repeated:!0},{no:7,name:"service_configs",kind:"message",T:Ca,repeated:!0},{no:8,name:"attributes",kind:"message",T:p},{no:9,name:"api",kind:"scalar",T:9},{no:10,name:"log_configuration",kind:"message",T:Na}]),Ca=s.makeMessageType("viam.app.v1.ResourceLevelServiceConfig",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"attributes",kind:"message",T:p}]),Fd=s.makeMessageType("viam.app.v1.ProcessConfig",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"args",kind:"scalar",T:9,repeated:!0},{no:4,name:"cwd",kind:"scalar",T:9},{no:5,name:"one_shot",kind:"scalar",T:8},{no:6,name:"log",kind:"scalar",T:8},{no:7,name:"stop_signal",kind:"scalar",T:5},{no:8,name:"stop_timeout",kind:"message",T:B},{no:9,name:"env",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:10,name:"username",kind:"scalar",T:9}]),xd=s.makeMessageType("viam.app.v1.ServiceConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"namespace",kind:"scalar",T:9},{no:3,name:"type",kind:"scalar",T:9},{no:4,name:"attributes",kind:"message",T:p},{no:5,name:"depends_on",kind:"scalar",T:9,repeated:!0},{no:6,name:"model",kind:"scalar",T:9},{no:9,name:"api",kind:"scalar",T:9},{no:10,name:"service_configs",kind:"message",T:Ca,repeated:!0},{no:11,name:"log_configuration",kind:"message",T:Na}]),Jd=s.makeMessageType("viam.app.v1.NetworkConfig",()=>[{no:1,name:"fqdn",kind:"scalar",T:9},{no:2,name:"bind_address",kind:"scalar",T:9},{no:3,name:"tls_cert_file",kind:"scalar",T:9},{no:4,name:"tls_key_file",kind:"scalar",T:9},{no:5,name:"sessions",kind:"message",T:zd},{no:6,name:"traffic_tunnel_endpoints",kind:"message",T:Vd,repeated:!0},{no:7,name:"no_tls",kind:"scalar",T:8}]),zd=s.makeMessageType("viam.app.v1.SessionsConfig",()=>[{no:1,name:"heartbeat_window",kind:"message",T:B}]),Vd=s.makeMessageType("viam.app.v1.TrafficTunnelEndpoint",()=>[{no:1,name:"port",kind:"scalar",T:5},{no:2,name:"connection_timeout",kind:"message",T:B}]),$d=s.makeMessageType("viam.app.v1.AuthConfig",()=>[{no:1,name:"handlers",kind:"message",T:jd,repeated:!0},{no:2,name:"tls_auth_entities",kind:"scalar",T:9,repeated:!0},{no:3,name:"external_auth_config",kind:"message",T:Wd,opt:!0}]),Yd=s.makeMessageType("viam.app.v1.JWKSFile",()=>[{no:1,name:"json",kind:"message",T:p}]),Wd=s.makeMessageType("viam.app.v1.ExternalAuthConfig",()=>[{no:1,name:"jwks",kind:"message",T:Yd}]),jd=s.makeMessageType("viam.app.v1.AuthHandlerConfig",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(Zs)},{no:5,name:"config",kind:"message",T:p}]),no=s.makeMessageType("viam.app.v1.Frame",()=>[{no:1,name:"parent",kind:"scalar",T:9},{no:2,name:"translation",kind:"message",T:Hd},{no:3,name:"orientation",kind:"message",T:Kd},{no:4,name:"geometry",kind:"message",T:Qe}]),Na=s.makeMessageType("viam.app.v1.LogConfiguration",()=>[{no:1,name:"level",kind:"scalar",T:9}]),Hd=s.makeMessageType("viam.app.v1.Translation",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1}]),Kd=s.makeMessageType("viam.app.v1.Orientation",()=>[{no:1,name:"no_orientation",kind:"message",T:Xd,oneof:"type"},{no:2,name:"vector_radians",kind:"message",T:Qd,oneof:"type"},{no:3,name:"vector_degrees",kind:"message",T:Zd,oneof:"type"},{no:4,name:"euler_angles",kind:"message",T:el,oneof:"type"},{no:5,name:"axis_angles",kind:"message",T:nl,oneof:"type"},{no:6,name:"quaternion",kind:"message",T:al,oneof:"type"}]),Xd=s.makeMessageType("viam.app.v1.Orientation.NoOrientation",[],{localName:"Orientation_NoOrientation"}),Qd=s.makeMessageType("viam.app.v1.Orientation.OrientationVectorRadians",()=>[{no:1,name:"theta",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_OrientationVectorRadians"}),Zd=s.makeMessageType("viam.app.v1.Orientation.OrientationVectorDegrees",()=>[{no:1,name:"theta",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_OrientationVectorDegrees"}),el=s.makeMessageType("viam.app.v1.Orientation.EulerAngles",()=>[{no:1,name:"roll",kind:"scalar",T:1},{no:2,name:"pitch",kind:"scalar",T:1},{no:3,name:"yaw",kind:"scalar",T:1}],{localName:"Orientation_EulerAngles"}),nl=s.makeMessageType("viam.app.v1.Orientation.AxisAngles",()=>[{no:1,name:"theta",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_AxisAngles"}),al=s.makeMessageType("viam.app.v1.Orientation.Quaternion",()=>[{no:1,name:"w",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_Quaternion"}),tl=s.makeMessageType("viam.app.v1.RemoteConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"address",kind:"scalar",T:9},{no:3,name:"frame",kind:"message",T:no},{no:4,name:"auth",kind:"message",T:sl},{no:5,name:"managed_by",kind:"scalar",T:9},{no:6,name:"insecure",kind:"scalar",T:8},{no:7,name:"connection_check_interval",kind:"message",T:B},{no:8,name:"reconnect_interval",kind:"message",T:B},{no:9,name:"service_configs",kind:"message",T:Ca,repeated:!0},{no:10,name:"secret",kind:"scalar",T:9},{no:11,name:"prefix",kind:"scalar",T:9}]),sl=s.makeMessageType("viam.app.v1.RemoteAuth",()=>[{no:1,name:"credentials",kind:"message",T:ol},{no:2,name:"entity",kind:"scalar",T:9}]),ol=s.makeMessageType("viam.app.v1.RemoteAuth.Credentials",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(Zs)},{no:2,name:"payload",kind:"scalar",T:9}],{localName:"RemoteAuth_Credentials"}),il=s.makeMessageType("viam.app.v1.AgentInfo",()=>[{no:1,name:"host",kind:"scalar",T:9},{no:2,name:"os",kind:"scalar",T:9},{no:3,name:"ips",kind:"scalar",T:9,repeated:!0},{no:4,name:"version",kind:"scalar",T:9},{no:5,name:"git_revision",kind:"scalar",T:9},{no:6,name:"platform",kind:"scalar",T:9,opt:!0},{no:7,name:"platform_tags",kind:"scalar",T:9,repeated:!0}]),D_=s.makeMessageType("viam.app.v1.ConfigRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"agent_info",kind:"message",T:il,opt:!0}]),A_=s.makeMessageType("viam.app.v1.ConfigResponse",()=>[{no:1,name:"config",kind:"message",T:Ad}]),U_=s.makeMessageType("viam.app.v1.CertificateRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),q_=s.makeMessageType("viam.app.v1.CertificateResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"tls_certificate",kind:"scalar",T:9},{no:3,name:"tls_private_key",kind:"scalar",T:9}]),L_=s.makeMessageType("viam.app.v1.LogRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"logs",kind:"message",T:Pn,repeated:!0}]),G_=s.makeMessageType("viam.app.v1.LogResponse",[]),B_=s.makeMessageType("viam.app.v1.NeedsRestartRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),F_=s.makeMessageType("viam.app.v1.NeedsRestartResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"must_restart",kind:"scalar",T:8},{no:3,name:"restart_check_interval",kind:"message",T:B}]),rl=s.makeMessageType("viam.app.v1.ModuleConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"path",kind:"scalar",T:9},{no:3,name:"log_level",kind:"scalar",T:9},{no:4,name:"type",kind:"scalar",T:9},{no:5,name:"module_id",kind:"scalar",T:9},{no:6,name:"env",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:7,name:"status",kind:"message",T:wa},{no:8,name:"first_run_timeout",kind:"message",T:B},{no:9,name:"tcp_mode",kind:"scalar",T:8}]),ml=s.makeMessageType("viam.app.v1.PackageConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"package",kind:"scalar",T:9},{no:3,name:"version",kind:"scalar",T:9},{no:4,name:"type",kind:"scalar",T:9},{no:5,name:"status",kind:"message",T:wa}]),cl=s.makeMessageType("viam.app.v1.MaintenanceConfig",()=>[{no:1,name:"sensor_name",kind:"message",T:F},{no:2,name:"maintenance_allowed_key",kind:"scalar",T:9}]),x_=Object.freeze(Object.defineProperty({__proto__:null,AgentInfo:il,AppValidationStatus:wa,AuthConfig:$d,AuthHandlerConfig:jd,CertificateRequest:U_,CertificateResponse:q_,CloudConfig:Bd,ComponentConfig:eo,ConfigRequest:D_,ConfigResponse:A_,CredentialsType:Zs,ExternalAuthConfig:Wd,Frame:no,JWKSFile:Yd,JobConfig:qd,LocationSecret:Gd,LogConfiguration:Na,LogPatternConfig:Ud,LogRequest:L_,LogResponse:G_,MaintenanceConfig:cl,ModuleConfig:rl,NeedsRestartRequest:B_,NeedsRestartResponse:F_,NetworkConfig:Jd,Orientation:Kd,Orientation_AxisAngles:nl,Orientation_EulerAngles:el,Orientation_NoOrientation:Xd,Orientation_OrientationVectorDegrees:Zd,Orientation_OrientationVectorRadians:Qd,Orientation_Quaternion:al,PackageConfig:ml,ProcessConfig:Fd,RemoteAuth:sl,RemoteAuth_Credentials:ol,RemoteConfig:tl,ResourceLevelServiceConfig:Ca,RobotConfig:Ad,ServiceConfig:xd,SessionsConfig:zd,TracingConfig:Ld,TrafficTunnelEndpoint:Vd,Translation:Hd},Symbol.toStringTag,{value:"Module"})),ao=s.makeMessageType("viam.service.discovery.v1.DiscoverResourcesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),dl=s.makeMessageType("viam.service.discovery.v1.DiscoverResourcesResponse",()=>[{no:1,name:"discoveries",kind:"message",T:eo,repeated:!0}]),J_=Object.freeze(Object.defineProperty({__proto__:null,DiscoverResourcesRequest:ao,DiscoverResourcesResponse:dl},Symbol.toStringTag,{value:"Module"})),ll={typeName:"viam.service.discovery.v1.DiscoveryService",methods:{discoverResources:{name:"DiscoverResources",I:ao,O:dl,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}},pl=s.makeEnum("viam.service.motion.v1.PlanState",[{no:0,name:"PLAN_STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PLAN_STATE_IN_PROGRESS",localName:"IN_PROGRESS"},{no:2,name:"PLAN_STATE_STOPPED",localName:"STOPPED"},{no:3,name:"PLAN_STATE_SUCCEEDED",localName:"SUCCEEDED"},{no:4,name:"PLAN_STATE_FAILED",localName:"FAILED"}]),to=s.makeMessageType("viam.service.motion.v1.MoveRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"destination",kind:"message",T:Ve},{no:3,name:"component_name_deprecated",kind:"message",T:F},{no:4,name:"world_state",kind:"message",T:Fr,opt:!0},{no:5,name:"constraints",kind:"message",T:Rl,opt:!0},{no:6,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),ul=s.makeMessageType("viam.service.motion.v1.MoveResponse",()=>[{no:1,name:"success",kind:"scalar",T:8}]),so=s.makeMessageType("viam.service.motion.v1.MoveOnMapRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"destination",kind:"message",T:Ue},{no:3,name:"component_name_deprecated",kind:"message",T:F},{no:4,name:"slam_service_name_deprecated",kind:"message",T:F},{no:5,name:"motion_configuration",kind:"message",T:oo,opt:!0},{no:6,name:"obstacles",kind:"message",T:Qe,repeated:!0},{no:7,name:"component_name",kind:"scalar",T:9},{no:8,name:"slam_service_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),gl=s.makeMessageType("viam.service.motion.v1.MoveOnMapResponse",()=>[{no:1,name:"execution_id",kind:"scalar",T:9}]),Tl=s.makeMessageType("viam.service.motion.v1.ObstacleDetector",()=>[{no:1,name:"vision_service_deprecated",kind:"message",T:F},{no:2,name:"camera_deprecated",kind:"message",T:F},{no:3,name:"vision_service",kind:"scalar",T:9},{no:4,name:"camera",kind:"scalar",T:9}]),oo=s.makeMessageType("viam.service.motion.v1.MotionConfiguration",()=>[{no:1,name:"obstacle_detectors",kind:"message",T:Tl,repeated:!0},{no:2,name:"position_polling_frequency_hz",kind:"scalar",T:1,opt:!0},{no:3,name:"obstacle_polling_frequency_hz",kind:"scalar",T:1,opt:!0},{no:4,name:"plan_deviation_m",kind:"scalar",T:1,opt:!0},{no:5,name:"linear_m_per_sec",kind:"scalar",T:1,opt:!0},{no:6,name:"angular_degs_per_sec",kind:"scalar",T:1,opt:!0}]),io=s.makeMessageType("viam.service.motion.v1.MoveOnGlobeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"destination",kind:"message",T:$e},{no:3,name:"heading",kind:"scalar",T:1,opt:!0},{no:4,name:"component_name_deprecated",kind:"message",T:F},{no:5,name:"movement_sensor_name_deprecated",kind:"message",T:F},{no:6,name:"obstacles",kind:"message",T:Ea,repeated:!0},{no:7,name:"motion_configuration",kind:"message",T:oo,opt:!0},{no:8,name:"bounding_regions",kind:"message",T:Ea,repeated:!0},{no:9,name:"component_name",kind:"scalar",T:9},{no:10,name:"movement_sensor_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),kl=s.makeMessageType("viam.service.motion.v1.MoveOnGlobeResponse",()=>[{no:1,name:"execution_id",kind:"scalar",T:9}]),ro=s.makeMessageType("viam.service.motion.v1.GetPoseRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:F},{no:3,name:"destination_frame",kind:"scalar",T:9},{no:4,name:"supplemental_transforms",kind:"message",T:Le,repeated:!0},{no:5,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),yl=s.makeMessageType("viam.service.motion.v1.GetPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:Ve}]),mo=s.makeMessageType("viam.service.motion.v1.StopPlanRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:F},{no:3,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),vl=s.makeMessageType("viam.service.motion.v1.StopPlanResponse",[]),co=s.makeMessageType("viam.service.motion.v1.ListPlanStatusesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"only_active_plans",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),hl=s.makeMessageType("viam.service.motion.v1.ListPlanStatusesResponse",()=>[{no:1,name:"plan_statuses_with_ids",kind:"message",T:bl,repeated:!0}]),lo=s.makeMessageType("viam.service.motion.v1.GetPlanRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:F},{no:3,name:"last_plan_only",kind:"scalar",T:8},{no:4,name:"execution_id",kind:"scalar",T:9,opt:!0},{no:5,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),fl=s.makeMessageType("viam.service.motion.v1.GetPlanResponse",()=>[{no:1,name:"current_plan_with_status",kind:"message",T:po},{no:2,name:"replan_history",kind:"message",T:po,repeated:!0}]),Rl=s.makeMessageType("viam.service.motion.v1.Constraints",()=>[{no:1,name:"linear_constraint",kind:"message",T:_l,repeated:!0},{no:2,name:"orientation_constraint",kind:"message",T:Il,repeated:!0},{no:3,name:"collision_specification",kind:"message",T:El,repeated:!0},{no:4,name:"pseudolinear_constraint",kind:"message",T:Sl,repeated:!0}]),_l=s.makeMessageType("viam.service.motion.v1.LinearConstraint",()=>[{no:1,name:"line_tolerance_mm",kind:"scalar",T:2,opt:!0},{no:2,name:"orientation_tolerance_degs",kind:"scalar",T:2,opt:!0}]),Sl=s.makeMessageType("viam.service.motion.v1.PseudolinearConstraint",()=>[{no:1,name:"line_tolerance_factor",kind:"scalar",T:2,opt:!0},{no:2,name:"orientation_tolerance_factor",kind:"scalar",T:2,opt:!0}]),Il=s.makeMessageType("viam.service.motion.v1.OrientationConstraint",()=>[{no:1,name:"orientation_tolerance_degs",kind:"scalar",T:2,opt:!0}]),El=s.makeMessageType("viam.service.motion.v1.CollisionSpecification",()=>[{no:1,name:"allows",kind:"message",T:Ml,repeated:!0}]),Ml=s.makeMessageType("viam.service.motion.v1.CollisionSpecification.AllowedFrameCollisions",()=>[{no:1,name:"frame1",kind:"scalar",T:9},{no:2,name:"frame2",kind:"scalar",T:9}],{localName:"CollisionSpecification_AllowedFrameCollisions"}),po=s.makeMessageType("viam.service.motion.v1.PlanWithStatus",()=>[{no:1,name:"plan",kind:"message",T:Ol},{no:2,name:"status",kind:"message",T:Pa},{no:3,name:"status_history",kind:"message",T:Pa,repeated:!0}]),bl=s.makeMessageType("viam.service.motion.v1.PlanStatusWithID",()=>[{no:1,name:"plan_id",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:F},{no:3,name:"execution_id",kind:"scalar",T:9},{no:4,name:"status",kind:"message",T:Pa},{no:5,name:"component_name",kind:"scalar",T:9}]),Pa=s.makeMessageType("viam.service.motion.v1.PlanStatus",()=>[{no:1,name:"state",kind:"enum",T:s.getEnumType(pl)},{no:2,name:"timestamp",kind:"message",T:S},{no:3,name:"reason",kind:"scalar",T:9,opt:!0}]),Ol=s.makeMessageType("viam.service.motion.v1.Plan",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:F},{no:3,name:"execution_id",kind:"scalar",T:9},{no:4,name:"steps",kind:"message",T:wl,repeated:!0},{no:5,name:"component_name",kind:"scalar",T:9}]),wl=s.makeMessageType("viam.service.motion.v1.PlanStep",()=>[{no:1,name:"step",kind:"map",K:9,V:{kind:"message",T:Cl}}]),Cl=s.makeMessageType("viam.service.motion.v1.ComponentState",()=>[{no:1,name:"pose",kind:"message",T:Ue}]),Nl=Object.freeze(Object.defineProperty({__proto__:null,CollisionSpecification:El,CollisionSpecification_AllowedFrameCollisions:Ml,ComponentState:Cl,Constraints:Rl,GetPlanRequest:lo,GetPlanResponse:fl,GetPoseRequest:ro,GetPoseResponse:yl,LinearConstraint:_l,ListPlanStatusesRequest:co,ListPlanStatusesResponse:hl,MotionConfiguration:oo,MoveOnGlobeRequest:io,MoveOnGlobeResponse:kl,MoveOnMapRequest:so,MoveOnMapResponse:gl,MoveRequest:to,MoveResponse:ul,ObstacleDetector:Tl,OrientationConstraint:Il,Plan:Ol,PlanState:pl,PlanStatus:Pa,PlanStatusWithID:bl,PlanStep:wl,PlanWithStatus:po,PseudolinearConstraint:Sl,StopPlanRequest:mo,StopPlanResponse:vl},Symbol.toStringTag,{value:"Module"})),Pl={typeName:"viam.service.motion.v1.MotionService",methods:{move:{name:"Move",I:to,O:ul,kind:m.Unary},moveOnMap:{name:"MoveOnMap",I:so,O:gl,kind:m.Unary},moveOnGlobe:{name:"MoveOnGlobe",I:io,O:kl,kind:m.Unary},getPose:{name:"GetPose",I:ro,O:yl,kind:m.Unary},stopPlan:{name:"StopPlan",I:mo,O:vl,kind:m.Unary},listPlanStatuses:{name:"ListPlanStatuses",I:co,O:hl,kind:m.Unary},getPlan:{name:"GetPlan",I:lo,O:fl,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}},Dl=s.makeEnum("viam.service.navigation.v1.MapType",[{no:0,name:"MAP_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MAP_TYPE_NONE",localName:"NONE"},{no:2,name:"MAP_TYPE_GPS",localName:"GPS"}]),uo=s.makeEnum("viam.service.navigation.v1.Mode",[{no:0,name:"MODE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODE_MANUAL",localName:"MANUAL"},{no:2,name:"MODE_WAYPOINT",localName:"WAYPOINT"},{no:3,name:"MODE_EXPLORE",localName:"EXPLORE"}]),go=s.makeMessageType("viam.service.navigation.v1.GetModeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Al=s.makeMessageType("viam.service.navigation.v1.GetModeResponse",()=>[{no:1,name:"mode",kind:"enum",T:s.getEnumType(uo)}]),To=s.makeMessageType("viam.service.navigation.v1.SetModeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"mode",kind:"enum",T:s.getEnumType(uo)},{no:99,name:"extra",kind:"message",T:p}]),Ul=s.makeMessageType("viam.service.navigation.v1.SetModeResponse",[]),ql=s.makeMessageType("viam.service.navigation.v1.Waypoint",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"location",kind:"message",T:$e}]),ko=s.makeMessageType("viam.service.navigation.v1.GetLocationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ll=s.makeMessageType("viam.service.navigation.v1.GetLocationResponse",()=>[{no:1,name:"location",kind:"message",T:$e},{no:2,name:"compass_heading",kind:"scalar",T:1}]),yo=s.makeMessageType("viam.service.navigation.v1.GetWaypointsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Gl=s.makeMessageType("viam.service.navigation.v1.GetWaypointsResponse",()=>[{no:1,name:"waypoints",kind:"message",T:ql,repeated:!0}]),vo=s.makeMessageType("viam.service.navigation.v1.AddWaypointRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"location",kind:"message",T:$e},{no:99,name:"extra",kind:"message",T:p}]),Bl=s.makeMessageType("viam.service.navigation.v1.AddWaypointResponse",[]),ho=s.makeMessageType("viam.service.navigation.v1.RemoveWaypointRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"id",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Fl=s.makeMessageType("viam.service.navigation.v1.RemoveWaypointResponse",[]),fo=s.makeMessageType("viam.service.navigation.v1.GetObstaclesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),xl=s.makeMessageType("viam.service.navigation.v1.GetObstaclesResponse",()=>[{no:1,name:"obstacles",kind:"message",T:Ea,repeated:!0}]),Jl=s.makeMessageType("viam.service.navigation.v1.Path",()=>[{no:1,name:"destination_waypoint_id",kind:"scalar",T:9},{no:2,name:"geopoints",kind:"message",T:$e,repeated:!0}]),Ro=s.makeMessageType("viam.service.navigation.v1.GetPathsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),zl=s.makeMessageType("viam.service.navigation.v1.GetPathsResponse",()=>[{no:1,name:"paths",kind:"message",T:Jl,repeated:!0}]),_o=s.makeMessageType("viam.service.navigation.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Vl=s.makeMessageType("viam.service.navigation.v1.GetPropertiesResponse",()=>[{no:1,name:"map_type",kind:"enum",T:s.getEnumType(Dl)}]),$l=Object.freeze(Object.defineProperty({__proto__:null,AddWaypointRequest:vo,AddWaypointResponse:Bl,GetLocationRequest:ko,GetLocationResponse:Ll,GetModeRequest:go,GetModeResponse:Al,GetObstaclesRequest:fo,GetObstaclesResponse:xl,GetPathsRequest:Ro,GetPathsResponse:zl,GetPropertiesRequest:_o,GetPropertiesResponse:Vl,GetWaypointsRequest:yo,GetWaypointsResponse:Gl,MapType:Dl,Mode:uo,Path:Jl,RemoveWaypointRequest:ho,RemoveWaypointResponse:Fl,SetModeRequest:To,SetModeResponse:Ul,Waypoint:ql},Symbol.toStringTag,{value:"Module"})),Yl={typeName:"viam.service.navigation.v1.NavigationService",methods:{getMode:{name:"GetMode",I:go,O:Al,kind:m.Unary},setMode:{name:"SetMode",I:To,O:Ul,kind:m.Unary},getLocation:{name:"GetLocation",I:ko,O:Ll,kind:m.Unary},getWaypoints:{name:"GetWaypoints",I:yo,O:Gl,kind:m.Unary},addWaypoint:{name:"AddWaypoint",I:vo,O:Bl,kind:m.Unary},removeWaypoint:{name:"RemoveWaypoint",I:ho,O:Fl,kind:m.Unary},getObstacles:{name:"GetObstacles",I:fo,O:xl,kind:m.Unary},getPaths:{name:"GetPaths",I:Ro,O:zl,kind:m.Unary},getProperties:{name:"GetProperties",I:_o,O:Vl,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}},Wl=s.makeEnum("viam.service.slam.v1.MappingMode",[{no:0,name:"MAPPING_MODE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MAPPING_MODE_CREATE_NEW_MAP",localName:"CREATE_NEW_MAP"},{no:2,name:"MAPPING_MODE_LOCALIZE_ONLY",localName:"LOCALIZE_ONLY"},{no:3,name:"MAPPING_MODE_UPDATE_EXISTING_MAP",localName:"UPDATE_EXISTING_MAP"}]),jl=s.makeEnum("viam.service.slam.v1.SensorType",[{no:0,name:"SENSOR_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"SENSOR_TYPE_CAMERA",localName:"CAMERA"},{no:2,name:"SENSOR_TYPE_MOVEMENT_SENSOR",localName:"MOVEMENT_SENSOR"}]),So=s.makeMessageType("viam.service.slam.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Hl=s.makeMessageType("viam.service.slam.v1.GetPositionResponse",()=>[{no:1,name:"pose",kind:"message",T:Ue}]),Io=s.makeMessageType("viam.service.slam.v1.GetPointCloudMapRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"return_edited_map",kind:"scalar",T:8,opt:!0}]),Kl=s.makeMessageType("viam.service.slam.v1.GetPointCloudMapResponse",()=>[{no:1,name:"point_cloud_pcd_chunk",kind:"scalar",T:12}]),Eo=s.makeMessageType("viam.service.slam.v1.GetInternalStateRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Xl=s.makeMessageType("viam.service.slam.v1.GetInternalStateResponse",()=>[{no:1,name:"internal_state_chunk",kind:"scalar",T:12}]),Mo=s.makeMessageType("viam.service.slam.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Ql=s.makeMessageType("viam.service.slam.v1.GetPropertiesResponse",()=>[{no:1,name:"cloud_slam",kind:"scalar",T:8},{no:2,name:"mapping_mode",kind:"enum",T:s.getEnumType(Wl)},{no:3,name:"internal_state_file_type",kind:"scalar",T:9,opt:!0},{no:4,name:"sensor_info",kind:"message",T:Zl,repeated:!0}]),Zl=s.makeMessageType("viam.service.slam.v1.SensorInfo",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:s.getEnumType(jl)}]),ep=Object.freeze(Object.defineProperty({__proto__:null,GetInternalStateRequest:Eo,GetInternalStateResponse:Xl,GetPointCloudMapRequest:Io,GetPointCloudMapResponse:Kl,GetPositionRequest:So,GetPositionResponse:Hl,GetPropertiesRequest:Mo,GetPropertiesResponse:Ql,MappingMode:Wl,SensorInfo:Zl,SensorType:jl},Symbol.toStringTag,{value:"Module"})),np={typeName:"viam.service.slam.v1.SLAMService",methods:{getPosition:{name:"GetPosition",I:So,O:Hl,kind:m.Unary},getPointCloudMap:{name:"GetPointCloudMap",I:Io,O:Kl,kind:m.ServerStreaming},getInternalState:{name:"GetInternalState",I:Eo,O:Xl,kind:m.ServerStreaming},getProperties:{name:"GetProperties",I:Mo,O:Ql,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}},ap=s.makeEnum("viam.app.data.v1.Order",[{no:0,name:"ORDER_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"ORDER_DESCENDING",localName:"DESCENDING"},{no:2,name:"ORDER_ASCENDING",localName:"ASCENDING"}]),tp=s.makeEnum("viam.app.data.v1.TagsFilterType",[{no:0,name:"TAGS_FILTER_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TAGS_FILTER_TYPE_MATCH_BY_OR",localName:"MATCH_BY_OR"},{no:2,name:"TAGS_FILTER_TYPE_TAGGED",localName:"TAGGED"},{no:3,name:"TAGS_FILTER_TYPE_UNTAGGED",localName:"UNTAGGED"}]),en=s.makeEnum("viam.app.data.v1.TabularDataSourceType",[{no:0,name:"TABULAR_DATA_SOURCE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TABULAR_DATA_SOURCE_TYPE_STANDARD",localName:"STANDARD"},{no:2,name:"TABULAR_DATA_SOURCE_TYPE_HOT_STORAGE",localName:"HOT_STORAGE"},{no:3,name:"TABULAR_DATA_SOURCE_TYPE_PIPELINE_SINK",localName:"PIPELINE_SINK"}]),Ln=s.makeEnum("viam.app.data.v1.IndexableCollection",[{no:0,name:"INDEXABLE_COLLECTION_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"INDEXABLE_COLLECTION_HOT_STORE",localName:"HOT_STORE"},{no:2,name:"INDEXABLE_COLLECTION_PIPELINE_SINK",localName:"PIPELINE_SINK"}]),sp=s.makeEnum("viam.app.data.v1.IndexCreator",[{no:0,name:"INDEX_CREATOR_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"INDEX_CREATOR_VIAM",localName:"VIAM"},{no:2,name:"INDEX_CREATOR_CUSTOMER",localName:"CUSTOMER"}]),bo=s.makeMessageType("viam.app.data.v1.DataRequest",()=>[{no:1,name:"filter",kind:"message",T:Ye},{no:2,name:"limit",kind:"scalar",T:4},{no:3,name:"last",kind:"scalar",T:9},{no:4,name:"sort_order",kind:"enum",T:s.getEnumType(ap)}]),Ye=s.makeMessageType("viam.app.data.v1.Filter",()=>[{no:1,name:"component_name",kind:"scalar",T:9},{no:2,name:"component_type",kind:"scalar",T:9},{no:4,name:"method",kind:"scalar",T:9},{no:6,name:"robot_name",kind:"scalar",T:9},{no:7,name:"robot_id",kind:"scalar",T:9},{no:8,name:"part_name",kind:"scalar",T:9},{no:9,name:"part_id",kind:"scalar",T:9},{no:10,name:"location_ids",kind:"scalar",T:9,repeated:!0},{no:11,name:"organization_ids",kind:"scalar",T:9,repeated:!0},{no:12,name:"mime_type",kind:"scalar",T:9,repeated:!0},{no:13,name:"interval",kind:"message",T:Gn},{no:14,name:"tags_filter",kind:"message",T:Oo},{no:15,name:"bbox_labels",kind:"scalar",T:9,repeated:!0},{no:16,name:"dataset_id",kind:"scalar",T:9}]),Oo=s.makeMessageType("viam.app.data.v1.TagsFilter",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(tp)},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Da=s.makeMessageType("viam.app.data.v1.CaptureMetadata",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9},{no:3,name:"robot_name",kind:"scalar",T:9},{no:4,name:"robot_id",kind:"scalar",T:9},{no:5,name:"part_name",kind:"scalar",T:9},{no:6,name:"part_id",kind:"scalar",T:9},{no:7,name:"component_type",kind:"scalar",T:9},{no:9,name:"component_name",kind:"scalar",T:9},{no:10,name:"method_name",kind:"scalar",T:9},{no:11,name:"method_parameters",kind:"map",K:9,V:{kind:"message",T:K}},{no:12,name:"tags",kind:"scalar",T:9,repeated:!0},{no:13,name:"mime_type",kind:"scalar",T:9}]),Gn=s.makeMessageType("viam.app.data.v1.CaptureInterval",()=>[{no:1,name:"start",kind:"message",T:S},{no:2,name:"end",kind:"message",T:S}]),op=s.makeMessageType("viam.app.data.v1.TabularDataByFilterRequest",()=>[{no:1,name:"data_request",kind:"message",T:bo},{no:2,name:"count_only",kind:"scalar",T:8},{no:3,name:"include_internal_data",kind:"scalar",T:8}]),ip=s.makeMessageType("viam.app.data.v1.TabularDataByFilterResponse",()=>[{no:1,name:"metadata",kind:"message",T:Da,repeated:!0},{no:2,name:"data",kind:"message",T:rp,repeated:!0},{no:3,name:"count",kind:"scalar",T:4},{no:4,name:"last",kind:"scalar",T:9},{no:5,name:"total_size_bytes",kind:"scalar",T:4}]),rp=s.makeMessageType("viam.app.data.v1.TabularData",()=>[{no:1,name:"data",kind:"message",T:p},{no:2,name:"metadata_index",kind:"scalar",T:13},{no:3,name:"time_requested",kind:"message",T:S},{no:4,name:"time_received",kind:"message",T:S}]),mp=s.makeMessageType("viam.app.data.v1.TabularDataBySQLRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"sql_query",kind:"scalar",T:9}]),cp=s.makeMessageType("viam.app.data.v1.TabularDataBySQLResponse",()=>[{no:2,name:"raw_data",kind:"scalar",T:12,repeated:!0}]),wo=s.makeMessageType("viam.app.data.v1.TabularDataSource",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(en)},{no:2,name:"pipeline_id",kind:"scalar",T:9,opt:!0}]),dp=s.makeMessageType("viam.app.data.v1.TabularDataByMQLRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:4,name:"use_recent_data",kind:"scalar",T:8,opt:!0},{no:6,name:"data_source",kind:"message",T:wo,opt:!0},{no:7,name:"query_prefix_name",kind:"scalar",T:9,opt:!0}]),lp=s.makeMessageType("viam.app.data.v1.TabularDataByMQLResponse",()=>[{no:2,name:"raw_data",kind:"scalar",T:12,repeated:!0}]),pp=s.makeMessageType("viam.app.data.v1.ExportTabularDataRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"resource_subtype",kind:"scalar",T:9},{no:4,name:"method_name",kind:"scalar",T:9},{no:5,name:"interval",kind:"message",T:Gn},{no:6,name:"additional_parameters",kind:"message",T:p,opt:!0}]),up=s.makeMessageType("viam.app.data.v1.ExportTabularDataResponse",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"resource_subtype",kind:"scalar",T:9},{no:4,name:"method_name",kind:"scalar",T:9},{no:5,name:"time_captured",kind:"message",T:S},{no:6,name:"organization_id",kind:"scalar",T:9},{no:7,name:"location_id",kind:"scalar",T:9},{no:8,name:"robot_name",kind:"scalar",T:9},{no:9,name:"robot_id",kind:"scalar",T:9},{no:10,name:"part_name",kind:"scalar",T:9},{no:11,name:"method_parameters",kind:"message",T:p},{no:12,name:"tags",kind:"scalar",T:9,repeated:!0},{no:13,name:"payload",kind:"message",T:p}]),gp=s.makeMessageType("viam.app.data.v1.GetLatestTabularDataRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"method_name",kind:"scalar",T:9},{no:4,name:"resource_subtype",kind:"scalar",T:9},{no:5,name:"additional_parameters",kind:"message",T:p,opt:!0}]),Tp=s.makeMessageType("viam.app.data.v1.GetLatestTabularDataResponse",()=>[{no:1,name:"time_captured",kind:"message",T:S},{no:2,name:"time_synced",kind:"message",T:S},{no:3,name:"payload",kind:"message",T:p}]),Co=s.makeMessageType("viam.app.data.v1.BinaryData",()=>[{no:1,name:"binary",kind:"scalar",T:12},{no:2,name:"metadata",kind:"message",T:_p}]),kp=s.makeMessageType("viam.app.data.v1.BinaryDataByFilterRequest",()=>[{no:1,name:"data_request",kind:"message",T:bo},{no:2,name:"include_binary",kind:"scalar",T:8},{no:3,name:"count_only",kind:"scalar",T:8},{no:4,name:"include_internal_data",kind:"scalar",T:8}]),yp=s.makeMessageType("viam.app.data.v1.BinaryDataByFilterResponse",()=>[{no:1,name:"data",kind:"message",T:Co,repeated:!0},{no:2,name:"count",kind:"scalar",T:4},{no:3,name:"last",kind:"scalar",T:9},{no:4,name:"total_size_bytes",kind:"scalar",T:4}]),de=s.makeMessageType("viam.app.data.v1.BinaryID",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"location_id",kind:"scalar",T:9}]),vp=s.makeMessageType("viam.app.data.v1.BinaryDataByIDsRequest",()=>[{no:2,name:"include_binary",kind:"scalar",T:8},{no:3,name:"binary_ids",kind:"message",T:de,repeated:!0},{no:4,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0}]),hp=s.makeMessageType("viam.app.data.v1.BinaryDataByIDsResponse",()=>[{no:1,name:"data",kind:"message",T:Co,repeated:!0},{no:2,name:"count",kind:"scalar",T:4}]),fp=s.makeMessageType("viam.app.data.v1.BoundingBox",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"label",kind:"scalar",T:9},{no:3,name:"x_min_normalized",kind:"scalar",T:1},{no:4,name:"y_min_normalized",kind:"scalar",T:1},{no:5,name:"x_max_normalized",kind:"scalar",T:1},{no:6,name:"y_max_normalized",kind:"scalar",T:1},{no:7,name:"confidence",kind:"scalar",T:1,opt:!0}]),Rp=s.makeMessageType("viam.app.data.v1.Classification",()=>[{no:3,name:"id",kind:"scalar",T:9},{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"confidence",kind:"scalar",T:1,opt:!0}]),Aa=s.makeMessageType("viam.app.data.v1.Annotations",()=>[{no:1,name:"bboxes",kind:"message",T:fp,repeated:!0},{no:2,name:"classifications",kind:"message",T:Rp,repeated:!0}]),_p=s.makeMessageType("viam.app.data.v1.BinaryMetadata",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"capture_metadata",kind:"message",T:Da},{no:3,name:"time_requested",kind:"message",T:S},{no:4,name:"time_received",kind:"message",T:S},{no:5,name:"file_name",kind:"scalar",T:9},{no:6,name:"file_ext",kind:"scalar",T:9},{no:7,name:"uri",kind:"scalar",T:9},{no:8,name:"annotations",kind:"message",T:Aa},{no:9,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:10,name:"binary_data_id",kind:"scalar",T:9}]),Sp=s.makeMessageType("viam.app.data.v1.DeleteTabularDataRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"delete_older_than_days",kind:"scalar",T:13}]),Ip=s.makeMessageType("viam.app.data.v1.DeleteTabularDataResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Ep=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ye},{no:2,name:"include_internal_data",kind:"scalar",T:8}]),Mp=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByFilterResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),bp=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByIDsRequest",()=>[{no:2,name:"binary_ids",kind:"message",T:de,repeated:!0},{no:3,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0}]),Op=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByIDsResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),wp=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByIDsRequest",()=>[{no:3,name:"binary_ids",kind:"message",T:de,repeated:!0},{no:4,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Cp=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByIDsResponse",[]),Np=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ye},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Pp=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByFilterResponse",[]),Dp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByIDsRequest",()=>[{no:3,name:"binary_ids",kind:"message",T:de,repeated:!0},{no:4,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Ap=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByIDsResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Up=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ye},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),qp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByFilterResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Lp=s.makeMessageType("viam.app.data.v1.TagsByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ye}]),Gp=s.makeMessageType("viam.app.data.v1.TagsByFilterResponse",()=>[{no:1,name:"tags",kind:"scalar",T:9,repeated:!0}]),Bp=s.makeMessageType("viam.app.data.v1.AddBoundingBoxToImageByIDRequest",()=>[{no:7,name:"binary_id",kind:"message",T:de},{no:8,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"label",kind:"scalar",T:9},{no:3,name:"x_min_normalized",kind:"scalar",T:1},{no:4,name:"y_min_normalized",kind:"scalar",T:1},{no:5,name:"x_max_normalized",kind:"scalar",T:1},{no:6,name:"y_max_normalized",kind:"scalar",T:1},{no:9,name:"confidence",kind:"scalar",T:1,opt:!0}]),Fp=s.makeMessageType("viam.app.data.v1.AddBoundingBoxToImageByIDResponse",()=>[{no:1,name:"bbox_id",kind:"scalar",T:9}]),xp=s.makeMessageType("viam.app.data.v1.RemoveBoundingBoxFromImageByIDRequest",()=>[{no:3,name:"binary_id",kind:"message",T:de},{no:4,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"bbox_id",kind:"scalar",T:9}]),Jp=s.makeMessageType("viam.app.data.v1.RemoveBoundingBoxFromImageByIDResponse",[]),zp=s.makeMessageType("viam.app.data.v1.UpdateBoundingBoxRequest",()=>[{no:1,name:"binary_id",kind:"message",T:de},{no:8,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"bbox_id",kind:"scalar",T:9},{no:3,name:"label",kind:"scalar",T:9,opt:!0},{no:4,name:"x_min_normalized",kind:"scalar",T:1,opt:!0},{no:5,name:"y_min_normalized",kind:"scalar",T:1,opt:!0},{no:6,name:"x_max_normalized",kind:"scalar",T:1,opt:!0},{no:7,name:"y_max_normalized",kind:"scalar",T:1,opt:!0},{no:9,name:"confidence",kind:"scalar",T:1,opt:!0}]),Vp=s.makeMessageType("viam.app.data.v1.UpdateBoundingBoxResponse",[]),$p=s.makeMessageType("viam.app.data.v1.BoundingBoxLabelsByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ye}]),Yp=s.makeMessageType("viam.app.data.v1.BoundingBoxLabelsByFilterResponse",()=>[{no:1,name:"labels",kind:"scalar",T:9,repeated:!0}]),Wp=s.makeMessageType("viam.app.data.v1.ConfigureDatabaseUserRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"password",kind:"scalar",T:9}]),jp=s.makeMessageType("viam.app.data.v1.ConfigureDatabaseUserResponse",[]),Hp=s.makeMessageType("viam.app.data.v1.GetDatabaseConnectionRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),Kp=s.makeMessageType("viam.app.data.v1.GetDatabaseConnectionResponse",()=>[{no:1,name:"hostname",kind:"scalar",T:9},{no:2,name:"mongodb_uri",kind:"scalar",T:9},{no:3,name:"has_database_user",kind:"scalar",T:8}]),Xp=s.makeMessageType("viam.app.data.v1.AddBinaryDataToDatasetByIDsRequest",()=>[{no:1,name:"binary_ids",kind:"message",T:de,repeated:!0},{no:3,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"dataset_id",kind:"scalar",T:9}]),Qp=s.makeMessageType("viam.app.data.v1.AddBinaryDataToDatasetByIDsResponse",[]),Zp=s.makeMessageType("viam.app.data.v1.RemoveBinaryDataFromDatasetByIDsRequest",()=>[{no:1,name:"binary_ids",kind:"message",T:de,repeated:!0},{no:3,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"dataset_id",kind:"scalar",T:9}]),eu=s.makeMessageType("viam.app.data.v1.RemoveBinaryDataFromDatasetByIDsResponse",[]),nu=s.makeMessageType("viam.app.data.v1.CreateIndexRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"collection_type",kind:"enum",T:s.getEnumType(Ln)},{no:3,name:"pipeline_name",kind:"scalar",T:9,opt:!0},{no:4,name:"index_spec",kind:"scalar",T:12,repeated:!0}]),au=s.makeMessageType("viam.app.data.v1.CreateIndexResponse",[]),tu=s.makeMessageType("viam.app.data.v1.DeleteIndexRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"collection_type",kind:"enum",T:s.getEnumType(Ln)},{no:3,name:"pipeline_name",kind:"scalar",T:9,opt:!0},{no:4,name:"index_name",kind:"scalar",T:9}]),su=s.makeMessageType("viam.app.data.v1.DeleteIndexResponse",[]),ou=s.makeMessageType("viam.app.data.v1.ListIndexesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"collection_type",kind:"enum",T:s.getEnumType(Ln)},{no:3,name:"pipeline_name",kind:"scalar",T:9,opt:!0}]),iu=s.makeMessageType("viam.app.data.v1.ListIndexesResponse",()=>[{no:1,name:"indexes",kind:"message",T:ru,repeated:!0}]),ru=s.makeMessageType("viam.app.data.v1.Index",()=>[{no:1,name:"collection_type",kind:"enum",T:s.getEnumType(Ln)},{no:2,name:"pipeline_name",kind:"scalar",T:9,opt:!0},{no:3,name:"index_name",kind:"scalar",T:9},{no:4,name:"index_spec",kind:"scalar",T:12,repeated:!0},{no:5,name:"created_by",kind:"enum",T:s.getEnumType(sp)}]),mu=s.makeMessageType("viam.app.data.v1.CreateSavedQueryRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0}]),cu=s.makeMessageType("viam.app.data.v1.CreateSavedQueryResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),No=s.makeMessageType("viam.app.data.v1.Query",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:5,name:"created_on",kind:"message",T:S},{no:6,name:"updated_at",kind:"message",T:S}]),du=s.makeMessageType("viam.app.data.v1.DeleteSavedQueryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),lu=s.makeMessageType("viam.app.data.v1.DeleteSavedQueryResponse",[]),pu=s.makeMessageType("viam.app.data.v1.GetSavedQueryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),uu=s.makeMessageType("viam.app.data.v1.GetSavedQueryResponse",()=>[{no:1,name:"saved_query",kind:"message",T:No}]),gu=s.makeMessageType("viam.app.data.v1.UpdateSavedQueryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0}]),Tu=s.makeMessageType("viam.app.data.v1.UpdateSavedQueryResponse",[]),ku=s.makeMessageType("viam.app.data.v1.ListSavedQueriesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"limit",kind:"scalar",T:3}]),yu=s.makeMessageType("viam.app.data.v1.ListSavedQueriesResponse",()=>[{no:1,name:"queries",kind:"message",T:No,repeated:!0}]),vu=s.makeMessageType("viam.app.data.v1.CreateBinaryDataSignedURLRequest",()=>[{no:1,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"expiration_minutes",kind:"scalar",T:13,opt:!0}]),hu=s.makeMessageType("viam.app.data.v1.CreateBinaryDataSignedURLResponse",()=>[{no:1,name:"signed_url",kind:"scalar",T:9},{no:2,name:"expires_at",kind:"message",T:S}]),z_=Object.freeze(Object.defineProperty({__proto__:null,AddBinaryDataToDatasetByIDsRequest:Xp,AddBinaryDataToDatasetByIDsResponse:Qp,AddBoundingBoxToImageByIDRequest:Bp,AddBoundingBoxToImageByIDResponse:Fp,AddTagsToBinaryDataByFilterRequest:Np,AddTagsToBinaryDataByFilterResponse:Pp,AddTagsToBinaryDataByIDsRequest:wp,AddTagsToBinaryDataByIDsResponse:Cp,Annotations:Aa,BinaryData:Co,BinaryDataByFilterRequest:kp,BinaryDataByFilterResponse:yp,BinaryDataByIDsRequest:vp,BinaryDataByIDsResponse:hp,BinaryID:de,BinaryMetadata:_p,BoundingBox:fp,BoundingBoxLabelsByFilterRequest:$p,BoundingBoxLabelsByFilterResponse:Yp,CaptureInterval:Gn,CaptureMetadata:Da,Classification:Rp,ConfigureDatabaseUserRequest:Wp,ConfigureDatabaseUserResponse:jp,CreateBinaryDataSignedURLRequest:vu,CreateBinaryDataSignedURLResponse:hu,CreateIndexRequest:nu,CreateIndexResponse:au,CreateSavedQueryRequest:mu,CreateSavedQueryResponse:cu,DataRequest:bo,DeleteBinaryDataByFilterRequest:Ep,DeleteBinaryDataByFilterResponse:Mp,DeleteBinaryDataByIDsRequest:bp,DeleteBinaryDataByIDsResponse:Op,DeleteIndexRequest:tu,DeleteIndexResponse:su,DeleteSavedQueryRequest:du,DeleteSavedQueryResponse:lu,DeleteTabularDataRequest:Sp,DeleteTabularDataResponse:Ip,ExportTabularDataRequest:pp,ExportTabularDataResponse:up,Filter:Ye,GetDatabaseConnectionRequest:Hp,GetDatabaseConnectionResponse:Kp,GetLatestTabularDataRequest:gp,GetLatestTabularDataResponse:Tp,GetSavedQueryRequest:pu,GetSavedQueryResponse:uu,Index:ru,IndexCreator:sp,IndexableCollection:Ln,ListIndexesRequest:ou,ListIndexesResponse:iu,ListSavedQueriesRequest:ku,ListSavedQueriesResponse:yu,Order:ap,Query:No,RemoveBinaryDataFromDatasetByIDsRequest:Zp,RemoveBinaryDataFromDatasetByIDsResponse:eu,RemoveBoundingBoxFromImageByIDRequest:xp,RemoveBoundingBoxFromImageByIDResponse:Jp,RemoveTagsFromBinaryDataByFilterRequest:Up,RemoveTagsFromBinaryDataByFilterResponse:qp,RemoveTagsFromBinaryDataByIDsRequest:Dp,RemoveTagsFromBinaryDataByIDsResponse:Ap,TabularData:rp,TabularDataByFilterRequest:op,TabularDataByFilterResponse:ip,TabularDataByMQLRequest:dp,TabularDataByMQLResponse:lp,TabularDataBySQLRequest:mp,TabularDataBySQLResponse:cp,TabularDataSource:wo,TabularDataSourceType:en,TagsByFilterRequest:Lp,TagsByFilterResponse:Gp,TagsFilter:Oo,TagsFilterType:tp,UpdateBoundingBoxRequest:zp,UpdateBoundingBoxResponse:Vp,UpdateSavedQueryRequest:gu,UpdateSavedQueryResponse:Tu},Symbol.toStringTag,{value:"Module"})),fu=s.makeEnum("viam.component.camera.v1.Format",[{no:0,name:"FORMAT_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"FORMAT_RAW_RGBA",localName:"RAW_RGBA"},{no:2,name:"FORMAT_RAW_DEPTH",localName:"RAW_DEPTH"},{no:3,name:"FORMAT_JPEG",localName:"JPEG"},{no:4,name:"FORMAT_PNG",localName:"PNG"}]),Ru=s.makeMessageType("viam.component.camera.v1.GetImageRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),_u=s.makeMessageType("viam.component.camera.v1.GetImageResponse",()=>[{no:1,name:"mime_type",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:12}]),Po=s.makeMessageType("viam.component.camera.v1.GetImagesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"filter_source_names",kind:"scalar",T:9,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Su=s.makeMessageType("viam.component.camera.v1.GetImagesResponse",()=>[{no:1,name:"images",kind:"message",T:Do,repeated:!0},{no:84260,name:"response_metadata",kind:"message",T:xr}]),Do=s.makeMessageType("viam.component.camera.v1.Image",()=>[{no:1,name:"source_name",kind:"scalar",T:9},{no:2,name:"format",kind:"enum",T:s.getEnumType(fu)},{no:3,name:"image",kind:"scalar",T:12},{no:4,name:"mime_type",kind:"scalar",T:9},{no:5,name:"annotations",kind:"message",T:Aa}]),Iu=s.makeMessageType("viam.component.camera.v1.RenderFrameRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ao=s.makeMessageType("viam.component.camera.v1.GetPointCloudRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Eu=s.makeMessageType("viam.component.camera.v1.GetPointCloudResponse",()=>[{no:1,name:"mime_type",kind:"scalar",T:9},{no:2,name:"point_cloud",kind:"scalar",T:12}]),Mu=s.makeMessageType("viam.component.camera.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),bu=s.makeMessageType("viam.component.camera.v1.GetPropertiesResponse",()=>[{no:1,name:"supports_pcd",kind:"scalar",T:8},{no:2,name:"intrinsic_parameters",kind:"message",T:Cu},{no:3,name:"distortion_parameters",kind:"message",T:Nu},{no:4,name:"mime_types",kind:"scalar",T:9,repeated:!0},{no:5,name:"frame_rate",kind:"scalar",T:2,opt:!0}]),V_=s.makeMessageType("viam.component.camera.v1.Webcams",()=>[{no:1,name:"webcams",kind:"message",T:Ou,repeated:!0}]),Ou=s.makeMessageType("viam.component.camera.v1.Webcam",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"status",kind:"scalar",T:9},{no:3,name:"properties",kind:"message",T:wu,repeated:!0},{no:4,name:"name",kind:"scalar",T:9},{no:5,name:"id",kind:"scalar",T:9}]),wu=s.makeMessageType("viam.component.camera.v1.Property",()=>[{no:1,name:"width_px",kind:"scalar",T:5},{no:2,name:"height_px",kind:"scalar",T:5},{no:3,name:"frame_format",kind:"scalar",T:9},{no:4,name:"frame_rate",kind:"scalar",T:2}]),Cu=s.makeMessageType("viam.component.camera.v1.IntrinsicParameters",()=>[{no:1,name:"width_px",kind:"scalar",T:13},{no:2,name:"height_px",kind:"scalar",T:13},{no:3,name:"focal_x_px",kind:"scalar",T:1},{no:4,name:"focal_y_px",kind:"scalar",T:1},{no:5,name:"center_x_px",kind:"scalar",T:1},{no:6,name:"center_y_px",kind:"scalar",T:1}]),Nu=s.makeMessageType("viam.component.camera.v1.DistortionParameters",()=>[{no:1,name:"model",kind:"scalar",T:9},{no:2,name:"parameters",kind:"scalar",T:1,repeated:!0}]),$_=Object.freeze(Object.defineProperty({__proto__:null,DistortionParameters:Nu,Format:fu,GetImageRequest:Ru,GetImageResponse:_u,GetImagesRequest:Po,GetImagesResponse:Su,GetPointCloudRequest:Ao,GetPointCloudResponse:Eu,GetPropertiesRequest:Mu,GetPropertiesResponse:bu,Image:Do,IntrinsicParameters:Cu,Property:wu,RenderFrameRequest:Iu,Webcam:Ou,Webcams:V_},Symbol.toStringTag,{value:"Module"})),Uo=s.makeMessageType("viam.service.vision.v1.GetDetectionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:12},{no:3,name:"width",kind:"scalar",T:3},{no:4,name:"height",kind:"scalar",T:3},{no:5,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Pu=s.makeMessageType("viam.service.vision.v1.GetDetectionsResponse",()=>[{no:1,name:"detections",kind:"message",T:Ua,repeated:!0}]),qo=s.makeMessageType("viam.service.vision.v1.GetDetectionsFromCameraRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Du=s.makeMessageType("viam.service.vision.v1.GetDetectionsFromCameraResponse",()=>[{no:1,name:"detections",kind:"message",T:Ua,repeated:!0}]),Ua=s.makeMessageType("viam.service.vision.v1.Detection",()=>[{no:1,name:"x_min",kind:"scalar",T:3,opt:!0},{no:2,name:"y_min",kind:"scalar",T:3,opt:!0},{no:3,name:"x_max",kind:"scalar",T:3,opt:!0},{no:4,name:"y_max",kind:"scalar",T:3,opt:!0},{no:5,name:"confidence",kind:"scalar",T:1},{no:6,name:"class_name",kind:"scalar",T:9},{no:7,name:"x_min_normalized",kind:"scalar",T:1,opt:!0},{no:8,name:"y_min_normalized",kind:"scalar",T:1,opt:!0},{no:9,name:"x_max_normalized",kind:"scalar",T:1,opt:!0},{no:10,name:"y_max_normalized",kind:"scalar",T:1,opt:!0}]),Lo=s.makeMessageType("viam.service.vision.v1.GetClassificationsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:12},{no:3,name:"width",kind:"scalar",T:5},{no:4,name:"height",kind:"scalar",T:5},{no:5,name:"mime_type",kind:"scalar",T:9},{no:6,name:"n",kind:"scalar",T:5},{no:99,name:"extra",kind:"message",T:p}]),Au=s.makeMessageType("viam.service.vision.v1.GetClassificationsResponse",()=>[{no:1,name:"classifications",kind:"message",T:qa,repeated:!0}]),Go=s.makeMessageType("viam.service.vision.v1.GetClassificationsFromCameraRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:3,name:"n",kind:"scalar",T:5},{no:99,name:"extra",kind:"message",T:p}]),Uu=s.makeMessageType("viam.service.vision.v1.GetClassificationsFromCameraResponse",()=>[{no:1,name:"classifications",kind:"message",T:qa,repeated:!0}]),qa=s.makeMessageType("viam.service.vision.v1.Classification",()=>[{no:1,name:"class_name",kind:"scalar",T:9},{no:2,name:"confidence",kind:"scalar",T:1}]),Bo=s.makeMessageType("viam.service.vision.v1.GetObjectPointCloudsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:3,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),qu=s.makeMessageType("viam.service.vision.v1.GetObjectPointCloudsResponse",()=>[{no:1,name:"mime_type",kind:"scalar",T:9},{no:2,name:"objects",kind:"message",T:Mt,repeated:!0}]),Fo=s.makeMessageType("viam.service.vision.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),xo=s.makeMessageType("viam.service.vision.v1.CaptureAllFromCameraRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:3,name:"return_image",kind:"scalar",T:8},{no:4,name:"return_classifications",kind:"scalar",T:8},{no:5,name:"return_detections",kind:"scalar",T:8},{no:6,name:"return_object_point_clouds",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),Lu=s.makeMessageType("viam.service.vision.v1.CaptureAllFromCameraResponse",()=>[{no:1,name:"image",kind:"message",T:Do},{no:2,name:"detections",kind:"message",T:Ua,repeated:!0},{no:3,name:"classifications",kind:"message",T:qa,repeated:!0},{no:4,name:"objects",kind:"message",T:Mt,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Gu=s.makeMessageType("viam.service.vision.v1.GetPropertiesResponse",()=>[{no:1,name:"classifications_supported",kind:"scalar",T:8},{no:2,name:"detections_supported",kind:"scalar",T:8},{no:3,name:"object_point_clouds_supported",kind:"scalar",T:8}]),Bu=Object.freeze(Object.defineProperty({__proto__:null,CaptureAllFromCameraRequest:xo,CaptureAllFromCameraResponse:Lu,Classification:qa,Detection:Ua,GetClassificationsFromCameraRequest:Go,GetClassificationsFromCameraResponse:Uu,GetClassificationsRequest:Lo,GetClassificationsResponse:Au,GetDetectionsFromCameraRequest:qo,GetDetectionsFromCameraResponse:Du,GetDetectionsRequest:Uo,GetDetectionsResponse:Pu,GetObjectPointCloudsRequest:Bo,GetObjectPointCloudsResponse:qu,GetPropertiesRequest:Fo,GetPropertiesResponse:Gu},Symbol.toStringTag,{value:"Module"})),Fu={typeName:"viam.service.vision.v1.VisionService",methods:{getDetectionsFromCamera:{name:"GetDetectionsFromCamera",I:qo,O:Du,kind:m.Unary},getDetections:{name:"GetDetections",I:Uo,O:Pu,kind:m.Unary},getClassificationsFromCamera:{name:"GetClassificationsFromCamera",I:Go,O:Uu,kind:m.Unary},getClassifications:{name:"GetClassifications",I:Lo,O:Au,kind:m.Unary},getObjectPointClouds:{name:"GetObjectPointClouds",I:Bo,O:qu,kind:m.Unary},getProperties:{name:"GetProperties",I:Fo,O:Gu,kind:m.Unary},captureAllFromCamera:{name:"CaptureAllFromCamera",I:xo,O:Lu,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}},Y_=new Blob([`self.onmessage = function(e) {
|
|
4
|
+
`].join("");return n},w1=async(t,e,n)=>{const a=e??{iceServers:[{urls:"stun:global.stun.twilio.com:3478"}]},o=new RTCPeerConnection(a);let i;const r=new Promise(f=>{i=f}),c=o.createDataChannel("data",{id:0,negotiated:!0,ordered:!0});c.binaryType="arraybuffer";const l=o.createDataChannel("negotiation",{id:1,negotiated:!0,ordered:!0});l.binaryType="arraybuffer";let d=!1;if(l.addEventListener("open",()=>{d=!0}),l.addEventListener("message",f=>{(async()=>{const I=new RTCSessionDescription(JSON.parse(Sr(f.data)));if(await o.setRemoteDescription(I),I.type==="offer"){await o.setLocalDescription();const R=ht(o.localDescription,n);l.send(vt(JSON.stringify(R)))}})().catch(console.error)}),o.addEventListener("negotiationneeded",()=>{(async()=>{if(!d)return;await o.setLocalDescription();const f=ht(o.localDescription,n);l.send(vt(JSON.stringify(f)))})().catch(console.error)}),!t)return{pc:o,dc:c};const g=await o.createOffer({});return await o.setLocalDescription(g),o.addEventListener("icecandidate",f=>{f.candidate===null&&i({pc:o,dc:c})}),r};function C1(){try{new Headers}catch{throw new Error("connect-web requires the fetch API. Are you running on an old version of Node.js? Node.js is not supported in Connect for Web - please stay tuned for Connect for Node.")}}function Ir(t,e){const n=dr(t);if(n)throw e.forEach((a,o)=>{n.metadata.append(o,a)}),n;if(!e.has(dn)&&!t.has(dn))throw new C("protocol error: missing status",u.Code.Internal)}function Er(t,e,n,a){const o=new Headers(n??{});return o.set(IR,t?wR:CR),o.set(OR,"1"),o.set(bR,"connect-es/1.6.1"),e!==void 0&&o.set(ER,`${e}m`),o}function N1(t){switch(t){case 400:return u.Code.Internal;case 401:return u.Code.Unauthenticated;case 403:return u.Code.PermissionDenied;case 404:return u.Code.Unimplemented;case 429:return u.Code.Unavailable;case 502:return u.Code.Unavailable;case 503:return u.Code.Unavailable;case 504:return u.Code.Unavailable;default:return u.Code.Unknown}}function Mr(t,e){var n;if(t>=200&&t<300)return{foundStatus:e.has(dn),headerError:dr(e)};throw new C(decodeURIComponent((n=e.get(cr))!==null&&n!==void 0?n:`HTTP ${t}`),N1(t),e)}var Xe=function(t){return this instanceof Xe?(this.v=t,this):new Xe(t)},P1=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=n.apply(t,e||[]),o,i=[];return o={},c("next"),c("throw"),c("return",r),o[Symbol.asyncIterator]=function(){return this},o;function r(R){return function(E){return Promise.resolve(E).then(R,f)}}function c(R,E){a[R]&&(o[R]=function(w){return new Promise(function(N,J){i.push([R,w,N,J])>1||l(R,w)})},E&&(o[R]=E(o[R])))}function l(R,E){try{d(a[R](E))}catch(w){I(i[0][3],w)}}function d(R){R.value instanceof Xe?Promise.resolve(R.value.v).then(g,f):I(i[0][2],R)}function g(R){l("next",R)}function f(R){l("throw",R)}function I(R,E){R(E),i.shift(),i.length&&l(i[0][0],i[0][1])}};function D1(t){var e;C1();const n=(e=t.useBinaryFormat)!==null&&e!==void 0?e:!0;return{async unary(a,o,i,r,c,l,d){var g;const{serialize:f,parse:I}=it(o,n,t.jsonOptions,t.binaryOptions);return r=r===void 0?t.defaultTimeoutMs:r<=0?void 0:r,await kr({interceptors:t.interceptors,signal:i,timeoutMs:r,req:{stream:!1,service:a,method:o,url:lr(t.baseUrl,a,o),init:{method:"POST",credentials:(g=t.credentials)!==null&&g!==void 0?g:"same-origin",redirect:"error",mode:"cors"},header:Er(n,r,c),contextValues:d??pa(),message:l},next:async R=>{var E;const N=await((E=t.fetch)!==null&&E!==void 0?E:globalThis.fetch)(R.url,Object.assign(Object.assign({},R.init),{headers:R.header,signal:R.signal,body:sr(0,f(R.message))})),{headerError:J}=Mr(N.status,N.headers);if(!N.body)throw J!==void 0?J:"missing response body";const y=tr(N.body).getReader();let h,k;for(;;){const v=await y.read();if(v.done)break;const{flags:b,data:M}=v.value;if((b&ar)===ar)throw new C("protocol error: received unsupported compressed output",u.Code.Internal);if(b===ot){if(h!==void 0)throw"extra trailer";h=mr(M);continue}if(k!==void 0)throw new C("extra message",u.Code.Unimplemented);k=I(M)}if(h===void 0)throw J!==void 0?J:new C("missing trailer",N.headers.has(dn)?u.Code.Unimplemented:u.Code.Unknown);if(Ir(h,N.headers),k===void 0)throw new C("missing message",h.has(dn)?u.Code.Unimplemented:u.Code.Unknown);return{stream:!1,service:a,method:o,header:N.headers,message:k,trailer:h}}})},async stream(a,o,i,r,c,l,d){var g;const{serialize:f,parse:I}=it(o,n,t.jsonOptions,t.binaryOptions);function R(w,N,J,y,h){return P1(this,arguments,function*(){const v=tr(w).getReader();if(N){if(!(yield Xe(v.read())).done)throw"extra data for trailers-only";return yield Xe(void 0)}let b=!1;for(;;){const M=yield Xe(v.read());if(M.done)break;const{flags:ne,data:q}=M.value;if((ne&ot)===ot){if(b)throw"extra trailer";b=!0;const z=mr(q);Ir(z,y),z.forEach((vi,hi)=>J.set(hi,vi));continue}if(b)throw"extra message";yield yield Xe(I(q))}if("throwIfAborted"in h&&h.throwIfAborted(),!b)throw"missing trailer"})}async function E(w){if(o.kind!=m.ServerStreaming)throw"The fetch API does not support streaming request bodies";const N=await w[Symbol.asyncIterator]().next();if(N.done==!0)throw"missing request message";return sr(0,f(N.value))}return r=r===void 0?t.defaultTimeoutMs:r<=0?void 0:r,yr({interceptors:t.interceptors,signal:i,timeoutMs:r,req:{stream:!0,service:a,method:o,url:lr(t.baseUrl,a,o),init:{method:"POST",credentials:(g=t.credentials)!==null&&g!==void 0?g:"same-origin",redirect:"error",mode:"cors"},header:Er(n,r,c),contextValues:d??pa(),message:l},next:async w=>{var N;const y=await((N=t.fetch)!==null&&N!==void 0?N:globalThis.fetch)(w.url,Object.assign(Object.assign({},w.init),{headers:w.header,signal:w.signal,body:await E(w.message)})),{foundStatus:h,headerError:k}=Mr(y.status,y.headers);if(k!=null)throw k;if(!y.body)throw"missing response body";const v=new Headers;return Object.assign(Object.assign({},w),{header:y.headers,trailer:v,message:R(y.body,h,v,y.headers,w.signal)})}})}}}const va=s.makeMessageType("proto.rpc.webrtc.v1.PacketMessage",()=>[{no:1,name:"data",kind:"scalar",T:12},{no:2,name:"eom",kind:"scalar",T:8}]),ft=s.makeMessageType("proto.rpc.webrtc.v1.Stream",()=>[{no:1,name:"id",kind:"scalar",T:4}]),Rt=s.makeMessageType("proto.rpc.webrtc.v1.Request",()=>[{no:1,name:"stream",kind:"message",T:ft},{no:2,name:"headers",kind:"message",T:br,oneof:"type"},{no:3,name:"message",kind:"message",T:_t,oneof:"type"},{no:4,name:"rst_stream",kind:"scalar",T:8,oneof:"type"}]),br=s.makeMessageType("proto.rpc.webrtc.v1.RequestHeaders",()=>[{no:1,name:"method",kind:"scalar",T:9},{no:2,name:"metadata",kind:"message",T:ha},{no:3,name:"timeout",kind:"message",T:B}]),_t=s.makeMessageType("proto.rpc.webrtc.v1.RequestMessage",()=>[{no:1,name:"has_message",kind:"scalar",T:8},{no:2,name:"packet_message",kind:"message",T:va},{no:3,name:"eos",kind:"scalar",T:8}]),A1=s.makeMessageType("proto.rpc.webrtc.v1.Response",()=>[{no:1,name:"stream",kind:"message",T:ft},{no:2,name:"headers",kind:"message",T:U1,oneof:"type"},{no:3,name:"message",kind:"message",T:q1,oneof:"type"},{no:4,name:"trailers",kind:"message",T:L1,oneof:"type"}]),U1=s.makeMessageType("proto.rpc.webrtc.v1.ResponseHeaders",()=>[{no:1,name:"metadata",kind:"message",T:ha}]),q1=s.makeMessageType("proto.rpc.webrtc.v1.ResponseMessage",()=>[{no:1,name:"packet_message",kind:"message",T:va}]),L1=s.makeMessageType("proto.rpc.webrtc.v1.ResponseTrailers",()=>[{no:1,name:"status",kind:"message",T:ln},{no:2,name:"metadata",kind:"message",T:ha}]),Or=s.makeMessageType("proto.rpc.webrtc.v1.Strings",()=>[{no:1,name:"values",kind:"scalar",T:9,repeated:!0}]),ha=s.makeMessageType("proto.rpc.webrtc.v1.Metadata",()=>[{no:1,name:"md",kind:"map",K:9,V:{kind:"message",T:Or}}]);class ce extends Error{name="ConnectionClosedError";constructor(e){super(e),Object.setPrototypeOf(this,ce.prototype)}static isError(e){return e instanceof ce||e instanceof C&&e.rawMessage==="closed"?!0:typeof e=="string"?e==="Response closed without headers":e instanceof Error?e.message==="Response closed without headers":!1}}class G1{ready;peerConn;dataChannel;pResolve;pReject;closed=!1;closedReason;maxDataChannelSize=65535;constructor(e,n){this.peerConn=e,this.dataChannel=n,this.ready=new Promise((a,o)=>{this.pResolve=a,this.pReject=o}),n.addEventListener("open",()=>this.onChannelOpen()),n.addEventListener("close",()=>this.onChannelClose()),n.addEventListener("error",a=>{this.onChannelError(a)}),e.addEventListener("iceconnectionstatechange",()=>{const a=e.iceConnectionState;(a==="failed"||a==="disconnected"||a==="closed")&&this.pReject?.(new Error(`ICE connection failed with state: ${a}`))})}isClosed(){return this.closed}isClosedReason(){return this.closedReason}closeWithReason(e){this.closed||(this.closed=!0,this.closedReason=e,this.pReject?.(e),this.peerConn.close(),this.dataChannel.close())}onChannelOpen(){this.pResolve?.(void 0)}onChannelClose(){this.closeWithReason(new ce("data channel closed"))}onChannelError(e){console.error("channel error",e),this.closeWithReason(new Error(JSON.stringify(e)))}write(e){this.dataChannel.send(e.toBinary())}}const wr=33554432;class B1{grpcStream;onDone;closed=!1;packetBuf=[];packetBufSize=0;constructor(e,n){this.grpcStream=e,this.onDone=n}closeWithRecvError(){this.closed||(this.closed=!0,this.onDone(this.grpcStream.id))}processPacketMessage(e){const{data:n}=e;if(n.length+this.packetBufSize>wr){this.packetBuf.length=0,this.packetBufSize=0,console.error(`message size larger than max ${wr}; discarding`);return}if(this.packetBuf.push(n),this.packetBufSize+=n.length,e.eom){const a=new Uint8Array(this.packetBufSize);let o=0;for(const i of this.packetBuf)a.set(i,o),o+=i.length;return this.packetBuf.length=0,this.packetBufSize=0,a}}}const F1=16373;class Cr extends B1{channel;service;method;parseMessage;requestHeaders;headersReceived=!1;trailersReceived=!1;constructor(e,n,a,o,i,r){super(n,a),this.channel=e,this.service=o,this.method=i;const{parse:c}=it(i,!0,void 0,void 0);this.parseMessage=c;const l=`/${o.typeName}/${i.name}`;this.requestHeaders=new br({method:l});const d=x1(Cn(r));d&&(this.requestHeaders.metadata=d)}startRequest(e){e&&e.addEventListener("abort",()=>{this.resetStream()});try{this.channel.writeHeaders(this.grpcStream,this.requestHeaders)}catch(n){console.error("error writing headers",n),this.closeWithRecvError()}}sendMessage(e){if(e){this.writeMessage(!1,e);return}this.writeMessage(!1,void 0)}resetStream(){if(!this.closed)try{this.channel.writeReset(this.grpcStream)}catch(e){console.error("error writing reset",e),this.closeWithRecvError()}}writeMessage(e,n){try{if(!n||n.length===0){const o=new va({eom:!0}),i=new _t({hasMessage:!!n,packetMessage:o,eos:e});this.channel.writeMessage(this.grpcStream,i);return}let a=n;for(;a.length>0;){const o=Math.min(a.length,F1),i=new va;i.data=a.slice(0,o),a=a.slice(o),a.length===0&&(i.eom=!0);const r=new _t({hasMessage:!!a,packetMessage:i,eos:e});this.channel.writeMessage(this.grpcStream,r)}}catch(a){console.error("error writing message",a),this.closeWithRecvError()}}onResponse(e){switch(e.type.case){case"headers":{if(this.headersReceived){console.error(`invariant: headers already received for ${this.grpcStream.id}`);return}if(this.trailersReceived){console.error(`invariant: headers received after trailers for ${this.grpcStream.id}`);return}this.processHeaders(e.type.value);break}case"message":{if(!this.headersReceived){console.error(`invariant: headers not yet received for ${this.grpcStream.id}`);return}if(this.trailersReceived){console.error(`invariant: headers received after trailers for ${this.grpcStream.id}`);return}this.processMessage(e.type.value);break}case"trailers":{this.processTrailers(e.type.value);break}default:{console.error("unknown response type",e.type.case);break}}}processHeaders(e){this.headersReceived=!0,this.onHeaders(e)}processMessage(e){if(!e.packetMessage)return;const n=super.processPacketMessage(e.packetMessage);n&&this.onMessage(n)}processTrailers(e){this.trailersReceived=!0;const{status:n}=e,a=n?n.code:0;if(this.onTrailers(e),a===0){this.closeWithRecvError();return}this.closeWithRecvError()}}const x1=t=>{if(!t)return;const e=new ha({md:Object.fromEntries([...t.entries()].map(([n,a])=>[n,new Or({values:[a]})]))});return Object.keys(e.md).length>0?e:void 0},St=t=>{const e=Object.entries(t?.md??{}).flatMap(([n,{values:a}])=>a.map(o=>[n,o]));return new Headers(e)};class J1 extends Cr{awaitingHeadersResult;gotHeaders=!1;respStream=TR();trailers=new Headers;respStreamQueue;async run(e,n,a,o){const r={req:{stream:!0,url:"",init:{},service:this.service,method:this.method,header:new Headers,contextValues:o??pa(),message:a},next:async c=>{const d=await new Promise((g,f)=>{this.awaitingHeadersResult={success:g,failure:f},this.startRequest(e),this.sendMessages(c.message).catch(I=>{console.error("error sending streaming message",I),this.closeWithRecvError()})});return{...c,header:d,trailer:this.trailers,message:this.respStream}}};return e&&(r.signal=e),n!==void 0&&(r.timeoutMs=n),yr(r)}async sendMessages(e){for await(const n of e)this.sendMessage(n.toBinary());this.writeMessage(!0,void 0)}onHeaders(e){this.gotHeaders=!0,this.awaitingHeadersResult?.success(St(e.metadata))}onTrailers(e){if(e.metadata?.md){for(const n in e.metadata.md)if(Object.hasOwn(e.metadata.md,n)){const a=e.metadata.md[n];for(const o of a?.values??[])this.trailers.append(n,o)}}if(this.respStream.close(),!e.status||e.status.code===0){if(this.gotHeaders)return;this.awaitingHeadersResult?.success(new Headers);return}this.gotHeaders||this.awaitingHeadersResult?.failure(e.status.message)}onMessage(e){const n=this.parseMessage(e);this.respStreamQueue=this.respStreamQueue?this.respStreamQueue.then(async()=>this.respStream.write(n)):this.respStream.write(n),this.respStreamQueue.catch(a=>{console.error(`error pushing received message into stream; failing: ${a}`),this.resetStream()})}}class z1 extends Cr{result;headers;message;async run(e,n,a,o){const r={req:{stream:!1,url:"",init:{},service:this.service,method:this.method,header:new Headers,contextValues:o??pa(),message:a},next:async c=>new Promise((l,d)=>{this.result={success:l,failure:d},this.startRequest(),this.sendMessage(c.message.toBinary())})};return e&&(r.signal=e),n!==void 0&&(r.timeoutMs=n),kr(r)}onHeaders(e){if(this.headers!==void 0){this.result?.failure(new Error("invariant: received headers more than once"));return}this.headers=St(e.metadata)}onTrailers(e){const n=St(e.metadata);if(!e.status||e.status.code===0){if(!this.headers){this.result?.failure(new Error("invariant: received trailers for successful unary request without headers"));return}if(this.message===void 0){this.result?.failure(new Error("invariant: received trailers for successful unary request without message"));return}this.result?.success({stream:!1,header:this.headers,message:this.message,trailer:n,service:this.service,method:this.method});return}this.result?.failure(e.status.message)}onMessage(e){if(this.message!==void 0){this.result?.failure(new Error("invariant: received two response messages for unary request"));return}this.message=this.parseMessage(e)}}const V1=256;class $1 extends G1{streamIDCounter=0;streams=new Map;constructor(e,n){super(e,n),n.addEventListener("message",a=>{this.onChannelMessage(a)}),e.addEventListener("iceconnectionstatechange",()=>{const a=e.iceConnectionState;(a==="failed"||a==="disconnected"||a==="closed")&&this.onConnectionTerminated()}),n.addEventListener("close",()=>this.onConnectionTerminated())}onConnectionTerminated(){this.closeWithReason(new ce("data channel closed"));for(const e of this.streams.values())e.cs.closeWithRecvError()}onChannelMessage(e){const n=A1.fromBinary(new Uint8Array(e.data)),{stream:a}=n;if(a===void 0){console.error("no stream id; discarding");return}const{id:o}=a,i=this.streams.get(o.toString());if(i===void 0){console.error("no stream for id; discarding","id",o);return}i.cs.onResponse(n)}nextStreamID(){const e=this.streamIDCounter;return this.streamIDCounter+=1,new ft({id:BigInt(e)})}newStream(e,n,a,o,i){if(this.isClosed())throw new ce("connection closed");let r=this.streams.get(n.id.toString());if(r!==void 0)throw new Error("invariant: stream should not exist yet");if(Object.keys(this.streams).length>V1)throw new Error("stream limit hit");const c=new e(this,n,l=>this.removeStreamByID(l),a,o,i);return r={cs:c},this.streams.set(n.id.toString(),r),c}removeStreamByID(e){this.streams.delete(e.toString())}writeHeaders(e,n){this.write(new Rt({stream:e,type:{case:"headers",value:n}}))}writeMessage(e,n){this.write(new Rt({stream:e,type:{case:"message",value:n}}))}writeReset(e){this.write(new Rt({stream:e,type:{case:"rstStream",value:!0}}))}async unary(e,n,a,o,i,r,c){return this.newStream(z1,this.nextStreamID(),e,n,i).run(a,o,r,c)}async stream(e,n,a,o,i,r,c){return this.newStream(J1,this.nextStreamID(),e,n,i).run(a,o,r,c)}}const fa="invariant: call uuid unset";class Y1{constructor(e,n,a,o,i){this.signalingClient=e,this.callOpts=n,this.pc=a,this.dc=o,this.dialOpts=i,this.clientChannel=new $1(this.pc,this.dc)}clientChannel;callUuid;sentDoneOrErrorOnce=!1;exchangeDone=!1;iceComplete=!1;haveInitResponse=!1;awaitingRemoteDescription;remoteDescriptionSet;numCallUpdates=0;maxCallUpdateDuration=0;totalCallUpdateDuration=0;async doExchange(){await this.setup();const e=ht(this.pc.localDescription,this.dialOpts?.additionalSdpFields),n=vt(JSON.stringify(e)),a=new Rr({sdp:n});this.dialOpts&&this.dialOpts.disableTrickleICE&&(a.disableTrickle=this.dialOpts.disableTrickleICE),this.clientChannel.ready.then(async()=>{this.exchangeDone=!0,await this.sendDone()}).catch(console.error);const o=this.signalingClient.call(a,this.callOpts),i=this.processCallResponses(o);return await Promise.all([this.clientChannel.ready,i]),this.clientChannel}async setup(){if(this.remoteDescriptionSet=new Promise((e,n)=>{this.awaitingRemoteDescription={success:e,failure:n}}),!this.dialOpts?.disableTrickleICE){const e=await this.pc.createOffer({});this.pc.addEventListener("iceconnectionstatechange",()=>{if(this.pc.iceConnectionState!=="completed"||this.numCallUpdates===0)return;const n=this.totalCallUpdateDuration/this.numCallUpdates;console.groupCollapsed("Caller update statistics"),console.table({num_updates:this.numCallUpdates,average_duration:`${n}ms`,max_duration:`${this.maxCallUpdateDuration}ms`}),console.groupEnd()}),this.pc.addEventListener("icecandidate",n=>{this.onLocalICECandidate(n).catch(a=>{console.error(`error processing local ICE candidate ${a}`)})}),await this.pc.setLocalDescription(e)}}terminate(e){this.clientChannel.closeWithReason(e)}async processCallResponses(e){try{for await(const n of e)switch(n.stage.case){case"init":{if(!await this.handleInitResponse(n.uuid,n.stage.value))return;break}case"update":{if(!await this.handleUpdateResponse(n.uuid,n.stage.value))return;break}default:{await this.sendError("unknown CallResponse stage");return}}}catch(n){this.handleInitError(n)}}handleInitError(e){if(!(this.exchangeDone||this.pc.iceConnectionState==="connected")){if(e instanceof C&&e.code===u.Code.Unimplemented){if(e.message==="Response closed without headers")throw new ce("failed to dial");if(this.clientChannel.isClosed())throw new ce("client channel is closed");console.error(e.message)}throw e}}async handleInitResponse(e,n){if(this.haveInitResponse)return await this.sendError("got init stage more than once"),!1;this.haveInitResponse=!0,this.callUuid=e;const a=new RTCSessionDescription(JSON.parse(Sr(n.sdp)));return this.clientChannel.isClosed()?(await this.sendError("client channel is closed"),!1):(await this.pc.setRemoteDescription(a),this.awaitingRemoteDescription?.success(!0),this.dialOpts?.disableTrickleICE?(this.exchangeDone=!0,await this.sendDone(),!1):!0)}async handleUpdateResponse(e,n){if(!this.haveInitResponse)return await this.sendError("got update stage before init stage"),!1;if(e!==this.callUuid)return await this.sendError(`uuid mismatch; have=${e} want=${this.callUuid}`),!1;if(n.candidate===void 0)return await this.sendError("no candidate"),!1;const a=W1(n.candidate);a.candidate!==void 0&&console.debug(`received remote ICE ${a.candidate}`);try{await this.pc.addIceCandidate(a)}catch(o){throw console.log("error adding ice candidate",o),await this.sendError(JSON.stringify(o)),o}return!0}async onLocalICECandidate(e){if(await this.remoteDescriptionSet,this.exchangeDone||this.pc.iceConnectionState==="connected"){e.candidate!==null&&console.info("Dropping ICE candidate - exchange done or already connected",{exchangeDone:this.exchangeDone,iceConnectionState:this.pc.iceConnectionState,candidate:e.candidate.candidate});return}if(e.candidate===null){console.info("ICE gathering complete"),this.iceComplete=!0,await this.sendDone();return}if(this.callUuid===void 0||this.callUuid==="")throw console.error(fa),new Error(fa);e.candidate.candidate!==void 0&&console.info(`Gathered local ICE ${e.candidate.candidate}`);const n=j1(e.candidate),a=new ka({uuid:this.callUuid,update:{case:"candidate",value:n}}),o=new Date;try{await this.signalingClient.callUpdate(a,this.callOpts),this.numCallUpdates+=1;const r=new Date().getTime()-o.getTime();r>this.maxCallUpdateDuration&&(this.maxCallUpdateDuration=r),this.totalCallUpdateDuration+=r}catch(i){if(this.exchangeDone||this.iceComplete||this.pc.iceConnectionState==="connected")return;console.error(i)}}async sendError(e){if(this.sentDoneOrErrorOnce)return;if(this.callUuid===void 0||this.callUuid==="")throw new Error(fa);this.sentDoneOrErrorOnce=!0;const n=new ka({uuid:this.callUuid,update:{case:"error",value:new ln({code:u.Code.Unknown,message:e})}});try{await this.signalingClient.callUpdate(n,this.callOpts)}catch(a){console.error("failed to send call update; continuing",a)}}async sendDone(){if(this.sentDoneOrErrorOnce)return;if(this.callUuid===void 0||this.callUuid==="")throw new Error(fa);this.sentDoneOrErrorOnce=!0;const e=new ka({uuid:this.callUuid,update:{case:"done",value:!0}});try{await this.signalingClient.callUpdate(e,this.callOpts)}catch(n){console.error(n)}}}const W1=t=>{const e={candidate:t.candidate};return t.sdpMid!==void 0&&(e.sdpMid=t.sdpMid),t.sdpmLineIndex!==void 0&&(e.sdpMLineIndex=t.sdpmLineIndex),t.usernameFragment!==void 0&&(e.usernameFragment=t.usernameFragment),e},j1=t=>{const e=new wn;return t.candidate!==void 0&&(e.candidate=t.candidate),t.sdpMid!==void 0&&t.sdpMid!==null&&(e.sdpMid=t.sdpMid),t.sdpMLineIndex!==void 0&&t.sdpMLineIndex!==null&&(e.sdpmLineIndex=t.sdpMLineIndex),t.usernameFragment!==void 0&&t.usernameFragment!==null&&(e.usernameFragment=t.usernameFragment),e};var Nr={exports:{}};(function(t,e){(function(n,a){t.exports=a()})(j,function(){return function(n){var a={};function o(i){if(a[i])return a[i].exports;var r=a[i]={i,l:!1,exports:{}};return n[i].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=n,o.c=a,o.d=function(i,r,c){o.o(i,r)||Object.defineProperty(i,r,{enumerable:!0,get:c})},o.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},o.t=function(i,r){if(1&r&&(i=o(i)),8&r||4&r&&typeof i=="object"&&i&&i.__esModule)return i;var c=Object.create(null);if(o.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:i}),2&r&&typeof i!="string")for(var l in i)o.d(c,l,function(d){return i[d]}.bind(null,l));return c},o.n=function(i){var r=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(r,"a",r),r},o.o=function(i,r){return Object.prototype.hasOwnProperty.call(i,r)},o.p="",o(o.s=0)}([function(n,a,o){o.r(a),o.d(a,"UuidTool",function(){return c}),o.d(a,"Uuid",function(){return r});var i={uuid:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i},r=function(){function l(d){this.id="",typeof d=="string"?this.fromString(d):Array.isArray(d)?this.fromBytes(d):this.generate()}return l.fromJson=function(d){if(typeof d=="string"&&(d=JSON.parse(d)),!d||!d.id)throw new TypeError("The input cannot be converted to Uuid.");return new l(d.id)},l.prototype.generate=function(){var d=new Array(16).fill(0).map(function(){return 256*Math.random()&255});return d[6]=79&(64|d[6]),this.fromBytes(d),this},l.prototype.fromBytes=function(d){return this.id=d.map(function(g){return("00"+g.toString(16)).slice(-2)}).join("").replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5"),this.id=this.toString(),this},l.prototype.toBytes=function(){return(this.id.replace(/-/g,"").match(/.{2}/g)||[]).map(function(d){return parseInt(d,16)})},l.prototype.fromString=function(d){return this.id=d.trim(),this.id=this.toString(),this},l.prototype.toString=function(){switch(l.stringExportFormat){default:case"lowercase":return this.id.toLowerCase();case"uppercase":return this.id.toUpperCase()}},l.prototype.isValid=function(){return typeof this.id=="string"&&this.id.length===36&&i.uuid.test(this.id)},l.prototype.equals=function(d){return typeof d=="string"&&(d=new l(d)),this.toString()===d.toString()},l.stringExportFormat="lowercase",l}(),c=function(){function l(){}return l.toBytes=function(d){return new r().fromString(d).toBytes()},l.toString=function(d){return new r().fromBytes(d).toString()},l.newUuid=function(){return new r().toString()},l.isUuid=function(d){return new r().fromString(d).isValid()},l.compare=function(d,g){return new r(d).equals(new r(g))},l}()}])})})(Nr);var Ra=Nr.exports;const _a=(t,e)=>globalThis.VIAM?.GRPC_TRACE_LOGGING===!0?{...t,unary:async(o,i,r,c,l,d,g)=>{const f=Ra.UuidTool.newUuid();console.trace(`Unary request ${f} : ${e}/${o.typeName}.${i.name}`);const I=await t.unary(o,i,r,c,l,d,g);return console.debug(`Unary response received: ${f}`),I},stream:async(o,i,r,c,l,d,g)=>{const f=Ra.UuidTool.newUuid();console.trace(`Stream request ${f} : ${e}/${o.typeName}.${i.name}`);const I=await t.stream(o,i,r,c,l,d,g);return console.debug(`Stream response received: ${f}`),I}}:t,Sa=async(t,e,n=!1)=>{Dr(e);const a=globalThis.VIAM?.GRPC_TRANSPORT_FACTORY??D1,o={baseUrl:t,credentials:"same-origin"};if(e?.accessToken!==void 0&&e.accessToken!==""&&!(e.externalAuthAddress!==void 0&&e.externalAuthAddress!==""&&e.externalAuthToEntity!==void 0&&e.externalAuthToEntity!=="")){const r=new Headers(e.extraHeaders);r.set("authorization",`Bearer ${e.accessToken}`);const c=new Pr(o,a,r);return _a(c,t)}if(e===void 0||e.credentials===void 0&&e.accessToken===void 0){n&&(o.credentials="include");const r=a(o);return _a(r,t)}const i=await H1(t,a,e,o);return _a(i,t)},It=/^.*:\/\//u,H1=async(t,e,n,a)=>{const o=new Headers(n.extraHeaders);let i;if(n.accessToken===void 0||n.accessToken===""){const r=new yt({entity:Un(n.credentials)&&n.credentials.authEntity?n.credentials.authEntity:t.replace(It,"")});n.credentials&&(r.credentials=new fr({type:n.credentials.type,payload:n.credentials.payload}));const c=n.externalAuthAddress??t,l=e({baseUrl:c});i=(await W(m1,l).authenticate(r)).accessToken}else i=n.accessToken;if(n.externalAuthAddress!==void 0&&n.externalAuthAddress!==""&&n.externalAuthToEntity!==void 0&&n.externalAuthToEntity!==""){const r=new Headers;r.set("authorization",`Bearer ${i}`),i="";const c=new yt({entity:n.externalAuthToEntity}),l=e({baseUrl:n.externalAuthAddress});i=(await W(c1,l).authenticateTo(c,{headers:r})).accessToken}return o.set("authorization",`Bearer ${i}`),new Pr(a,e,o)};class Pr{transport;extraHeaders;constructor(e,n,a){this.extraHeaders=a,this.transport=n(e)}unary=async(e,n,a,o,i,r,c)=>{const l=Cn(i);for(const[d,g]of this.extraHeaders)l.set(d,g);return this.transport.unary(e,n,a,o,l,r,c)};stream=async(e,n,a,o,i,r,c)=>{const l=Cn(i);for(const[d,g]of this.extraHeaders)l.set(d,g);return this.transport.stream(e,n,a,o,l,r,c)}}const Cn=t=>{const e=new Headers;if(t!==void 0)if(Array.isArray(t))for(const[n,a]of t)e.append(n,a);else if("forEach"in t)typeof t.forEach=="function"&&t.forEach((n,a)=>{e.append(a,n)});else for(const[n,a]of Object.entries(t))e.append(n,a);return e},K1=async(t,e,n=!1)=>{const a=await Sa(t,e,n);return W(O1,a)},X1=async(t,e)=>{try{return(await e.optionalWebRTCConfig({},t)).config??new ya}catch(n){if(n instanceof C&&n.code===u.Code.Unimplemented)return new ya;throw n}},Q1=async(t,e,n,a=!1)=>{const o=t.replace(/\/$/u,"");Dr(n);const i={headers:{"rpc-host":e}},r=e_(o,n),c=await K1(o,r,a),l=await Z1(c,i,n),{pc:d,dc:g}=await w1(l.disableTrickleICE,l.rtcConfig,l.additionalSdpFields);let f=!1;const I=new Y1(c,i,d,g,l);let R;n?.dialTimeout!==void 0&&n.dialTimeout>0&&(R=setTimeout(()=>{f||I.terminate(new Error("timed out"))},n.dialTimeout));try{const E=await I.doExchange();return n?.externalAuthAddress!==void 0&&n.externalAuthAddress!==""||n?.credentials?.type,f=!0,{transport:_a(E,e),peerConnection:d,dataChannel:g}}catch(E){throw console.error("error dialing",E),E}finally{R!==void 0&&(clearTimeout(R),R=void 0),f||(d.close(),g.close())}},Z1=async(t,e,n)=>{const a=await X1(e,t),o=a.additionalIceServers.map(c=>{const l=[];for(const d of c.urls)d.endsWith("udp")&&l.push(`${d.slice(0,-3)}tcp`),l.push(d);return{urls:l,credential:c.credential,username:c.username}}),i=n;let r;return i.webrtcOptions===void 0?r={disableTrickleICE:a.disableTrickle,rtcConfig:{iceServers:o}}:(r=JSON.parse(JSON.stringify(i.webrtcOptions)),r.rtcConfig===void 0?r.rtcConfig={iceServers:o}:r.rtcConfig.iceServers=[...r.rtcConfig.iceServers??[],...o]),r},e_=(t,e)=>{let n=e;return n={...e},e.accessToken===void 0&&(Un(n.credentials)&&!n.credentials.authEntity&&(n.credentials.authEntity=n.externalAuthAddress!==void 0&&n.externalAuthAddress!==""?n.externalAuthAddress.replace(It,""):t.replace(It,"")),n.credentials=e.webrtcOptions?.signalingCredentials,n.accessToken=e.webrtcOptions?.signalingAccessToken),n.externalAuthAddress=e.webrtcOptions?.signalingExternalAuthAddress,n.externalAuthToEntity=e.webrtcOptions?.signalingExternalAuthToEntity,n},Dr=t=>{if(t){if(t.accessToken!==void 0&&t.accessToken.length>0){if(t.credentials)throw new Error("cannot set credentials with accessToken");if(t.webrtcOptions?.signalingAccessToken!==void 0)throw new Error("cannot set webrtcOptions.signalingAccessToken with accessToken");if(t.webrtcOptions?.signalingCredentials!==void 0)throw new Error("cannot set webrtcOptions.signalingCredentials with accessToken")}if(t.webrtcOptions?.signalingAccessToken!==void 0&&t.webrtcOptions.signalingAccessToken.length>0&&t.webrtcOptions.signalingCredentials!==void 0)throw new Error("cannot set webrtcOptions.signalingCredentials with webrtcOptions.signalingAccessToken")}},n_="v0.1.521",Ar=s.makeEnum("viam.common.v1.KinematicsFileFormat",[{no:0,name:"KINEMATICS_FILE_FORMAT_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"KINEMATICS_FILE_FORMAT_SVA",localName:"SVA"},{no:2,name:"KINEMATICS_FILE_FORMAT_URDF",localName:"URDF"}]),F=s.makeMessageType("viam.common.v1.ResourceName",()=>[{no:1,name:"namespace",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"subtype",kind:"scalar",T:9},{no:4,name:"name",kind:"scalar",T:9}]),Ue=s.makeMessageType("viam.common.v1.Pose",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1},{no:4,name:"o_x",kind:"scalar",T:1},{no:5,name:"o_y",kind:"scalar",T:1},{no:6,name:"o_z",kind:"scalar",T:1},{no:7,name:"theta",kind:"scalar",T:1}]),Ur=s.makeMessageType("viam.common.v1.Orientation",()=>[{no:1,name:"o_x",kind:"scalar",T:1},{no:2,name:"o_y",kind:"scalar",T:1},{no:3,name:"o_z",kind:"scalar",T:1},{no:4,name:"theta",kind:"scalar",T:1}]),Ve=s.makeMessageType("viam.common.v1.PoseInFrame",()=>[{no:1,name:"reference_frame",kind:"scalar",T:9},{no:2,name:"pose",kind:"message",T:Ue}]),qe=s.makeMessageType("viam.common.v1.Vector3",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1}]),qr=s.makeMessageType("viam.common.v1.Sphere",()=>[{no:1,name:"radius_mm",kind:"scalar",T:1}]),Lr=s.makeMessageType("viam.common.v1.Capsule",()=>[{no:1,name:"radius_mm",kind:"scalar",T:1},{no:2,name:"length_mm",kind:"scalar",T:1}]),Gr=s.makeMessageType("viam.common.v1.RectangularPrism",()=>[{no:1,name:"dims_mm",kind:"message",T:qe}]),Ia=s.makeMessageType("viam.common.v1.Mesh",()=>[{no:1,name:"content_type",kind:"scalar",T:9},{no:2,name:"mesh",kind:"scalar",T:12}]),Br=s.makeMessageType("viam.common.v1.PointCloud",()=>[{no:1,name:"point_cloud",kind:"scalar",T:12}]),Qe=s.makeMessageType("viam.common.v1.Geometry",()=>[{no:1,name:"center",kind:"message",T:Ue},{no:2,name:"sphere",kind:"message",T:qr,oneof:"geometry_type"},{no:3,name:"box",kind:"message",T:Gr,oneof:"geometry_type"},{no:5,name:"capsule",kind:"message",T:Lr,oneof:"geometry_type"},{no:6,name:"mesh",kind:"message",T:Ia,oneof:"geometry_type"},{no:7,name:"pointcloud",kind:"message",T:Br,oneof:"geometry_type"},{no:4,name:"label",kind:"scalar",T:9}]),Et=s.makeMessageType("viam.common.v1.GeometriesInFrame",()=>[{no:1,name:"reference_frame",kind:"scalar",T:9},{no:2,name:"geometries",kind:"message",T:Qe,repeated:!0}]),Mt=s.makeMessageType("viam.common.v1.PointCloudObject",()=>[{no:1,name:"point_cloud",kind:"scalar",T:12},{no:2,name:"geometries",kind:"message",T:Et}]),$e=s.makeMessageType("viam.common.v1.GeoPoint",()=>[{no:1,name:"latitude",kind:"scalar",T:1},{no:2,name:"longitude",kind:"scalar",T:1}]),Ea=s.makeMessageType("viam.common.v1.GeoGeometry",()=>[{no:1,name:"location",kind:"message",T:$e},{no:2,name:"geometries",kind:"message",T:Qe,repeated:!0}]),Le=s.makeMessageType("viam.common.v1.Transform",()=>[{no:1,name:"reference_frame",kind:"scalar",T:9},{no:2,name:"pose_in_observer_frame",kind:"message",T:Ve},{no:3,name:"physical_object",kind:"message",T:Qe,opt:!0},{no:4,name:"uuid",kind:"scalar",T:12},{no:5,name:"metadata",kind:"message",T:p,opt:!0}]),Fr=s.makeMessageType("viam.common.v1.WorldState",()=>[{no:1,name:"obstacles",kind:"message",T:Et,repeated:!0},{no:3,name:"transforms",kind:"message",T:Le,repeated:!0}]),a_=s.makeMessageType("viam.common.v1.ActuatorStatus",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),xr=s.makeMessageType("viam.common.v1.ResponseMetadata",()=>[{no:1,name:"captured_at",kind:"message",T:S,opt:!0}]),P=s.makeMessageType("viam.common.v1.DoCommandRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"command",kind:"message",T:p}]),D=s.makeMessageType("viam.common.v1.DoCommandResponse",()=>[{no:1,name:"result",kind:"message",T:p}]),Nn=s.makeMessageType("viam.common.v1.GetKinematicsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ma=s.makeMessageType("viam.common.v1.GetKinematicsResponse",()=>[{no:1,name:"format",kind:"enum",T:s.getEnumType(Ar)},{no:2,name:"kinematics_data",kind:"scalar",T:12},{no:3,name:"meshes_by_urdf_filepath",kind:"map",K:9,V:{kind:"message",T:Ia}}]),L=s.makeMessageType("viam.common.v1.GetGeometriesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Y=s.makeMessageType("viam.common.v1.GetGeometriesResponse",()=>[{no:1,name:"geometries",kind:"message",T:Qe,repeated:!0}]),bt=s.makeMessageType("viam.common.v1.Get3DModelsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Jr=s.makeMessageType("viam.common.v1.Get3DModelsResponse",()=>[{no:1,name:"models",kind:"map",K:9,V:{kind:"message",T:Ia}}]),Ze=s.makeMessageType("viam.common.v1.GetReadingsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),ba=s.makeMessageType("viam.common.v1.GetReadingsResponse",()=>[{no:1,name:"readings",kind:"map",K:9,V:{kind:"message",T:X}}]),Pn=s.makeMessageType("viam.common.v1.LogEntry",()=>[{no:1,name:"host",kind:"scalar",T:9},{no:2,name:"level",kind:"scalar",T:9},{no:3,name:"time",kind:"message",T:S},{no:4,name:"logger_name",kind:"scalar",T:9},{no:5,name:"message",kind:"scalar",T:9},{no:6,name:"caller",kind:"message",T:p},{no:7,name:"stack",kind:"scalar",T:9},{no:8,name:"fields",kind:"message",T:p,repeated:!0}]),Ot=s.makeMessageType("viam.common.v1.AudioInfo",()=>[{no:1,name:"codec",kind:"scalar",T:9},{no:2,name:"sample_rate_hz",kind:"scalar",T:5},{no:3,name:"num_channels",kind:"scalar",T:5}]),Dn=s.makeMessageType("viam.common.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),wt=s.makeMessageType("viam.common.v1.GetPropertiesResponse",()=>[{no:1,name:"supported_codecs",kind:"scalar",T:9,repeated:!0},{no:2,name:"sample_rate_hz",kind:"scalar",T:5},{no:3,name:"num_channels",kind:"scalar",T:5}]),zr=s.makeExtension("viam.common.v1.safety_heartbeat_monitored",re,{no:84260,kind:"scalar",T:8,opt:!0}),Ct=Object.freeze(Object.defineProperty({__proto__:null,ActuatorStatus:a_,AudioInfo:Ot,Capsule:Lr,DoCommandRequest:P,DoCommandResponse:D,GeoGeometry:Ea,GeoPoint:$e,GeometriesInFrame:Et,Geometry:Qe,Get3DModelsRequest:bt,Get3DModelsResponse:Jr,GetGeometriesRequest:L,GetGeometriesResponse:Y,GetKinematicsRequest:Nn,GetKinematicsResponse:Ma,GetPropertiesRequest:Dn,GetPropertiesResponse:wt,GetReadingsRequest:Ze,GetReadingsResponse:ba,KinematicsFileFormat:Ar,LogEntry:Pn,Mesh:Ia,Orientation:Ur,PointCloud:Br,PointCloudObject:Mt,Pose:Ue,PoseInFrame:Ve,RectangularPrism:Gr,ResourceName:F,ResponseMetadata:xr,Sphere:qr,Transform:Le,Vector3:qe,WorldState:Fr,safety_heartbeat_monitored:zr},Symbol.toStringTag,{value:"Module"})),An=new Headers({viam_client:`typescript;v0.64.0;${n_}`}),A=async function(e,n,a,o={},i={}){const r=new P({name:n,command:a});o.requestLogger?.(r);const l=(await e(r,i)).result?.toJson();return l===void 0?{}:l},t_=(t,e)=>{const n=e??{headers:{}};let a="";if(t===void 0){const o="abcdefghijklmnopqrstuvwxyz";for(let i=0;i<6;i+=1)a+=o[Math.floor(Math.random()*26)]}else a=t;return n.headers.dtname=a,n},s_=t=>{if(t.headers){const{_:e,...n}=t.headers;t.headers=n}},o_=(t,e,n)=>{const a=n??{headers:{}};return a.headers[t]=e,a},i_=(t,e)=>{const{[e]:n,...a}=t.headers;t.headers=a},Vr=async function(e,n,a=p.fromJson({}),o={}){const i=new Nn({name:n,extra:a}),r=await e(i,o),l=new TextDecoder("utf8").decode(r.kinematicsData),d=JSON.parse(l);return{...d,kinematicsData:d,meshesByUrdfFilepath:r.meshesByUrdfFilepath}},$r=async function(e,n,a=p.fromJson({}),o={}){const i=new L({name:n,extra:a});return(await e(i,o)).geometries},Un=t=>t!==void 0&&"authEntity"in t,r_=async(t,e)=>e.type==="access-token"?Sa(t,{accessToken:e.payload,extraHeaders:An}):Sa(t,{credentials:e,extraHeaders:An}),Nt=1e4;var H=(t=>(t.CONNECTING="connecting",t.CONNECTED="connected",t.DISCONNECTING="disconnecting",t.DISCONNECTED="disconnected",t.DIALING="dialing",t))(H||{});class Yr{listeners={};on(e,n){const{listeners:a}=this;a[e]??=new Set,a[e]?.add(n)}once(e,n){const a=o=>{n(o),this.off(e,n)};this.on(e,a)}has(e,n){return this.listeners[e]?.has(n)}off(e,n){this.listeners[e]?.delete(n)}emit(e,n){for(const a of this.listeners[e]??[])a(n)}}const Pt=s.makeMessageType("viam.component.arm.v1.GetEndPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Wr=s.makeMessageType("viam.component.arm.v1.GetEndPositionResponse",()=>[{no:1,name:"pose",kind:"message",T:Ue}]),pn=s.makeMessageType("viam.component.arm.v1.JointPositions",()=>[{no:1,name:"values",kind:"scalar",T:1,repeated:!0}]),Dt=s.makeMessageType("viam.component.arm.v1.GetJointPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),jr=s.makeMessageType("viam.component.arm.v1.GetJointPositionsResponse",()=>[{no:1,name:"positions",kind:"message",T:pn}]),At=s.makeMessageType("viam.component.arm.v1.MoveToPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"to",kind:"message",T:Ue},{no:99,name:"extra",kind:"message",T:p}]),Hr=s.makeMessageType("viam.component.arm.v1.MoveToPositionResponse",[]),Ut=s.makeMessageType("viam.component.arm.v1.MoveToJointPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"positions",kind:"message",T:pn},{no:99,name:"extra",kind:"message",T:p}]),Kr=s.makeMessageType("viam.component.arm.v1.MoveToJointPositionsResponse",[]),Xr=s.makeMessageType("viam.component.arm.v1.MoveThroughJointPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"positions",kind:"message",T:pn,repeated:!0},{no:3,name:"options",kind:"message",T:nm,opt:!0},{no:99,name:"extra",kind:"message",T:p}]),Qr=s.makeMessageType("viam.component.arm.v1.MoveThroughJointPositionsResponse",[]),qt=s.makeMessageType("viam.component.arm.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Zr=s.makeMessageType("viam.component.arm.v1.StopResponse",[]),m_=s.makeMessageType("viam.component.arm.v1.Status",()=>[{no:1,name:"end_position",kind:"message",T:Ue},{no:2,name:"joint_positions",kind:"message",T:pn},{no:3,name:"is_moving",kind:"scalar",T:8}]),Lt=s.makeMessageType("viam.component.arm.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),em=s.makeMessageType("viam.component.arm.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),nm=s.makeMessageType("viam.component.arm.v1.MoveOptions",()=>[{no:1,name:"max_vel_degs_per_sec",kind:"scalar",T:1,opt:!0},{no:2,name:"max_acc_degs_per_sec2",kind:"scalar",T:1,opt:!0},{no:3,name:"max_vel_degs_per_sec_joints",kind:"scalar",T:1,repeated:!0},{no:4,name:"max_acc_degs_per_sec2_joints",kind:"scalar",T:1,repeated:!0}]),am=Object.freeze(Object.defineProperty({__proto__:null,GetEndPositionRequest:Pt,GetEndPositionResponse:Wr,GetJointPositionsRequest:Dt,GetJointPositionsResponse:jr,IsMovingRequest:Lt,IsMovingResponse:em,JointPositions:pn,MoveOptions:nm,MoveThroughJointPositionsRequest:Xr,MoveThroughJointPositionsResponse:Qr,MoveToJointPositionsRequest:Ut,MoveToJointPositionsResponse:Kr,MoveToPositionRequest:At,MoveToPositionResponse:Hr,Status:m_,StopRequest:qt,StopResponse:Zr},Symbol.toStringTag,{value:"Module"})),tm={typeName:"viam.component.arm.v1.ArmService",methods:{getEndPosition:{name:"GetEndPosition",I:Pt,O:Wr,kind:m.Unary},moveToPosition:{name:"MoveToPosition",I:At,O:Hr,kind:m.Unary},getJointPositions:{name:"GetJointPositions",I:Dt,O:jr,kind:m.Unary},moveToJointPositions:{name:"MoveToJointPositions",I:Ut,O:Kr,kind:m.Unary},moveThroughJointPositions:{name:"MoveThroughJointPositions",I:Xr,O:Qr,kind:m.Unary},stop:{name:"Stop",I:qt,O:Zr,kind:m.Unary},isMoving:{name:"IsMoving",I:Lt,O:em,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getKinematics:{name:"GetKinematics",I:Nn,O:Ma,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary},get3DModels:{name:"Get3DModels",I:bt,O:Jr,kind:m.Unary}}},Gt=s.makeMessageType("viam.component.base.v1.MoveStraightRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"distance_mm",kind:"scalar",T:3},{no:3,name:"mm_per_sec",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),sm=s.makeMessageType("viam.component.base.v1.MoveStraightResponse",[]),Bt=s.makeMessageType("viam.component.base.v1.SpinRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"angle_deg",kind:"scalar",T:1},{no:3,name:"degs_per_sec",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),om=s.makeMessageType("viam.component.base.v1.SpinResponse",[]),Ft=s.makeMessageType("viam.component.base.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),im=s.makeMessageType("viam.component.base.v1.StopResponse",[]),xt=s.makeMessageType("viam.component.base.v1.SetPowerRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"linear",kind:"message",T:qe},{no:3,name:"angular",kind:"message",T:qe},{no:99,name:"extra",kind:"message",T:p}]),rm=s.makeMessageType("viam.component.base.v1.SetPowerResponse",[]),Jt=s.makeMessageType("viam.component.base.v1.SetVelocityRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"linear",kind:"message",T:qe},{no:3,name:"angular",kind:"message",T:qe},{no:99,name:"extra",kind:"message",T:p}]),mm=s.makeMessageType("viam.component.base.v1.SetVelocityResponse",[]),zt=s.makeMessageType("viam.component.base.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),cm=s.makeMessageType("viam.component.base.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),Oa=s.makeMessageType("viam.component.base.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),dm=s.makeMessageType("viam.component.base.v1.GetPropertiesResponse",()=>[{no:1,name:"width_meters",kind:"scalar",T:1},{no:2,name:"turning_radius_meters",kind:"scalar",T:1},{no:3,name:"wheel_circumference_meters",kind:"scalar",T:1}]),lm=Object.freeze(Object.defineProperty({__proto__:null,GetPropertiesRequest:Oa,GetPropertiesResponse:dm,IsMovingRequest:zt,IsMovingResponse:cm,MoveStraightRequest:Gt,MoveStraightResponse:sm,SetPowerRequest:xt,SetPowerResponse:rm,SetVelocityRequest:Jt,SetVelocityResponse:mm,SpinRequest:Bt,SpinResponse:om,StopRequest:Ft,StopResponse:im},Symbol.toStringTag,{value:"Module"})),pm={typeName:"viam.component.base.v1.BaseService",methods:{moveStraight:{name:"MoveStraight",I:Gt,O:sm,kind:m.Unary},spin:{name:"Spin",I:Bt,O:om,kind:m.Unary},setPower:{name:"SetPower",I:xt,O:rm,kind:m.Unary},setVelocity:{name:"SetVelocity",I:Jt,O:mm,kind:m.Unary},stop:{name:"Stop",I:Ft,O:im,kind:m.Unary},isMoving:{name:"IsMoving",I:zt,O:cm,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary},getProperties:{name:"GetProperties",I:Oa,O:dm,kind:m.Unary}}},um=s.makeEnum("viam.component.board.v1.PowerMode",[{no:0,name:"POWER_MODE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"POWER_MODE_NORMAL",localName:"NORMAL"},{no:2,name:"POWER_MODE_OFFLINE_DEEP",localName:"OFFLINE_DEEP"}]),c_=s.makeMessageType("viam.component.board.v1.Status",()=>[{no:1,name:"analogs",kind:"map",K:9,V:{kind:"scalar",T:5}},{no:2,name:"digital_interrupts",kind:"map",K:9,V:{kind:"scalar",T:3}}]),Vt=s.makeMessageType("viam.component.board.v1.SetGPIORequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"high",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),gm=s.makeMessageType("viam.component.board.v1.SetGPIOResponse",[]),$t=s.makeMessageType("viam.component.board.v1.GetGPIORequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Tm=s.makeMessageType("viam.component.board.v1.GetGPIOResponse",()=>[{no:1,name:"high",kind:"scalar",T:8}]),Yt=s.makeMessageType("viam.component.board.v1.PWMRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),km=s.makeMessageType("viam.component.board.v1.PWMResponse",()=>[{no:1,name:"duty_cycle_pct",kind:"scalar",T:1}]),Wt=s.makeMessageType("viam.component.board.v1.SetPWMRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"duty_cycle_pct",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),ym=s.makeMessageType("viam.component.board.v1.SetPWMResponse",[]),jt=s.makeMessageType("viam.component.board.v1.PWMFrequencyRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),vm=s.makeMessageType("viam.component.board.v1.PWMFrequencyResponse",()=>[{no:1,name:"frequency_hz",kind:"scalar",T:4}]),Ht=s.makeMessageType("viam.component.board.v1.SetPWMFrequencyRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"frequency_hz",kind:"scalar",T:4},{no:99,name:"extra",kind:"message",T:p}]),hm=s.makeMessageType("viam.component.board.v1.SetPWMFrequencyResponse",[]),Kt=s.makeMessageType("viam.component.board.v1.ReadAnalogReaderRequest",()=>[{no:1,name:"board_name",kind:"scalar",T:9},{no:2,name:"analog_reader_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),fm=s.makeMessageType("viam.component.board.v1.ReadAnalogReaderResponse",()=>[{no:1,name:"value",kind:"scalar",T:5},{no:2,name:"min_range",kind:"scalar",T:2},{no:3,name:"max_range",kind:"scalar",T:2},{no:4,name:"step_size",kind:"scalar",T:2}]),Xt=s.makeMessageType("viam.component.board.v1.WriteAnalogRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"value",kind:"scalar",T:5},{no:99,name:"extra",kind:"message",T:p}]),Rm=s.makeMessageType("viam.component.board.v1.WriteAnalogResponse",[]),Qt=s.makeMessageType("viam.component.board.v1.GetDigitalInterruptValueRequest",()=>[{no:1,name:"board_name",kind:"scalar",T:9},{no:2,name:"digital_interrupt_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),_m=s.makeMessageType("viam.component.board.v1.GetDigitalInterruptValueResponse",()=>[{no:1,name:"value",kind:"scalar",T:3}]),Zt=s.makeMessageType("viam.component.board.v1.StreamTicksRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin_names",kind:"scalar",T:9,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Sm=s.makeMessageType("viam.component.board.v1.StreamTicksResponse",()=>[{no:1,name:"pin_name",kind:"scalar",T:9},{no:2,name:"time",kind:"scalar",T:4},{no:3,name:"high",kind:"scalar",T:8}]),es=s.makeMessageType("viam.component.board.v1.SetPowerModeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"power_mode",kind:"enum",T:s.getEnumType(um)},{no:3,name:"duration",kind:"message",T:B,opt:!0},{no:99,name:"extra",kind:"message",T:p}]),Im=s.makeMessageType("viam.component.board.v1.SetPowerModeResponse",[]),Em=Object.freeze(Object.defineProperty({__proto__:null,GetDigitalInterruptValueRequest:Qt,GetDigitalInterruptValueResponse:_m,GetGPIORequest:$t,GetGPIOResponse:Tm,PWMFrequencyRequest:jt,PWMFrequencyResponse:vm,PWMRequest:Yt,PWMResponse:km,PowerMode:um,ReadAnalogReaderRequest:Kt,ReadAnalogReaderResponse:fm,SetGPIORequest:Vt,SetGPIOResponse:gm,SetPWMFrequencyRequest:Ht,SetPWMFrequencyResponse:hm,SetPWMRequest:Wt,SetPWMResponse:ym,SetPowerModeRequest:es,SetPowerModeResponse:Im,Status:c_,StreamTicksRequest:Zt,StreamTicksResponse:Sm,WriteAnalogRequest:Xt,WriteAnalogResponse:Rm},Symbol.toStringTag,{value:"Module"})),Mm={typeName:"viam.component.board.v1.BoardService",methods:{setGPIO:{name:"SetGPIO",I:Vt,O:gm,kind:m.Unary},getGPIO:{name:"GetGPIO",I:$t,O:Tm,kind:m.Unary},pWM:{name:"PWM",I:Yt,O:km,kind:m.Unary},setPWM:{name:"SetPWM",I:Wt,O:ym,kind:m.Unary},pWMFrequency:{name:"PWMFrequency",I:jt,O:vm,kind:m.Unary},setPWMFrequency:{name:"SetPWMFrequency",I:Ht,O:hm,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},readAnalogReader:{name:"ReadAnalogReader",I:Kt,O:fm,kind:m.Unary},writeAnalog:{name:"WriteAnalog",I:Xt,O:Rm,kind:m.Unary},getDigitalInterruptValue:{name:"GetDigitalInterruptValue",I:Qt,O:_m,kind:m.Unary},streamTicks:{name:"StreamTicks",I:Zt,O:Sm,kind:m.ServerStreaming},setPowerMode:{name:"SetPowerMode",I:es,O:Im,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}},ns=s.makeEnum("viam.component.encoder.v1.PositionType",[{no:0,name:"POSITION_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"POSITION_TYPE_TICKS_COUNT",localName:"TICKS_COUNT"},{no:2,name:"POSITION_TYPE_ANGLE_DEGREES",localName:"ANGLE_DEGREES"}]),as=s.makeMessageType("viam.component.encoder.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"position_type",kind:"enum",T:s.getEnumType(ns),opt:!0},{no:99,name:"extra",kind:"message",T:p}]),bm=s.makeMessageType("viam.component.encoder.v1.GetPositionResponse",()=>[{no:1,name:"value",kind:"scalar",T:2},{no:2,name:"position_type",kind:"enum",T:s.getEnumType(ns)}]),ts=s.makeMessageType("viam.component.encoder.v1.ResetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Om=s.makeMessageType("viam.component.encoder.v1.ResetPositionResponse",[]),ss=s.makeMessageType("viam.component.encoder.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),wm=s.makeMessageType("viam.component.encoder.v1.GetPropertiesResponse",()=>[{no:1,name:"ticks_count_supported",kind:"scalar",T:8},{no:2,name:"angle_degrees_supported",kind:"scalar",T:8}]),Cm=Object.freeze(Object.defineProperty({__proto__:null,GetPositionRequest:as,GetPositionResponse:bm,GetPropertiesRequest:ss,GetPropertiesResponse:wm,PositionType:ns,ResetPositionRequest:ts,ResetPositionResponse:Om},Symbol.toStringTag,{value:"Module"})),Nm={typeName:"viam.component.encoder.v1.EncoderService",methods:{getPosition:{name:"GetPosition",I:as,O:bm,kind:m.Unary},resetPosition:{name:"ResetPosition",I:ts,O:Om,kind:m.Unary},getProperties:{name:"GetProperties",I:ss,O:wm,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}},os=s.makeMessageType("viam.component.gantry.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Pm=s.makeMessageType("viam.component.gantry.v1.GetPositionResponse",()=>[{no:1,name:"positions_mm",kind:"scalar",T:1,repeated:!0}]),is=s.makeMessageType("viam.component.gantry.v1.MoveToPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"positions_mm",kind:"scalar",T:1,repeated:!0},{no:3,name:"speeds_mm_per_sec",kind:"scalar",T:1,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Dm=s.makeMessageType("viam.component.gantry.v1.MoveToPositionResponse",[]),rs=s.makeMessageType("viam.component.gantry.v1.HomeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Am=s.makeMessageType("viam.component.gantry.v1.HomeResponse",()=>[{no:1,name:"homed",kind:"scalar",T:8}]),ms=s.makeMessageType("viam.component.gantry.v1.GetLengthsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Um=s.makeMessageType("viam.component.gantry.v1.GetLengthsResponse",()=>[{no:1,name:"lengths_mm",kind:"scalar",T:1,repeated:!0}]),cs=s.makeMessageType("viam.component.gantry.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),qm=s.makeMessageType("viam.component.gantry.v1.StopResponse",[]),d_=s.makeMessageType("viam.component.gantry.v1.Status",()=>[{no:1,name:"positions_mm",kind:"scalar",T:1,repeated:!0},{no:2,name:"lengths_mm",kind:"scalar",T:1,repeated:!0},{no:3,name:"is_moving",kind:"scalar",T:8}]),ds=s.makeMessageType("viam.component.gantry.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Lm=s.makeMessageType("viam.component.gantry.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),l_=Object.freeze(Object.defineProperty({__proto__:null,GetLengthsRequest:ms,GetLengthsResponse:Um,GetPositionRequest:os,GetPositionResponse:Pm,HomeRequest:rs,HomeResponse:Am,IsMovingRequest:ds,IsMovingResponse:Lm,MoveToPositionRequest:is,MoveToPositionResponse:Dm,Status:d_,StopRequest:cs,StopResponse:qm},Symbol.toStringTag,{value:"Module"})),Gm={typeName:"viam.component.gantry.v1.GantryService",methods:{getPosition:{name:"GetPosition",I:os,O:Pm,kind:m.Unary},moveToPosition:{name:"MoveToPosition",I:is,O:Dm,kind:m.Unary},home:{name:"Home",I:rs,O:Am,kind:m.Unary},getLengths:{name:"GetLengths",I:ms,O:Um,kind:m.Unary},stop:{name:"Stop",I:cs,O:qm,kind:m.Unary},isMoving:{name:"IsMoving",I:ds,O:Lm,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getKinematics:{name:"GetKinematics",I:Nn,O:Ma,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}},ls={typeName:"viam.component.generic.v1.GenericService",methods:{doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}},p_=Object.freeze(Object.defineProperty({__proto__:null,GenericService:ls},Symbol.toStringTag,{value:"Module"})),ps=s.makeMessageType("viam.component.gripper.v1.OpenRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Bm=s.makeMessageType("viam.component.gripper.v1.OpenResponse",[]),us=s.makeMessageType("viam.component.gripper.v1.GrabRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Fm=s.makeMessageType("viam.component.gripper.v1.GrabResponse",()=>[{no:1,name:"success",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),gs=s.makeMessageType("viam.component.gripper.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),xm=s.makeMessageType("viam.component.gripper.v1.StopResponse",[]),Ts=s.makeMessageType("viam.component.gripper.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Jm=s.makeMessageType("viam.component.gripper.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),zm=s.makeMessageType("viam.component.gripper.v1.IsHoldingSomethingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Vm=s.makeMessageType("viam.component.gripper.v1.IsHoldingSomethingResponse",()=>[{no:1,name:"is_holding_something",kind:"scalar",T:8},{no:99,name:"meta",kind:"message",T:p}]),u_=Object.freeze(Object.defineProperty({__proto__:null,GrabRequest:us,GrabResponse:Fm,IsHoldingSomethingRequest:zm,IsHoldingSomethingResponse:Vm,IsMovingRequest:Ts,IsMovingResponse:Jm,OpenRequest:ps,OpenResponse:Bm,StopRequest:gs,StopResponse:xm},Symbol.toStringTag,{value:"Module"})),$m={typeName:"viam.component.gripper.v1.GripperService",methods:{open:{name:"Open",I:ps,O:Bm,kind:m.Unary},grab:{name:"Grab",I:us,O:Fm,kind:m.Unary},stop:{name:"Stop",I:gs,O:xm,kind:m.Unary},isMoving:{name:"IsMoving",I:Ts,O:Jm,kind:m.Unary},isHoldingSomething:{name:"IsHoldingSomething",I:zm,O:Vm,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary},getKinematics:{name:"GetKinematics",I:Nn,O:Ma,kind:m.Unary}}},Ym=s.makeMessageType("viam.component.inputcontroller.v1.GetControlsRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Wm=s.makeMessageType("viam.component.inputcontroller.v1.GetControlsResponse",()=>[{no:1,name:"controls",kind:"scalar",T:9,repeated:!0}]),ks=s.makeMessageType("viam.component.inputcontroller.v1.GetEventsRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),jm=s.makeMessageType("viam.component.inputcontroller.v1.GetEventsResponse",()=>[{no:1,name:"events",kind:"message",T:qn,repeated:!0}]),ys=s.makeMessageType("viam.component.inputcontroller.v1.TriggerEventRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:2,name:"event",kind:"message",T:qn},{no:99,name:"extra",kind:"message",T:p}]),Hm=s.makeMessageType("viam.component.inputcontroller.v1.TriggerEventResponse",[]),qn=s.makeMessageType("viam.component.inputcontroller.v1.Event",()=>[{no:1,name:"time",kind:"message",T:S},{no:2,name:"event",kind:"scalar",T:9},{no:3,name:"control",kind:"scalar",T:9},{no:4,name:"value",kind:"scalar",T:1}]),Km=s.makeMessageType("viam.component.inputcontroller.v1.StreamEventsRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:2,name:"events",kind:"message",T:Xm,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Xm=s.makeMessageType("viam.component.inputcontroller.v1.StreamEventsRequest.Events",()=>[{no:1,name:"control",kind:"scalar",T:9},{no:2,name:"events",kind:"scalar",T:9,repeated:!0},{no:3,name:"cancelled_events",kind:"scalar",T:9,repeated:!0}],{localName:"StreamEventsRequest_Events"}),Qm=s.makeMessageType("viam.component.inputcontroller.v1.StreamEventsResponse",()=>[{no:1,name:"event",kind:"message",T:qn}]),Zm=Object.freeze(Object.defineProperty({__proto__:null,Event:qn,GetControlsRequest:Ym,GetControlsResponse:Wm,GetEventsRequest:ks,GetEventsResponse:jm,Status:s.makeMessageType("viam.component.inputcontroller.v1.Status",()=>[{no:1,name:"events",kind:"message",T:qn,repeated:!0}]),StreamEventsRequest:Km,StreamEventsRequest_Events:Xm,StreamEventsResponse:Qm,TriggerEventRequest:ys,TriggerEventResponse:Hm},Symbol.toStringTag,{value:"Module"})),ec={typeName:"viam.component.inputcontroller.v1.InputControllerService",methods:{getControls:{name:"GetControls",I:Ym,O:Wm,kind:m.Unary},getEvents:{name:"GetEvents",I:ks,O:jm,kind:m.Unary},streamEvents:{name:"StreamEvents",I:Km,O:Qm,kind:m.ServerStreaming},triggerEvent:{name:"TriggerEvent",I:ys,O:Hm,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}},vs=s.makeMessageType("viam.component.motor.v1.SetPowerRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"power_pct",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),nc=s.makeMessageType("viam.component.motor.v1.SetPowerResponse",[]),hs=s.makeMessageType("viam.component.motor.v1.GoForRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"rpm",kind:"scalar",T:1},{no:3,name:"revolutions",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),ac=s.makeMessageType("viam.component.motor.v1.GoForResponse",[]),fs=s.makeMessageType("viam.component.motor.v1.GoToRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"rpm",kind:"scalar",T:1},{no:3,name:"position_revolutions",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),tc=s.makeMessageType("viam.component.motor.v1.GoToResponse",[]),Rs=s.makeMessageType("viam.component.motor.v1.SetRPMRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"rpm",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),sc=s.makeMessageType("viam.component.motor.v1.SetRPMResponse",[]),_s=s.makeMessageType("viam.component.motor.v1.ResetZeroPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"offset",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),oc=s.makeMessageType("viam.component.motor.v1.ResetZeroPositionResponse",[]),Ss=s.makeMessageType("viam.component.motor.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),ic=s.makeMessageType("viam.component.motor.v1.GetPositionResponse",()=>[{no:1,name:"position",kind:"scalar",T:1}]),Is=s.makeMessageType("viam.component.motor.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),rc=s.makeMessageType("viam.component.motor.v1.StopResponse",[]),Es=s.makeMessageType("viam.component.motor.v1.IsPoweredRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),mc=s.makeMessageType("viam.component.motor.v1.IsPoweredResponse",()=>[{no:1,name:"is_on",kind:"scalar",T:8},{no:2,name:"power_pct",kind:"scalar",T:1}]),Ms=s.makeMessageType("viam.component.motor.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),cc=s.makeMessageType("viam.component.motor.v1.GetPropertiesResponse",()=>[{no:1,name:"position_reporting",kind:"scalar",T:8}]),g_=s.makeMessageType("viam.component.motor.v1.Status",()=>[{no:1,name:"is_powered",kind:"scalar",T:8},{no:3,name:"position",kind:"scalar",T:1},{no:4,name:"is_moving",kind:"scalar",T:8}]),bs=s.makeMessageType("viam.component.motor.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),dc=s.makeMessageType("viam.component.motor.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),T_=Object.freeze(Object.defineProperty({__proto__:null,GetPositionRequest:Ss,GetPositionResponse:ic,GetPropertiesRequest:Ms,GetPropertiesResponse:cc,GoForRequest:hs,GoForResponse:ac,GoToRequest:fs,GoToResponse:tc,IsMovingRequest:bs,IsMovingResponse:dc,IsPoweredRequest:Es,IsPoweredResponse:mc,ResetZeroPositionRequest:_s,ResetZeroPositionResponse:oc,SetPowerRequest:vs,SetPowerResponse:nc,SetRPMRequest:Rs,SetRPMResponse:sc,Status:g_,StopRequest:Is,StopResponse:rc},Symbol.toStringTag,{value:"Module"})),lc={typeName:"viam.component.motor.v1.MotorService",methods:{setPower:{name:"SetPower",I:vs,O:nc,kind:m.Unary},goFor:{name:"GoFor",I:hs,O:ac,kind:m.Unary},goTo:{name:"GoTo",I:fs,O:tc,kind:m.Unary},setRPM:{name:"SetRPM",I:Rs,O:sc,kind:m.Unary},resetZeroPosition:{name:"ResetZeroPosition",I:_s,O:oc,kind:m.Unary},getPosition:{name:"GetPosition",I:Ss,O:ic,kind:m.Unary},getProperties:{name:"GetProperties",I:Ms,O:cc,kind:m.Unary},stop:{name:"Stop",I:Is,O:rc,kind:m.Unary},isPowered:{name:"IsPowered",I:Es,O:mc,kind:m.Unary},isMoving:{name:"IsMoving",I:bs,O:dc,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}},Os=s.makeMessageType("viam.component.movementsensor.v1.GetLinearVelocityRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),pc=s.makeMessageType("viam.component.movementsensor.v1.GetLinearVelocityResponse",()=>[{no:1,name:"linear_velocity",kind:"message",T:qe}]),ws=s.makeMessageType("viam.component.movementsensor.v1.GetAngularVelocityRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),uc=s.makeMessageType("viam.component.movementsensor.v1.GetAngularVelocityResponse",()=>[{no:1,name:"angular_velocity",kind:"message",T:qe}]),Cs=s.makeMessageType("viam.component.movementsensor.v1.GetCompassHeadingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),gc=s.makeMessageType("viam.component.movementsensor.v1.GetCompassHeadingResponse",()=>[{no:1,name:"value",kind:"scalar",T:1}]),Ns=s.makeMessageType("viam.component.movementsensor.v1.GetOrientationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Tc=s.makeMessageType("viam.component.movementsensor.v1.GetOrientationResponse",()=>[{no:1,name:"orientation",kind:"message",T:Ur}]),Ps=s.makeMessageType("viam.component.movementsensor.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),kc=s.makeMessageType("viam.component.movementsensor.v1.GetPositionResponse",()=>[{no:1,name:"coordinate",kind:"message",T:$e},{no:2,name:"altitude_m",kind:"scalar",T:2}]),Ds=s.makeMessageType("viam.component.movementsensor.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),yc=s.makeMessageType("viam.component.movementsensor.v1.GetPropertiesResponse",()=>[{no:1,name:"linear_velocity_supported",kind:"scalar",T:8},{no:2,name:"angular_velocity_supported",kind:"scalar",T:8},{no:3,name:"orientation_supported",kind:"scalar",T:8},{no:4,name:"position_supported",kind:"scalar",T:8},{no:5,name:"compass_heading_supported",kind:"scalar",T:8},{no:6,name:"linear_acceleration_supported",kind:"scalar",T:8}]),As=s.makeMessageType("viam.component.movementsensor.v1.GetAccuracyRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),vc=s.makeMessageType("viam.component.movementsensor.v1.GetAccuracyResponse",()=>[{no:1,name:"accuracy",kind:"map",K:9,V:{kind:"scalar",T:2}},{no:2,name:"position_hdop",kind:"scalar",T:2,opt:!0},{no:3,name:"position_vdop",kind:"scalar",T:2,opt:!0},{no:4,name:"position_nmea_gga_fix",kind:"scalar",T:5,opt:!0},{no:5,name:"compass_degrees_error",kind:"scalar",T:2,opt:!0}]),Us=s.makeMessageType("viam.component.movementsensor.v1.GetLinearAccelerationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),hc=s.makeMessageType("viam.component.movementsensor.v1.GetLinearAccelerationResponse",()=>[{no:1,name:"linear_acceleration",kind:"message",T:qe}]),fc=Object.freeze(Object.defineProperty({__proto__:null,GetAccuracyRequest:As,GetAccuracyResponse:vc,GetAngularVelocityRequest:ws,GetAngularVelocityResponse:uc,GetCompassHeadingRequest:Cs,GetCompassHeadingResponse:gc,GetLinearAccelerationRequest:Us,GetLinearAccelerationResponse:hc,GetLinearVelocityRequest:Os,GetLinearVelocityResponse:pc,GetOrientationRequest:Ns,GetOrientationResponse:Tc,GetPositionRequest:Ps,GetPositionResponse:kc,GetPropertiesRequest:Ds,GetPropertiesResponse:yc},Symbol.toStringTag,{value:"Module"})),Rc={typeName:"viam.component.movementsensor.v1.MovementSensorService",methods:{getLinearVelocity:{name:"GetLinearVelocity",I:Os,O:pc,kind:m.Unary},getAngularVelocity:{name:"GetAngularVelocity",I:ws,O:uc,kind:m.Unary},getCompassHeading:{name:"GetCompassHeading",I:Cs,O:gc,kind:m.Unary},getOrientation:{name:"GetOrientation",I:Ns,O:Tc,kind:m.Unary},getPosition:{name:"GetPosition",I:Ps,O:kc,kind:m.Unary},getProperties:{name:"GetProperties",I:Ds,O:yc,kind:m.Unary},getAccuracy:{name:"GetAccuracy",I:As,O:vc,kind:m.Unary},getLinearAcceleration:{name:"GetLinearAcceleration",I:Us,O:hc,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary},getReadings:{name:"GetReadings",I:Ze,O:ba,kind:m.Unary}}},qs=s.makeMessageType("viam.component.powersensor.v1.GetVoltageRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),_c=s.makeMessageType("viam.component.powersensor.v1.GetVoltageResponse",()=>[{no:1,name:"volts",kind:"scalar",T:1},{no:2,name:"is_ac",kind:"scalar",T:8}]),Ls=s.makeMessageType("viam.component.powersensor.v1.GetCurrentRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Sc=s.makeMessageType("viam.component.powersensor.v1.GetCurrentResponse",()=>[{no:1,name:"amperes",kind:"scalar",T:1},{no:2,name:"is_ac",kind:"scalar",T:8}]),Gs=s.makeMessageType("viam.component.powersensor.v1.GetPowerRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ic=s.makeMessageType("viam.component.powersensor.v1.GetPowerResponse",()=>[{no:1,name:"watts",kind:"scalar",T:1}]),k_=Object.freeze(Object.defineProperty({__proto__:null,GetCurrentRequest:Ls,GetCurrentResponse:Sc,GetPowerRequest:Gs,GetPowerResponse:Ic,GetVoltageRequest:qs,GetVoltageResponse:_c},Symbol.toStringTag,{value:"Module"})),Ec={typeName:"viam.component.powersensor.v1.PowerSensorService",methods:{getVoltage:{name:"GetVoltage",I:qs,O:_c,kind:m.Unary},getCurrent:{name:"GetCurrent",I:Ls,O:Sc,kind:m.Unary},getPower:{name:"GetPower",I:Gs,O:Ic,kind:m.Unary},getReadings:{name:"GetReadings",I:Ze,O:ba,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}},Bs=s.makeMessageType("viam.component.servo.v1.MoveRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"angle_deg",kind:"scalar",T:13},{no:99,name:"extra",kind:"message",T:p}]),Mc=s.makeMessageType("viam.component.servo.v1.MoveResponse",[]),Fs=s.makeMessageType("viam.component.servo.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),bc=s.makeMessageType("viam.component.servo.v1.GetPositionResponse",()=>[{no:1,name:"position_deg",kind:"scalar",T:13}]),xs=s.makeMessageType("viam.component.servo.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Oc=s.makeMessageType("viam.component.servo.v1.StopResponse",[]),y_=s.makeMessageType("viam.component.servo.v1.Status",()=>[{no:1,name:"position_deg",kind:"scalar",T:13},{no:2,name:"is_moving",kind:"scalar",T:8}]),Js=s.makeMessageType("viam.component.servo.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),wc=s.makeMessageType("viam.component.servo.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),v_=Object.freeze(Object.defineProperty({__proto__:null,GetPositionRequest:Fs,GetPositionResponse:bc,IsMovingRequest:Js,IsMovingResponse:wc,MoveRequest:Bs,MoveResponse:Mc,Status:y_,StopRequest:xs,StopResponse:Oc},Symbol.toStringTag,{value:"Module"})),Cc={typeName:"viam.component.servo.v1.ServoService",methods:{move:{name:"Move",I:Bs,O:Mc,kind:m.Unary},getPosition:{name:"GetPosition",I:Fs,O:bc,kind:m.Unary},stop:{name:"Stop",I:xs,O:Oc,kind:m.Unary},isMoving:{name:"IsMoving",I:Js,O:wc,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}},Nc=s.makeMessageType("opentelemetry.proto.common.v1.AnyValue",()=>[{no:1,name:"string_value",kind:"scalar",T:9,oneof:"value"},{no:2,name:"bool_value",kind:"scalar",T:8,oneof:"value"},{no:3,name:"int_value",kind:"scalar",T:3,oneof:"value"},{no:4,name:"double_value",kind:"scalar",T:1,oneof:"value"},{no:5,name:"array_value",kind:"message",T:h_,oneof:"value"},{no:6,name:"kvlist_value",kind:"message",T:f_,oneof:"value"},{no:7,name:"bytes_value",kind:"scalar",T:12,oneof:"value"}]),h_=s.makeMessageType("opentelemetry.proto.common.v1.ArrayValue",()=>[{no:1,name:"values",kind:"message",T:Nc,repeated:!0}]),f_=s.makeMessageType("opentelemetry.proto.common.v1.KeyValueList",()=>[{no:1,name:"values",kind:"message",T:un,repeated:!0}]),un=s.makeMessageType("opentelemetry.proto.common.v1.KeyValue",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"message",T:Nc}]),R_=s.makeMessageType("opentelemetry.proto.common.v1.InstrumentationScope",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:un,repeated:!0},{no:4,name:"dropped_attributes_count",kind:"scalar",T:13}]),__=s.makeMessageType("opentelemetry.proto.common.v1.EntityRef",()=>[{no:1,name:"schema_url",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"id_keys",kind:"scalar",T:9,repeated:!0},{no:4,name:"description_keys",kind:"scalar",T:9,repeated:!0}]),S_=s.makeMessageType("opentelemetry.proto.resource.v1.Resource",()=>[{no:1,name:"attributes",kind:"message",T:un,repeated:!0},{no:2,name:"dropped_attributes_count",kind:"scalar",T:13},{no:3,name:"entity_refs",kind:"message",T:__,repeated:!0}]),I_=s.makeMessageType("opentelemetry.proto.trace.v1.ResourceSpans",()=>[{no:1,name:"resource",kind:"message",T:S_},{no:2,name:"scope_spans",kind:"message",T:E_,repeated:!0},{no:3,name:"schema_url",kind:"scalar",T:9}]),E_=s.makeMessageType("opentelemetry.proto.trace.v1.ScopeSpans",()=>[{no:1,name:"scope",kind:"message",T:R_},{no:2,name:"spans",kind:"message",T:M_,repeated:!0},{no:3,name:"schema_url",kind:"scalar",T:9}]),M_=s.makeMessageType("opentelemetry.proto.trace.v1.Span",()=>[{no:1,name:"trace_id",kind:"scalar",T:12},{no:2,name:"span_id",kind:"scalar",T:12},{no:3,name:"trace_state",kind:"scalar",T:9},{no:4,name:"parent_span_id",kind:"scalar",T:12},{no:16,name:"flags",kind:"scalar",T:7},{no:5,name:"name",kind:"scalar",T:9},{no:6,name:"kind",kind:"enum",T:s.getEnumType(b_)},{no:7,name:"start_time_unix_nano",kind:"scalar",T:6},{no:8,name:"end_time_unix_nano",kind:"scalar",T:6},{no:9,name:"attributes",kind:"message",T:un,repeated:!0},{no:10,name:"dropped_attributes_count",kind:"scalar",T:13},{no:11,name:"events",kind:"message",T:O_,repeated:!0},{no:12,name:"dropped_events_count",kind:"scalar",T:13},{no:13,name:"links",kind:"message",T:w_,repeated:!0},{no:14,name:"dropped_links_count",kind:"scalar",T:13},{no:15,name:"status",kind:"message",T:C_}]),b_=s.makeEnum("opentelemetry.proto.trace.v1.Span.SpanKind",[{no:0,name:"SPAN_KIND_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"SPAN_KIND_INTERNAL",localName:"INTERNAL"},{no:2,name:"SPAN_KIND_SERVER",localName:"SERVER"},{no:3,name:"SPAN_KIND_CLIENT",localName:"CLIENT"},{no:4,name:"SPAN_KIND_PRODUCER",localName:"PRODUCER"},{no:5,name:"SPAN_KIND_CONSUMER",localName:"CONSUMER"}]),O_=s.makeMessageType("opentelemetry.proto.trace.v1.Span.Event",()=>[{no:1,name:"time_unix_nano",kind:"scalar",T:6},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:un,repeated:!0},{no:4,name:"dropped_attributes_count",kind:"scalar",T:13}],{localName:"Span_Event"}),w_=s.makeMessageType("opentelemetry.proto.trace.v1.Span.Link",()=>[{no:1,name:"trace_id",kind:"scalar",T:12},{no:2,name:"span_id",kind:"scalar",T:12},{no:3,name:"trace_state",kind:"scalar",T:9},{no:4,name:"attributes",kind:"message",T:un,repeated:!0},{no:5,name:"dropped_attributes_count",kind:"scalar",T:13},{no:6,name:"flags",kind:"scalar",T:7}],{localName:"Span_Link"}),C_=s.makeMessageType("opentelemetry.proto.trace.v1.Status",()=>[{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"code",kind:"enum",T:s.getEnumType(N_)}]),N_=s.makeEnum("opentelemetry.proto.trace.v1.Status.StatusCode",[{no:0,name:"STATUS_CODE_UNSET",localName:"UNSET"},{no:1,name:"STATUS_CODE_OK",localName:"OK"},{no:2,name:"STATUS_CODE_ERROR",localName:"ERROR"}]),Pc=s.makeEnum("viam.robot.v1.PeerConnectionType",[{no:0,name:"PEER_CONNECTION_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PEER_CONNECTION_TYPE_GRPC",localName:"GRPC"},{no:2,name:"PEER_CONNECTION_TYPE_WEBRTC",localName:"WEBRTC"}]),Dc=s.makeMessageType("viam.robot.v1.SendTracesRequest",()=>[{no:1,name:"resource_spans",kind:"message",T:I_,repeated:!0}]),Ac=s.makeMessageType("viam.robot.v1.SendTracesResponse",[]),Uc=s.makeMessageType("viam.robot.v1.TunnelRequest",()=>[{no:1,name:"destination_port",kind:"scalar",T:13},{no:2,name:"data",kind:"scalar",T:12}]),qc=s.makeMessageType("viam.robot.v1.TunnelResponse",()=>[{no:1,name:"data",kind:"scalar",T:12}]),Lc=s.makeMessageType("viam.robot.v1.ListTunnelsRequest",[]),Gc=s.makeMessageType("viam.robot.v1.ListTunnelsResponse",()=>[{no:1,name:"tunnels",kind:"message",T:Bc,repeated:!0}]),Bc=s.makeMessageType("viam.robot.v1.Tunnel",()=>[{no:1,name:"port",kind:"scalar",T:13},{no:2,name:"connection_timeout",kind:"message",T:B}]),Fc=s.makeMessageType("viam.robot.v1.FrameSystemConfig",()=>[{no:1,name:"frame",kind:"message",T:Le},{no:2,name:"kinematics",kind:"message",T:p}]),xc=s.makeMessageType("viam.robot.v1.FrameSystemConfigRequest",()=>[{no:1,name:"supplemental_transforms",kind:"message",T:Le,repeated:!0}]),Jc=s.makeMessageType("viam.robot.v1.FrameSystemConfigResponse",()=>[{no:1,name:"frame_system_configs",kind:"message",T:Fc,repeated:!0}]),zs=s.makeMessageType("viam.robot.v1.TransformPoseRequest",()=>[{no:1,name:"source",kind:"message",T:Ve},{no:2,name:"destination",kind:"scalar",T:9},{no:3,name:"supplemental_transforms",kind:"message",T:Le,repeated:!0}]),zc=s.makeMessageType("viam.robot.v1.TransformPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:Ve}]),Vs=s.makeMessageType("viam.robot.v1.TransformPCDRequest",()=>[{no:1,name:"point_cloud_pcd",kind:"scalar",T:12},{no:2,name:"source",kind:"scalar",T:9},{no:3,name:"destination",kind:"scalar",T:9}]),Vc=s.makeMessageType("viam.robot.v1.TransformPCDResponse",()=>[{no:1,name:"point_cloud_pcd",kind:"scalar",T:12}]),$c=s.makeMessageType("viam.robot.v1.ResourceNamesRequest",[]),Yc=s.makeMessageType("viam.robot.v1.ResourceNamesResponse",()=>[{no:1,name:"resources",kind:"message",T:F,repeated:!0}]),Wc=s.makeMessageType("viam.robot.v1.ResourceRPCSubtype",()=>[{no:1,name:"subtype",kind:"message",T:F},{no:2,name:"proto_service",kind:"scalar",T:9}]),jc=s.makeMessageType("viam.robot.v1.ResourceRPCSubtypesRequest",[]),Hc=s.makeMessageType("viam.robot.v1.ResourceRPCSubtypesResponse",()=>[{no:1,name:"resource_rpc_subtypes",kind:"message",T:Wc,repeated:!0}]),Kc=s.makeMessageType("viam.robot.v1.Operation",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"method",kind:"scalar",T:9},{no:3,name:"arguments",kind:"message",T:p},{no:4,name:"started",kind:"message",T:S},{no:5,name:"session_id",kind:"scalar",T:9,opt:!0}]),Xc=s.makeMessageType("viam.robot.v1.GetOperationsRequest",[]),Qc=s.makeMessageType("viam.robot.v1.GetOperationsResponse",()=>[{no:1,name:"operations",kind:"message",T:Kc,repeated:!0}]),Zc=s.makeMessageType("viam.robot.v1.CancelOperationRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ed=s.makeMessageType("viam.robot.v1.CancelOperationResponse",[]),nd=s.makeMessageType("viam.robot.v1.BlockForOperationRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ad=s.makeMessageType("viam.robot.v1.BlockForOperationResponse",[]),td=s.makeMessageType("viam.robot.v1.PeerConnectionInfo",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(Pc)},{no:2,name:"remote_address",kind:"scalar",T:9,opt:!0},{no:3,name:"local_address",kind:"scalar",T:9,opt:!0}]),sd=s.makeMessageType("viam.robot.v1.Session",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"peer_connection_info",kind:"message",T:td,opt:!0}]),od=s.makeMessageType("viam.robot.v1.GetSessionsRequest",[]),id=s.makeMessageType("viam.robot.v1.GetSessionsResponse",()=>[{no:1,name:"sessions",kind:"message",T:sd,repeated:!0}]),rd=s.makeMessageType("viam.robot.v1.ModuleModel",()=>[{no:1,name:"module_name",kind:"scalar",T:9},{no:2,name:"model",kind:"scalar",T:9},{no:3,name:"api",kind:"scalar",T:9},{no:4,name:"from_local_module",kind:"scalar",T:8}]),$s=s.makeMessageType("viam.robot.v1.GetModelsFromModulesRequest",[]),md=s.makeMessageType("viam.robot.v1.GetModelsFromModulesResponse",()=>[{no:1,name:"models",kind:"message",T:rd,repeated:!0}]),Ys=s.makeMessageType("viam.robot.v1.Status",()=>[{no:1,name:"name",kind:"message",T:F},{no:2,name:"status",kind:"message",T:p},{no:3,name:"last_reconfigured",kind:"message",T:S}]),cd=s.makeMessageType("viam.robot.v1.GetStatusRequest",()=>[{no:1,name:"resource_names",kind:"message",T:F,repeated:!0}]),dd=s.makeMessageType("viam.robot.v1.GetStatusResponse",()=>[{no:1,name:"status",kind:"message",T:Ys,repeated:!0}]),ld=s.makeMessageType("viam.robot.v1.StreamStatusRequest",()=>[{no:1,name:"resource_names",kind:"message",T:F,repeated:!0},{no:2,name:"every",kind:"message",T:B}]),pd=s.makeMessageType("viam.robot.v1.StreamStatusResponse",()=>[{no:1,name:"status",kind:"message",T:Ys,repeated:!0}]),ud=s.makeMessageType("viam.robot.v1.StopExtraParameters",()=>[{no:1,name:"name",kind:"message",T:F},{no:2,name:"params",kind:"message",T:p}]),gd=s.makeMessageType("viam.robot.v1.StopAllRequest",()=>[{no:99,name:"extra",kind:"message",T:ud,repeated:!0}]),Td=s.makeMessageType("viam.robot.v1.StopAllResponse",[]),Ws=s.makeMessageType("viam.robot.v1.StartSessionRequest",()=>[{no:1,name:"resume",kind:"scalar",T:9}]),kd=s.makeMessageType("viam.robot.v1.StartSessionResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"heartbeat_window",kind:"message",T:B}]),js=s.makeMessageType("viam.robot.v1.SendSessionHeartbeatRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),yd=s.makeMessageType("viam.robot.v1.SendSessionHeartbeatResponse",[]),vd=s.makeMessageType("viam.robot.v1.LogRequest",()=>[{no:1,name:"logs",kind:"message",T:Pn,repeated:!0}]),hd=s.makeMessageType("viam.robot.v1.LogResponse",[]),fd=s.makeMessageType("viam.robot.v1.GetCloudMetadataRequest",[]),Hs=s.makeMessageType("viam.robot.v1.GetCloudMetadataResponse",()=>[{no:1,name:"robot_part_id",kind:"scalar",T:9},{no:2,name:"primary_org_id",kind:"scalar",T:9},{no:3,name:"location_id",kind:"scalar",T:9},{no:4,name:"machine_id",kind:"scalar",T:9},{no:5,name:"machine_part_id",kind:"scalar",T:9}]),Ks=s.makeMessageType("viam.robot.v1.RestartModuleRequest",()=>[{no:1,name:"module_id",kind:"scalar",T:9,oneof:"id_or_name"},{no:2,name:"module_name",kind:"scalar",T:9,oneof:"id_or_name"}]),Rd=s.makeMessageType("viam.robot.v1.RestartModuleResponse",[]),_d=s.makeMessageType("viam.robot.v1.ShutdownRequest",[]),Sd=s.makeMessageType("viam.robot.v1.ShutdownResponse",[]),Id=s.makeMessageType("viam.robot.v1.GetMachineStatusRequest",[]),Ed=s.makeMessageType("viam.robot.v1.GetMachineStatusResponse",()=>[{no:1,name:"resources",kind:"message",T:Od,repeated:!0},{no:2,name:"config",kind:"message",T:Cd},{no:3,name:"state",kind:"enum",T:s.getEnumType(Md)},{no:4,name:"job_statuses",kind:"message",T:bd,repeated:!0}]),Md=s.makeEnum("viam.robot.v1.GetMachineStatusResponse.State",[{no:0,name:"STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"STATE_INITIALIZING",localName:"INITIALIZING"},{no:2,name:"STATE_RUNNING",localName:"RUNNING"}]),bd=s.makeMessageType("viam.robot.v1.JobStatus",()=>[{no:1,name:"job_name",kind:"scalar",T:9},{no:2,name:"recent_successful_runs",kind:"message",T:S,repeated:!0},{no:3,name:"recent_failed_runs",kind:"message",T:S,repeated:!0}]),Od=s.makeMessageType("viam.robot.v1.ResourceStatus",()=>[{no:1,name:"name",kind:"message",T:F},{no:2,name:"state",kind:"enum",T:s.getEnumType(wd)},{no:3,name:"last_updated",kind:"message",T:S},{no:4,name:"revision",kind:"scalar",T:9},{no:5,name:"error",kind:"scalar",T:9},{no:6,name:"cloud_metadata",kind:"message",T:Hs,opt:!0}]),wd=s.makeEnum("viam.robot.v1.ResourceStatus.State",[{no:0,name:"STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"STATE_UNCONFIGURED",localName:"UNCONFIGURED"},{no:2,name:"STATE_CONFIGURING",localName:"CONFIGURING"},{no:3,name:"STATE_READY",localName:"READY"},{no:4,name:"STATE_REMOVING",localName:"REMOVING"},{no:5,name:"STATE_UNHEALTHY",localName:"UNHEALTHY"}]),Cd=s.makeMessageType("viam.robot.v1.ConfigStatus",()=>[{no:1,name:"revision",kind:"scalar",T:9},{no:2,name:"last_updated",kind:"message",T:S}]),Nd=s.makeMessageType("viam.robot.v1.GetVersionRequest",[]),Pd=s.makeMessageType("viam.robot.v1.GetVersionResponse",()=>[{no:1,name:"platform",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"api_version",kind:"scalar",T:9}]),Xs=s.makeMessageType("viam.robot.v1.GetPoseRequest",()=>[{no:1,name:"component_name",kind:"scalar",T:9},{no:2,name:"destination_frame",kind:"scalar",T:9},{no:3,name:"supplemental_transforms",kind:"message",T:Le,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Dd=s.makeMessageType("viam.robot.v1.GetPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:Ve}]),P_=Object.freeze(Object.defineProperty({__proto__:null,BlockForOperationRequest:nd,BlockForOperationResponse:ad,CancelOperationRequest:Zc,CancelOperationResponse:ed,ConfigStatus:Cd,FrameSystemConfig:Fc,FrameSystemConfigRequest:xc,FrameSystemConfigResponse:Jc,GetCloudMetadataRequest:fd,GetCloudMetadataResponse:Hs,GetMachineStatusRequest:Id,GetMachineStatusResponse:Ed,GetMachineStatusResponse_State:Md,GetModelsFromModulesRequest:$s,GetModelsFromModulesResponse:md,GetOperationsRequest:Xc,GetOperationsResponse:Qc,GetPoseRequest:Xs,GetPoseResponse:Dd,GetSessionsRequest:od,GetSessionsResponse:id,GetStatusRequest:cd,GetStatusResponse:dd,GetVersionRequest:Nd,GetVersionResponse:Pd,JobStatus:bd,ListTunnelsRequest:Lc,ListTunnelsResponse:Gc,LogRequest:vd,LogResponse:hd,ModuleModel:rd,Operation:Kc,PeerConnectionInfo:td,PeerConnectionType:Pc,ResourceNamesRequest:$c,ResourceNamesResponse:Yc,ResourceRPCSubtype:Wc,ResourceRPCSubtypesRequest:jc,ResourceRPCSubtypesResponse:Hc,ResourceStatus:Od,ResourceStatus_State:wd,RestartModuleRequest:Ks,RestartModuleResponse:Rd,SendSessionHeartbeatRequest:js,SendSessionHeartbeatResponse:yd,SendTracesRequest:Dc,SendTracesResponse:Ac,Session:sd,ShutdownRequest:_d,ShutdownResponse:Sd,StartSessionRequest:Ws,StartSessionResponse:kd,Status:Ys,StopAllRequest:gd,StopAllResponse:Td,StopExtraParameters:ud,StreamStatusRequest:ld,StreamStatusResponse:pd,TransformPCDRequest:Vs,TransformPCDResponse:Vc,TransformPoseRequest:zs,TransformPoseResponse:zc,Tunnel:Bc,TunnelRequest:Uc,TunnelResponse:qc},Symbol.toStringTag,{value:"Module"})),Qs={typeName:"viam.robot.v1.RobotService",methods:{getOperations:{name:"GetOperations",I:Xc,O:Qc,kind:m.Unary},getSessions:{name:"GetSessions",I:od,O:id,kind:m.Unary},resourceNames:{name:"ResourceNames",I:$c,O:Yc,kind:m.Unary},resourceRPCSubtypes:{name:"ResourceRPCSubtypes",I:jc,O:Hc,kind:m.Unary},cancelOperation:{name:"CancelOperation",I:Zc,O:ed,kind:m.Unary},blockForOperation:{name:"BlockForOperation",I:nd,O:ad,kind:m.Unary},getModelsFromModules:{name:"GetModelsFromModules",I:$s,O:md,kind:m.Unary},getStatus:{name:"GetStatus",I:cd,O:dd,kind:m.Unary},streamStatus:{name:"StreamStatus",I:ld,O:pd,kind:m.ServerStreaming},stopAll:{name:"StopAll",I:gd,O:Td,kind:m.Unary},startSession:{name:"StartSession",I:Ws,O:kd,kind:m.Unary},sendSessionHeartbeat:{name:"SendSessionHeartbeat",I:js,O:yd,kind:m.Unary},log:{name:"Log",I:vd,O:hd,kind:m.Unary},getCloudMetadata:{name:"GetCloudMetadata",I:fd,O:Hs,kind:m.Unary},restartModule:{name:"RestartModule",I:Ks,O:Rd,kind:m.Unary},shutdown:{name:"Shutdown",I:_d,O:Sd,kind:m.Unary},getMachineStatus:{name:"GetMachineStatus",I:Id,O:Ed,kind:m.Unary},getVersion:{name:"GetVersion",I:Nd,O:Pd,kind:m.Unary},tunnel:{name:"Tunnel",I:Uc,O:qc,kind:m.BiDiStreaming},listTunnels:{name:"ListTunnels",I:Lc,O:Gc,kind:m.Unary},frameSystemConfig:{name:"FrameSystemConfig",I:xc,O:Jc,kind:m.Unary},getPose:{name:"GetPose",I:Xs,O:Dd,kind:m.Unary},transformPose:{name:"TransformPose",I:zs,O:zc,kind:m.Unary},transformPCD:{name:"TransformPCD",I:Vs,O:Vc,kind:m.Unary},sendTraces:{name:"SendTraces",I:Dc,O:Ac,kind:m.Unary}}},Zs=s.makeEnum("viam.app.v1.CredentialsType",[{no:0,name:"CREDENTIALS_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"CREDENTIALS_TYPE_INTERNAL",localName:"INTERNAL"},{no:2,name:"CREDENTIALS_TYPE_API_KEY",localName:"API_KEY"},{no:3,name:"CREDENTIALS_TYPE_ROBOT_SECRET",localName:"ROBOT_SECRET"},{no:4,name:"CREDENTIALS_TYPE_ROBOT_LOCATION_SECRET",localName:"ROBOT_LOCATION_SECRET"}]),Ad=s.makeMessageType("viam.app.v1.RobotConfig",()=>[{no:1,name:"cloud",kind:"message",T:Bd},{no:2,name:"remotes",kind:"message",T:tl,repeated:!0},{no:3,name:"components",kind:"message",T:eo,repeated:!0},{no:4,name:"processes",kind:"message",T:Fd,repeated:!0},{no:5,name:"services",kind:"message",T:xd,repeated:!0},{no:6,name:"network",kind:"message",T:Jd,opt:!0},{no:7,name:"auth",kind:"message",T:$d,opt:!0},{no:8,name:"debug",kind:"scalar",T:8,opt:!0},{no:9,name:"modules",kind:"message",T:rl,repeated:!0},{no:10,name:"disable_partial_start",kind:"scalar",T:8,opt:!0},{no:11,name:"packages",kind:"message",T:ml,repeated:!0},{no:12,name:"overwrite_fragment_status",kind:"message",T:wa,repeated:!0},{no:13,name:"enable_web_profile",kind:"scalar",T:8},{no:14,name:"log",kind:"message",T:Ud,repeated:!0},{no:15,name:"revision",kind:"scalar",T:9},{no:16,name:"maintenance",kind:"message",T:cl,opt:!0},{no:17,name:"disable_log_deduplication",kind:"scalar",T:8},{no:18,name:"jobs",kind:"message",T:qd,repeated:!0},{no:19,name:"tracing",kind:"message",T:Ld,opt:!0}]),Ud=s.makeMessageType("viam.app.v1.LogPatternConfig",()=>[{no:1,name:"pattern",kind:"scalar",T:9},{no:2,name:"level",kind:"scalar",T:9}]),qd=s.makeMessageType("viam.app.v1.JobConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"schedule",kind:"scalar",T:9},{no:3,name:"resource",kind:"scalar",T:9},{no:4,name:"method",kind:"scalar",T:9},{no:5,name:"command",kind:"message",T:p},{no:6,name:"log_configuration",kind:"message",T:Na}]),Ld=s.makeMessageType("viam.app.v1.TracingConfig",()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"disk",kind:"scalar",T:8},{no:3,name:"console",kind:"scalar",T:8},{no:4,name:"otlp_endpoint",kind:"scalar",T:9}]),Gd=s.makeMessageType("viam.app.v1.LocationSecret",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"secret",kind:"scalar",T:9}]),wa=s.makeMessageType("viam.app.v1.AppValidationStatus",()=>[{no:1,name:"error",kind:"scalar",T:9}]),Bd=s.makeMessageType("viam.app.v1.CloudConfig",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"fqdn",kind:"scalar",T:9},{no:3,name:"local_fqdn",kind:"scalar",T:9},{no:4,name:"managed_by",kind:"scalar",T:9},{no:5,name:"signaling_address",kind:"scalar",T:9},{no:6,name:"signaling_insecure",kind:"scalar",T:8},{no:7,name:"location_secret",kind:"scalar",T:9},{no:8,name:"secret",kind:"scalar",T:9},{no:9,name:"location_secrets",kind:"message",T:Gd,repeated:!0},{no:10,name:"primary_org_id",kind:"scalar",T:9},{no:11,name:"location_id",kind:"scalar",T:9},{no:12,name:"machine_id",kind:"scalar",T:9}]),eo=s.makeMessageType("viam.app.v1.ComponentConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"namespace",kind:"scalar",T:9},{no:3,name:"type",kind:"scalar",T:9},{no:4,name:"model",kind:"scalar",T:9},{no:5,name:"frame",kind:"message",T:no},{no:6,name:"depends_on",kind:"scalar",T:9,repeated:!0},{no:7,name:"service_configs",kind:"message",T:Ca,repeated:!0},{no:8,name:"attributes",kind:"message",T:p},{no:9,name:"api",kind:"scalar",T:9},{no:10,name:"log_configuration",kind:"message",T:Na}]),Ca=s.makeMessageType("viam.app.v1.ResourceLevelServiceConfig",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"attributes",kind:"message",T:p}]),Fd=s.makeMessageType("viam.app.v1.ProcessConfig",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"args",kind:"scalar",T:9,repeated:!0},{no:4,name:"cwd",kind:"scalar",T:9},{no:5,name:"one_shot",kind:"scalar",T:8},{no:6,name:"log",kind:"scalar",T:8},{no:7,name:"stop_signal",kind:"scalar",T:5},{no:8,name:"stop_timeout",kind:"message",T:B},{no:9,name:"env",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:10,name:"username",kind:"scalar",T:9}]),xd=s.makeMessageType("viam.app.v1.ServiceConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"namespace",kind:"scalar",T:9},{no:3,name:"type",kind:"scalar",T:9},{no:4,name:"attributes",kind:"message",T:p},{no:5,name:"depends_on",kind:"scalar",T:9,repeated:!0},{no:6,name:"model",kind:"scalar",T:9},{no:9,name:"api",kind:"scalar",T:9},{no:10,name:"service_configs",kind:"message",T:Ca,repeated:!0},{no:11,name:"log_configuration",kind:"message",T:Na}]),Jd=s.makeMessageType("viam.app.v1.NetworkConfig",()=>[{no:1,name:"fqdn",kind:"scalar",T:9},{no:2,name:"bind_address",kind:"scalar",T:9},{no:3,name:"tls_cert_file",kind:"scalar",T:9},{no:4,name:"tls_key_file",kind:"scalar",T:9},{no:5,name:"sessions",kind:"message",T:zd},{no:6,name:"traffic_tunnel_endpoints",kind:"message",T:Vd,repeated:!0},{no:7,name:"no_tls",kind:"scalar",T:8}]),zd=s.makeMessageType("viam.app.v1.SessionsConfig",()=>[{no:1,name:"heartbeat_window",kind:"message",T:B}]),Vd=s.makeMessageType("viam.app.v1.TrafficTunnelEndpoint",()=>[{no:1,name:"port",kind:"scalar",T:5},{no:2,name:"connection_timeout",kind:"message",T:B}]),$d=s.makeMessageType("viam.app.v1.AuthConfig",()=>[{no:1,name:"handlers",kind:"message",T:jd,repeated:!0},{no:2,name:"tls_auth_entities",kind:"scalar",T:9,repeated:!0},{no:3,name:"external_auth_config",kind:"message",T:Wd,opt:!0}]),Yd=s.makeMessageType("viam.app.v1.JWKSFile",()=>[{no:1,name:"json",kind:"message",T:p}]),Wd=s.makeMessageType("viam.app.v1.ExternalAuthConfig",()=>[{no:1,name:"jwks",kind:"message",T:Yd}]),jd=s.makeMessageType("viam.app.v1.AuthHandlerConfig",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(Zs)},{no:5,name:"config",kind:"message",T:p}]),no=s.makeMessageType("viam.app.v1.Frame",()=>[{no:1,name:"parent",kind:"scalar",T:9},{no:2,name:"translation",kind:"message",T:Hd},{no:3,name:"orientation",kind:"message",T:Kd},{no:4,name:"geometry",kind:"message",T:Qe}]),Na=s.makeMessageType("viam.app.v1.LogConfiguration",()=>[{no:1,name:"level",kind:"scalar",T:9}]),Hd=s.makeMessageType("viam.app.v1.Translation",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1}]),Kd=s.makeMessageType("viam.app.v1.Orientation",()=>[{no:1,name:"no_orientation",kind:"message",T:Xd,oneof:"type"},{no:2,name:"vector_radians",kind:"message",T:Qd,oneof:"type"},{no:3,name:"vector_degrees",kind:"message",T:Zd,oneof:"type"},{no:4,name:"euler_angles",kind:"message",T:el,oneof:"type"},{no:5,name:"axis_angles",kind:"message",T:nl,oneof:"type"},{no:6,name:"quaternion",kind:"message",T:al,oneof:"type"}]),Xd=s.makeMessageType("viam.app.v1.Orientation.NoOrientation",[],{localName:"Orientation_NoOrientation"}),Qd=s.makeMessageType("viam.app.v1.Orientation.OrientationVectorRadians",()=>[{no:1,name:"theta",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_OrientationVectorRadians"}),Zd=s.makeMessageType("viam.app.v1.Orientation.OrientationVectorDegrees",()=>[{no:1,name:"theta",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_OrientationVectorDegrees"}),el=s.makeMessageType("viam.app.v1.Orientation.EulerAngles",()=>[{no:1,name:"roll",kind:"scalar",T:1},{no:2,name:"pitch",kind:"scalar",T:1},{no:3,name:"yaw",kind:"scalar",T:1}],{localName:"Orientation_EulerAngles"}),nl=s.makeMessageType("viam.app.v1.Orientation.AxisAngles",()=>[{no:1,name:"theta",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_AxisAngles"}),al=s.makeMessageType("viam.app.v1.Orientation.Quaternion",()=>[{no:1,name:"w",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_Quaternion"}),tl=s.makeMessageType("viam.app.v1.RemoteConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"address",kind:"scalar",T:9},{no:3,name:"frame",kind:"message",T:no},{no:4,name:"auth",kind:"message",T:sl},{no:5,name:"managed_by",kind:"scalar",T:9},{no:6,name:"insecure",kind:"scalar",T:8},{no:7,name:"connection_check_interval",kind:"message",T:B},{no:8,name:"reconnect_interval",kind:"message",T:B},{no:9,name:"service_configs",kind:"message",T:Ca,repeated:!0},{no:10,name:"secret",kind:"scalar",T:9},{no:11,name:"prefix",kind:"scalar",T:9}]),sl=s.makeMessageType("viam.app.v1.RemoteAuth",()=>[{no:1,name:"credentials",kind:"message",T:ol},{no:2,name:"entity",kind:"scalar",T:9}]),ol=s.makeMessageType("viam.app.v1.RemoteAuth.Credentials",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(Zs)},{no:2,name:"payload",kind:"scalar",T:9}],{localName:"RemoteAuth_Credentials"}),il=s.makeMessageType("viam.app.v1.AgentInfo",()=>[{no:1,name:"host",kind:"scalar",T:9},{no:2,name:"os",kind:"scalar",T:9},{no:3,name:"ips",kind:"scalar",T:9,repeated:!0},{no:4,name:"version",kind:"scalar",T:9},{no:5,name:"git_revision",kind:"scalar",T:9},{no:6,name:"platform",kind:"scalar",T:9,opt:!0},{no:7,name:"platform_tags",kind:"scalar",T:9,repeated:!0}]),D_=s.makeMessageType("viam.app.v1.ConfigRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"agent_info",kind:"message",T:il,opt:!0}]),A_=s.makeMessageType("viam.app.v1.ConfigResponse",()=>[{no:1,name:"config",kind:"message",T:Ad}]),U_=s.makeMessageType("viam.app.v1.CertificateRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),q_=s.makeMessageType("viam.app.v1.CertificateResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"tls_certificate",kind:"scalar",T:9},{no:3,name:"tls_private_key",kind:"scalar",T:9}]),L_=s.makeMessageType("viam.app.v1.LogRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"logs",kind:"message",T:Pn,repeated:!0}]),G_=s.makeMessageType("viam.app.v1.LogResponse",[]),B_=s.makeMessageType("viam.app.v1.NeedsRestartRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),F_=s.makeMessageType("viam.app.v1.NeedsRestartResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"must_restart",kind:"scalar",T:8},{no:3,name:"restart_check_interval",kind:"message",T:B}]),rl=s.makeMessageType("viam.app.v1.ModuleConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"path",kind:"scalar",T:9},{no:3,name:"log_level",kind:"scalar",T:9},{no:4,name:"type",kind:"scalar",T:9},{no:5,name:"module_id",kind:"scalar",T:9},{no:6,name:"env",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:7,name:"status",kind:"message",T:wa},{no:8,name:"first_run_timeout",kind:"message",T:B},{no:9,name:"tcp_mode",kind:"scalar",T:8}]),ml=s.makeMessageType("viam.app.v1.PackageConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"package",kind:"scalar",T:9},{no:3,name:"version",kind:"scalar",T:9},{no:4,name:"type",kind:"scalar",T:9},{no:5,name:"status",kind:"message",T:wa}]),cl=s.makeMessageType("viam.app.v1.MaintenanceConfig",()=>[{no:1,name:"sensor_name",kind:"message",T:F},{no:2,name:"maintenance_allowed_key",kind:"scalar",T:9}]),x_=Object.freeze(Object.defineProperty({__proto__:null,AgentInfo:il,AppValidationStatus:wa,AuthConfig:$d,AuthHandlerConfig:jd,CertificateRequest:U_,CertificateResponse:q_,CloudConfig:Bd,ComponentConfig:eo,ConfigRequest:D_,ConfigResponse:A_,CredentialsType:Zs,ExternalAuthConfig:Wd,Frame:no,JWKSFile:Yd,JobConfig:qd,LocationSecret:Gd,LogConfiguration:Na,LogPatternConfig:Ud,LogRequest:L_,LogResponse:G_,MaintenanceConfig:cl,ModuleConfig:rl,NeedsRestartRequest:B_,NeedsRestartResponse:F_,NetworkConfig:Jd,Orientation:Kd,Orientation_AxisAngles:nl,Orientation_EulerAngles:el,Orientation_NoOrientation:Xd,Orientation_OrientationVectorDegrees:Zd,Orientation_OrientationVectorRadians:Qd,Orientation_Quaternion:al,PackageConfig:ml,ProcessConfig:Fd,RemoteAuth:sl,RemoteAuth_Credentials:ol,RemoteConfig:tl,ResourceLevelServiceConfig:Ca,RobotConfig:Ad,ServiceConfig:xd,SessionsConfig:zd,TracingConfig:Ld,TrafficTunnelEndpoint:Vd,Translation:Hd},Symbol.toStringTag,{value:"Module"})),ao=s.makeMessageType("viam.service.discovery.v1.DiscoverResourcesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),dl=s.makeMessageType("viam.service.discovery.v1.DiscoverResourcesResponse",()=>[{no:1,name:"discoveries",kind:"message",T:eo,repeated:!0}]),J_=Object.freeze(Object.defineProperty({__proto__:null,DiscoverResourcesRequest:ao,DiscoverResourcesResponse:dl},Symbol.toStringTag,{value:"Module"})),ll={typeName:"viam.service.discovery.v1.DiscoveryService",methods:{discoverResources:{name:"DiscoverResources",I:ao,O:dl,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}},pl=s.makeEnum("viam.service.motion.v1.PlanState",[{no:0,name:"PLAN_STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PLAN_STATE_IN_PROGRESS",localName:"IN_PROGRESS"},{no:2,name:"PLAN_STATE_STOPPED",localName:"STOPPED"},{no:3,name:"PLAN_STATE_SUCCEEDED",localName:"SUCCEEDED"},{no:4,name:"PLAN_STATE_FAILED",localName:"FAILED"}]),to=s.makeMessageType("viam.service.motion.v1.MoveRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"destination",kind:"message",T:Ve},{no:3,name:"component_name_deprecated",kind:"message",T:F},{no:4,name:"world_state",kind:"message",T:Fr,opt:!0},{no:5,name:"constraints",kind:"message",T:Rl,opt:!0},{no:6,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),ul=s.makeMessageType("viam.service.motion.v1.MoveResponse",()=>[{no:1,name:"success",kind:"scalar",T:8}]),so=s.makeMessageType("viam.service.motion.v1.MoveOnMapRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"destination",kind:"message",T:Ue},{no:3,name:"component_name_deprecated",kind:"message",T:F},{no:4,name:"slam_service_name_deprecated",kind:"message",T:F},{no:5,name:"motion_configuration",kind:"message",T:oo,opt:!0},{no:6,name:"obstacles",kind:"message",T:Qe,repeated:!0},{no:7,name:"component_name",kind:"scalar",T:9},{no:8,name:"slam_service_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),gl=s.makeMessageType("viam.service.motion.v1.MoveOnMapResponse",()=>[{no:1,name:"execution_id",kind:"scalar",T:9}]),Tl=s.makeMessageType("viam.service.motion.v1.ObstacleDetector",()=>[{no:1,name:"vision_service_deprecated",kind:"message",T:F},{no:2,name:"camera_deprecated",kind:"message",T:F},{no:3,name:"vision_service",kind:"scalar",T:9},{no:4,name:"camera",kind:"scalar",T:9}]),oo=s.makeMessageType("viam.service.motion.v1.MotionConfiguration",()=>[{no:1,name:"obstacle_detectors",kind:"message",T:Tl,repeated:!0},{no:2,name:"position_polling_frequency_hz",kind:"scalar",T:1,opt:!0},{no:3,name:"obstacle_polling_frequency_hz",kind:"scalar",T:1,opt:!0},{no:4,name:"plan_deviation_m",kind:"scalar",T:1,opt:!0},{no:5,name:"linear_m_per_sec",kind:"scalar",T:1,opt:!0},{no:6,name:"angular_degs_per_sec",kind:"scalar",T:1,opt:!0}]),io=s.makeMessageType("viam.service.motion.v1.MoveOnGlobeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"destination",kind:"message",T:$e},{no:3,name:"heading",kind:"scalar",T:1,opt:!0},{no:4,name:"component_name_deprecated",kind:"message",T:F},{no:5,name:"movement_sensor_name_deprecated",kind:"message",T:F},{no:6,name:"obstacles",kind:"message",T:Ea,repeated:!0},{no:7,name:"motion_configuration",kind:"message",T:oo,opt:!0},{no:8,name:"bounding_regions",kind:"message",T:Ea,repeated:!0},{no:9,name:"component_name",kind:"scalar",T:9},{no:10,name:"movement_sensor_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),kl=s.makeMessageType("viam.service.motion.v1.MoveOnGlobeResponse",()=>[{no:1,name:"execution_id",kind:"scalar",T:9}]),ro=s.makeMessageType("viam.service.motion.v1.GetPoseRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:F},{no:3,name:"destination_frame",kind:"scalar",T:9},{no:4,name:"supplemental_transforms",kind:"message",T:Le,repeated:!0},{no:5,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),yl=s.makeMessageType("viam.service.motion.v1.GetPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:Ve}]),mo=s.makeMessageType("viam.service.motion.v1.StopPlanRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:F},{no:3,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),vl=s.makeMessageType("viam.service.motion.v1.StopPlanResponse",[]),co=s.makeMessageType("viam.service.motion.v1.ListPlanStatusesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"only_active_plans",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),hl=s.makeMessageType("viam.service.motion.v1.ListPlanStatusesResponse",()=>[{no:1,name:"plan_statuses_with_ids",kind:"message",T:bl,repeated:!0}]),lo=s.makeMessageType("viam.service.motion.v1.GetPlanRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:F},{no:3,name:"last_plan_only",kind:"scalar",T:8},{no:4,name:"execution_id",kind:"scalar",T:9,opt:!0},{no:5,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),fl=s.makeMessageType("viam.service.motion.v1.GetPlanResponse",()=>[{no:1,name:"current_plan_with_status",kind:"message",T:po},{no:2,name:"replan_history",kind:"message",T:po,repeated:!0}]),Rl=s.makeMessageType("viam.service.motion.v1.Constraints",()=>[{no:1,name:"linear_constraint",kind:"message",T:_l,repeated:!0},{no:2,name:"orientation_constraint",kind:"message",T:Il,repeated:!0},{no:3,name:"collision_specification",kind:"message",T:El,repeated:!0},{no:4,name:"pseudolinear_constraint",kind:"message",T:Sl,repeated:!0}]),_l=s.makeMessageType("viam.service.motion.v1.LinearConstraint",()=>[{no:1,name:"line_tolerance_mm",kind:"scalar",T:2,opt:!0},{no:2,name:"orientation_tolerance_degs",kind:"scalar",T:2,opt:!0}]),Sl=s.makeMessageType("viam.service.motion.v1.PseudolinearConstraint",()=>[{no:1,name:"line_tolerance_factor",kind:"scalar",T:2,opt:!0},{no:2,name:"orientation_tolerance_factor",kind:"scalar",T:2,opt:!0}]),Il=s.makeMessageType("viam.service.motion.v1.OrientationConstraint",()=>[{no:1,name:"orientation_tolerance_degs",kind:"scalar",T:2,opt:!0}]),El=s.makeMessageType("viam.service.motion.v1.CollisionSpecification",()=>[{no:1,name:"allows",kind:"message",T:Ml,repeated:!0}]),Ml=s.makeMessageType("viam.service.motion.v1.CollisionSpecification.AllowedFrameCollisions",()=>[{no:1,name:"frame1",kind:"scalar",T:9},{no:2,name:"frame2",kind:"scalar",T:9}],{localName:"CollisionSpecification_AllowedFrameCollisions"}),po=s.makeMessageType("viam.service.motion.v1.PlanWithStatus",()=>[{no:1,name:"plan",kind:"message",T:Ol},{no:2,name:"status",kind:"message",T:Pa},{no:3,name:"status_history",kind:"message",T:Pa,repeated:!0}]),bl=s.makeMessageType("viam.service.motion.v1.PlanStatusWithID",()=>[{no:1,name:"plan_id",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:F},{no:3,name:"execution_id",kind:"scalar",T:9},{no:4,name:"status",kind:"message",T:Pa},{no:5,name:"component_name",kind:"scalar",T:9}]),Pa=s.makeMessageType("viam.service.motion.v1.PlanStatus",()=>[{no:1,name:"state",kind:"enum",T:s.getEnumType(pl)},{no:2,name:"timestamp",kind:"message",T:S},{no:3,name:"reason",kind:"scalar",T:9,opt:!0}]),Ol=s.makeMessageType("viam.service.motion.v1.Plan",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:F},{no:3,name:"execution_id",kind:"scalar",T:9},{no:4,name:"steps",kind:"message",T:wl,repeated:!0},{no:5,name:"component_name",kind:"scalar",T:9}]),wl=s.makeMessageType("viam.service.motion.v1.PlanStep",()=>[{no:1,name:"step",kind:"map",K:9,V:{kind:"message",T:Cl}}]),Cl=s.makeMessageType("viam.service.motion.v1.ComponentState",()=>[{no:1,name:"pose",kind:"message",T:Ue}]),Nl=Object.freeze(Object.defineProperty({__proto__:null,CollisionSpecification:El,CollisionSpecification_AllowedFrameCollisions:Ml,ComponentState:Cl,Constraints:Rl,GetPlanRequest:lo,GetPlanResponse:fl,GetPoseRequest:ro,GetPoseResponse:yl,LinearConstraint:_l,ListPlanStatusesRequest:co,ListPlanStatusesResponse:hl,MotionConfiguration:oo,MoveOnGlobeRequest:io,MoveOnGlobeResponse:kl,MoveOnMapRequest:so,MoveOnMapResponse:gl,MoveRequest:to,MoveResponse:ul,ObstacleDetector:Tl,OrientationConstraint:Il,Plan:Ol,PlanState:pl,PlanStatus:Pa,PlanStatusWithID:bl,PlanStep:wl,PlanWithStatus:po,PseudolinearConstraint:Sl,StopPlanRequest:mo,StopPlanResponse:vl},Symbol.toStringTag,{value:"Module"})),Pl={typeName:"viam.service.motion.v1.MotionService",methods:{move:{name:"Move",I:to,O:ul,kind:m.Unary},moveOnMap:{name:"MoveOnMap",I:so,O:gl,kind:m.Unary},moveOnGlobe:{name:"MoveOnGlobe",I:io,O:kl,kind:m.Unary},getPose:{name:"GetPose",I:ro,O:yl,kind:m.Unary},stopPlan:{name:"StopPlan",I:mo,O:vl,kind:m.Unary},listPlanStatuses:{name:"ListPlanStatuses",I:co,O:hl,kind:m.Unary},getPlan:{name:"GetPlan",I:lo,O:fl,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}},Dl=s.makeEnum("viam.service.navigation.v1.MapType",[{no:0,name:"MAP_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MAP_TYPE_NONE",localName:"NONE"},{no:2,name:"MAP_TYPE_GPS",localName:"GPS"}]),uo=s.makeEnum("viam.service.navigation.v1.Mode",[{no:0,name:"MODE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODE_MANUAL",localName:"MANUAL"},{no:2,name:"MODE_WAYPOINT",localName:"WAYPOINT"},{no:3,name:"MODE_EXPLORE",localName:"EXPLORE"}]),go=s.makeMessageType("viam.service.navigation.v1.GetModeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Al=s.makeMessageType("viam.service.navigation.v1.GetModeResponse",()=>[{no:1,name:"mode",kind:"enum",T:s.getEnumType(uo)}]),To=s.makeMessageType("viam.service.navigation.v1.SetModeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"mode",kind:"enum",T:s.getEnumType(uo)},{no:99,name:"extra",kind:"message",T:p}]),Ul=s.makeMessageType("viam.service.navigation.v1.SetModeResponse",[]),ql=s.makeMessageType("viam.service.navigation.v1.Waypoint",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"location",kind:"message",T:$e}]),ko=s.makeMessageType("viam.service.navigation.v1.GetLocationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ll=s.makeMessageType("viam.service.navigation.v1.GetLocationResponse",()=>[{no:1,name:"location",kind:"message",T:$e},{no:2,name:"compass_heading",kind:"scalar",T:1}]),yo=s.makeMessageType("viam.service.navigation.v1.GetWaypointsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Gl=s.makeMessageType("viam.service.navigation.v1.GetWaypointsResponse",()=>[{no:1,name:"waypoints",kind:"message",T:ql,repeated:!0}]),vo=s.makeMessageType("viam.service.navigation.v1.AddWaypointRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"location",kind:"message",T:$e},{no:99,name:"extra",kind:"message",T:p}]),Bl=s.makeMessageType("viam.service.navigation.v1.AddWaypointResponse",[]),ho=s.makeMessageType("viam.service.navigation.v1.RemoveWaypointRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"id",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Fl=s.makeMessageType("viam.service.navigation.v1.RemoveWaypointResponse",[]),fo=s.makeMessageType("viam.service.navigation.v1.GetObstaclesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),xl=s.makeMessageType("viam.service.navigation.v1.GetObstaclesResponse",()=>[{no:1,name:"obstacles",kind:"message",T:Ea,repeated:!0}]),Jl=s.makeMessageType("viam.service.navigation.v1.Path",()=>[{no:1,name:"destination_waypoint_id",kind:"scalar",T:9},{no:2,name:"geopoints",kind:"message",T:$e,repeated:!0}]),Ro=s.makeMessageType("viam.service.navigation.v1.GetPathsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),zl=s.makeMessageType("viam.service.navigation.v1.GetPathsResponse",()=>[{no:1,name:"paths",kind:"message",T:Jl,repeated:!0}]),_o=s.makeMessageType("viam.service.navigation.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Vl=s.makeMessageType("viam.service.navigation.v1.GetPropertiesResponse",()=>[{no:1,name:"map_type",kind:"enum",T:s.getEnumType(Dl)}]),$l=Object.freeze(Object.defineProperty({__proto__:null,AddWaypointRequest:vo,AddWaypointResponse:Bl,GetLocationRequest:ko,GetLocationResponse:Ll,GetModeRequest:go,GetModeResponse:Al,GetObstaclesRequest:fo,GetObstaclesResponse:xl,GetPathsRequest:Ro,GetPathsResponse:zl,GetPropertiesRequest:_o,GetPropertiesResponse:Vl,GetWaypointsRequest:yo,GetWaypointsResponse:Gl,MapType:Dl,Mode:uo,Path:Jl,RemoveWaypointRequest:ho,RemoveWaypointResponse:Fl,SetModeRequest:To,SetModeResponse:Ul,Waypoint:ql},Symbol.toStringTag,{value:"Module"})),Yl={typeName:"viam.service.navigation.v1.NavigationService",methods:{getMode:{name:"GetMode",I:go,O:Al,kind:m.Unary},setMode:{name:"SetMode",I:To,O:Ul,kind:m.Unary},getLocation:{name:"GetLocation",I:ko,O:Ll,kind:m.Unary},getWaypoints:{name:"GetWaypoints",I:yo,O:Gl,kind:m.Unary},addWaypoint:{name:"AddWaypoint",I:vo,O:Bl,kind:m.Unary},removeWaypoint:{name:"RemoveWaypoint",I:ho,O:Fl,kind:m.Unary},getObstacles:{name:"GetObstacles",I:fo,O:xl,kind:m.Unary},getPaths:{name:"GetPaths",I:Ro,O:zl,kind:m.Unary},getProperties:{name:"GetProperties",I:_o,O:Vl,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}},Wl=s.makeEnum("viam.service.slam.v1.MappingMode",[{no:0,name:"MAPPING_MODE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MAPPING_MODE_CREATE_NEW_MAP",localName:"CREATE_NEW_MAP"},{no:2,name:"MAPPING_MODE_LOCALIZE_ONLY",localName:"LOCALIZE_ONLY"},{no:3,name:"MAPPING_MODE_UPDATE_EXISTING_MAP",localName:"UPDATE_EXISTING_MAP"}]),jl=s.makeEnum("viam.service.slam.v1.SensorType",[{no:0,name:"SENSOR_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"SENSOR_TYPE_CAMERA",localName:"CAMERA"},{no:2,name:"SENSOR_TYPE_MOVEMENT_SENSOR",localName:"MOVEMENT_SENSOR"}]),So=s.makeMessageType("viam.service.slam.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Hl=s.makeMessageType("viam.service.slam.v1.GetPositionResponse",()=>[{no:1,name:"pose",kind:"message",T:Ue}]),Io=s.makeMessageType("viam.service.slam.v1.GetPointCloudMapRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"return_edited_map",kind:"scalar",T:8,opt:!0}]),Kl=s.makeMessageType("viam.service.slam.v1.GetPointCloudMapResponse",()=>[{no:1,name:"point_cloud_pcd_chunk",kind:"scalar",T:12}]),Eo=s.makeMessageType("viam.service.slam.v1.GetInternalStateRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Xl=s.makeMessageType("viam.service.slam.v1.GetInternalStateResponse",()=>[{no:1,name:"internal_state_chunk",kind:"scalar",T:12}]),Mo=s.makeMessageType("viam.service.slam.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Ql=s.makeMessageType("viam.service.slam.v1.GetPropertiesResponse",()=>[{no:1,name:"cloud_slam",kind:"scalar",T:8},{no:2,name:"mapping_mode",kind:"enum",T:s.getEnumType(Wl)},{no:3,name:"internal_state_file_type",kind:"scalar",T:9,opt:!0},{no:4,name:"sensor_info",kind:"message",T:Zl,repeated:!0}]),Zl=s.makeMessageType("viam.service.slam.v1.SensorInfo",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:s.getEnumType(jl)}]),ep=Object.freeze(Object.defineProperty({__proto__:null,GetInternalStateRequest:Eo,GetInternalStateResponse:Xl,GetPointCloudMapRequest:Io,GetPointCloudMapResponse:Kl,GetPositionRequest:So,GetPositionResponse:Hl,GetPropertiesRequest:Mo,GetPropertiesResponse:Ql,MappingMode:Wl,SensorInfo:Zl,SensorType:jl},Symbol.toStringTag,{value:"Module"})),np={typeName:"viam.service.slam.v1.SLAMService",methods:{getPosition:{name:"GetPosition",I:So,O:Hl,kind:m.Unary},getPointCloudMap:{name:"GetPointCloudMap",I:Io,O:Kl,kind:m.ServerStreaming},getInternalState:{name:"GetInternalState",I:Eo,O:Xl,kind:m.ServerStreaming},getProperties:{name:"GetProperties",I:Mo,O:Ql,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}},ap=s.makeEnum("viam.app.data.v1.Order",[{no:0,name:"ORDER_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"ORDER_DESCENDING",localName:"DESCENDING"},{no:2,name:"ORDER_ASCENDING",localName:"ASCENDING"}]),tp=s.makeEnum("viam.app.data.v1.TagsFilterType",[{no:0,name:"TAGS_FILTER_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TAGS_FILTER_TYPE_MATCH_BY_OR",localName:"MATCH_BY_OR"},{no:2,name:"TAGS_FILTER_TYPE_TAGGED",localName:"TAGGED"},{no:3,name:"TAGS_FILTER_TYPE_UNTAGGED",localName:"UNTAGGED"}]),en=s.makeEnum("viam.app.data.v1.TabularDataSourceType",[{no:0,name:"TABULAR_DATA_SOURCE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TABULAR_DATA_SOURCE_TYPE_STANDARD",localName:"STANDARD"},{no:2,name:"TABULAR_DATA_SOURCE_TYPE_HOT_STORAGE",localName:"HOT_STORAGE"},{no:3,name:"TABULAR_DATA_SOURCE_TYPE_PIPELINE_SINK",localName:"PIPELINE_SINK"}]),Ln=s.makeEnum("viam.app.data.v1.IndexableCollection",[{no:0,name:"INDEXABLE_COLLECTION_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"INDEXABLE_COLLECTION_HOT_STORE",localName:"HOT_STORE"},{no:2,name:"INDEXABLE_COLLECTION_PIPELINE_SINK",localName:"PIPELINE_SINK"}]),sp=s.makeEnum("viam.app.data.v1.IndexCreator",[{no:0,name:"INDEX_CREATOR_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"INDEX_CREATOR_VIAM",localName:"VIAM"},{no:2,name:"INDEX_CREATOR_CUSTOMER",localName:"CUSTOMER"}]),bo=s.makeMessageType("viam.app.data.v1.DataRequest",()=>[{no:1,name:"filter",kind:"message",T:Ye},{no:2,name:"limit",kind:"scalar",T:4},{no:3,name:"last",kind:"scalar",T:9},{no:4,name:"sort_order",kind:"enum",T:s.getEnumType(ap)}]),Ye=s.makeMessageType("viam.app.data.v1.Filter",()=>[{no:1,name:"component_name",kind:"scalar",T:9},{no:2,name:"component_type",kind:"scalar",T:9},{no:4,name:"method",kind:"scalar",T:9},{no:6,name:"robot_name",kind:"scalar",T:9},{no:7,name:"robot_id",kind:"scalar",T:9},{no:8,name:"part_name",kind:"scalar",T:9},{no:9,name:"part_id",kind:"scalar",T:9},{no:10,name:"location_ids",kind:"scalar",T:9,repeated:!0},{no:11,name:"organization_ids",kind:"scalar",T:9,repeated:!0},{no:12,name:"mime_type",kind:"scalar",T:9,repeated:!0},{no:13,name:"interval",kind:"message",T:Gn},{no:14,name:"tags_filter",kind:"message",T:Oo},{no:15,name:"bbox_labels",kind:"scalar",T:9,repeated:!0},{no:16,name:"dataset_id",kind:"scalar",T:9}]),Oo=s.makeMessageType("viam.app.data.v1.TagsFilter",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(tp)},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Da=s.makeMessageType("viam.app.data.v1.CaptureMetadata",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9},{no:3,name:"robot_name",kind:"scalar",T:9},{no:4,name:"robot_id",kind:"scalar",T:9},{no:5,name:"part_name",kind:"scalar",T:9},{no:6,name:"part_id",kind:"scalar",T:9},{no:7,name:"component_type",kind:"scalar",T:9},{no:9,name:"component_name",kind:"scalar",T:9},{no:10,name:"method_name",kind:"scalar",T:9},{no:11,name:"method_parameters",kind:"map",K:9,V:{kind:"message",T:K}},{no:12,name:"tags",kind:"scalar",T:9,repeated:!0},{no:13,name:"mime_type",kind:"scalar",T:9}]),Gn=s.makeMessageType("viam.app.data.v1.CaptureInterval",()=>[{no:1,name:"start",kind:"message",T:S},{no:2,name:"end",kind:"message",T:S}]),op=s.makeMessageType("viam.app.data.v1.TabularDataByFilterRequest",()=>[{no:1,name:"data_request",kind:"message",T:bo},{no:2,name:"count_only",kind:"scalar",T:8},{no:3,name:"include_internal_data",kind:"scalar",T:8}]),ip=s.makeMessageType("viam.app.data.v1.TabularDataByFilterResponse",()=>[{no:1,name:"metadata",kind:"message",T:Da,repeated:!0},{no:2,name:"data",kind:"message",T:rp,repeated:!0},{no:3,name:"count",kind:"scalar",T:4},{no:4,name:"last",kind:"scalar",T:9},{no:5,name:"total_size_bytes",kind:"scalar",T:4}]),rp=s.makeMessageType("viam.app.data.v1.TabularData",()=>[{no:1,name:"data",kind:"message",T:p},{no:2,name:"metadata_index",kind:"scalar",T:13},{no:3,name:"time_requested",kind:"message",T:S},{no:4,name:"time_received",kind:"message",T:S}]),mp=s.makeMessageType("viam.app.data.v1.TabularDataBySQLRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"sql_query",kind:"scalar",T:9}]),cp=s.makeMessageType("viam.app.data.v1.TabularDataBySQLResponse",()=>[{no:2,name:"raw_data",kind:"scalar",T:12,repeated:!0}]),wo=s.makeMessageType("viam.app.data.v1.TabularDataSource",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(en)},{no:2,name:"pipeline_id",kind:"scalar",T:9,opt:!0}]),dp=s.makeMessageType("viam.app.data.v1.TabularDataByMQLRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:4,name:"use_recent_data",kind:"scalar",T:8,opt:!0},{no:6,name:"data_source",kind:"message",T:wo,opt:!0},{no:7,name:"query_prefix_name",kind:"scalar",T:9,opt:!0}]),lp=s.makeMessageType("viam.app.data.v1.TabularDataByMQLResponse",()=>[{no:2,name:"raw_data",kind:"scalar",T:12,repeated:!0}]),pp=s.makeMessageType("viam.app.data.v1.ExportTabularDataRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"resource_subtype",kind:"scalar",T:9},{no:4,name:"method_name",kind:"scalar",T:9},{no:5,name:"interval",kind:"message",T:Gn},{no:6,name:"additional_parameters",kind:"message",T:p,opt:!0}]),up=s.makeMessageType("viam.app.data.v1.ExportTabularDataResponse",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"resource_subtype",kind:"scalar",T:9},{no:4,name:"method_name",kind:"scalar",T:9},{no:5,name:"time_captured",kind:"message",T:S},{no:6,name:"organization_id",kind:"scalar",T:9},{no:7,name:"location_id",kind:"scalar",T:9},{no:8,name:"robot_name",kind:"scalar",T:9},{no:9,name:"robot_id",kind:"scalar",T:9},{no:10,name:"part_name",kind:"scalar",T:9},{no:11,name:"method_parameters",kind:"message",T:p},{no:12,name:"tags",kind:"scalar",T:9,repeated:!0},{no:13,name:"payload",kind:"message",T:p}]),gp=s.makeMessageType("viam.app.data.v1.GetLatestTabularDataRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"method_name",kind:"scalar",T:9},{no:4,name:"resource_subtype",kind:"scalar",T:9},{no:5,name:"additional_parameters",kind:"message",T:p,opt:!0}]),Tp=s.makeMessageType("viam.app.data.v1.GetLatestTabularDataResponse",()=>[{no:1,name:"time_captured",kind:"message",T:S},{no:2,name:"time_synced",kind:"message",T:S},{no:3,name:"payload",kind:"message",T:p}]),Co=s.makeMessageType("viam.app.data.v1.BinaryData",()=>[{no:1,name:"binary",kind:"scalar",T:12},{no:2,name:"metadata",kind:"message",T:_p}]),kp=s.makeMessageType("viam.app.data.v1.BinaryDataByFilterRequest",()=>[{no:1,name:"data_request",kind:"message",T:bo},{no:2,name:"include_binary",kind:"scalar",T:8},{no:3,name:"count_only",kind:"scalar",T:8},{no:4,name:"include_internal_data",kind:"scalar",T:8}]),yp=s.makeMessageType("viam.app.data.v1.BinaryDataByFilterResponse",()=>[{no:1,name:"data",kind:"message",T:Co,repeated:!0},{no:2,name:"count",kind:"scalar",T:4},{no:3,name:"last",kind:"scalar",T:9},{no:4,name:"total_size_bytes",kind:"scalar",T:4}]),de=s.makeMessageType("viam.app.data.v1.BinaryID",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"location_id",kind:"scalar",T:9}]),vp=s.makeMessageType("viam.app.data.v1.BinaryDataByIDsRequest",()=>[{no:2,name:"include_binary",kind:"scalar",T:8},{no:3,name:"binary_ids",kind:"message",T:de,repeated:!0},{no:4,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0}]),hp=s.makeMessageType("viam.app.data.v1.BinaryDataByIDsResponse",()=>[{no:1,name:"data",kind:"message",T:Co,repeated:!0},{no:2,name:"count",kind:"scalar",T:4}]),fp=s.makeMessageType("viam.app.data.v1.BoundingBox",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"label",kind:"scalar",T:9},{no:3,name:"x_min_normalized",kind:"scalar",T:1},{no:4,name:"y_min_normalized",kind:"scalar",T:1},{no:5,name:"x_max_normalized",kind:"scalar",T:1},{no:6,name:"y_max_normalized",kind:"scalar",T:1},{no:7,name:"confidence",kind:"scalar",T:1,opt:!0}]),Rp=s.makeMessageType("viam.app.data.v1.Classification",()=>[{no:3,name:"id",kind:"scalar",T:9},{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"confidence",kind:"scalar",T:1,opt:!0}]),Aa=s.makeMessageType("viam.app.data.v1.Annotations",()=>[{no:1,name:"bboxes",kind:"message",T:fp,repeated:!0},{no:2,name:"classifications",kind:"message",T:Rp,repeated:!0}]),_p=s.makeMessageType("viam.app.data.v1.BinaryMetadata",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"capture_metadata",kind:"message",T:Da},{no:3,name:"time_requested",kind:"message",T:S},{no:4,name:"time_received",kind:"message",T:S},{no:5,name:"file_name",kind:"scalar",T:9},{no:6,name:"file_ext",kind:"scalar",T:9},{no:7,name:"uri",kind:"scalar",T:9},{no:8,name:"annotations",kind:"message",T:Aa},{no:9,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:10,name:"binary_data_id",kind:"scalar",T:9}]),Sp=s.makeMessageType("viam.app.data.v1.DeleteTabularDataRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"delete_older_than_days",kind:"scalar",T:13}]),Ip=s.makeMessageType("viam.app.data.v1.DeleteTabularDataResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Ep=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ye},{no:2,name:"include_internal_data",kind:"scalar",T:8}]),Mp=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByFilterResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),bp=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByIDsRequest",()=>[{no:2,name:"binary_ids",kind:"message",T:de,repeated:!0},{no:3,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0}]),Op=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByIDsResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),wp=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByIDsRequest",()=>[{no:3,name:"binary_ids",kind:"message",T:de,repeated:!0},{no:4,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Cp=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByIDsResponse",[]),Np=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ye},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Pp=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByFilterResponse",[]),Dp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByIDsRequest",()=>[{no:3,name:"binary_ids",kind:"message",T:de,repeated:!0},{no:4,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Ap=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByIDsResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Up=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ye},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),qp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByFilterResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Lp=s.makeMessageType("viam.app.data.v1.TagsByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ye}]),Gp=s.makeMessageType("viam.app.data.v1.TagsByFilterResponse",()=>[{no:1,name:"tags",kind:"scalar",T:9,repeated:!0}]),Bp=s.makeMessageType("viam.app.data.v1.AddBoundingBoxToImageByIDRequest",()=>[{no:7,name:"binary_id",kind:"message",T:de},{no:8,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"label",kind:"scalar",T:9},{no:3,name:"x_min_normalized",kind:"scalar",T:1},{no:4,name:"y_min_normalized",kind:"scalar",T:1},{no:5,name:"x_max_normalized",kind:"scalar",T:1},{no:6,name:"y_max_normalized",kind:"scalar",T:1},{no:9,name:"confidence",kind:"scalar",T:1,opt:!0}]),Fp=s.makeMessageType("viam.app.data.v1.AddBoundingBoxToImageByIDResponse",()=>[{no:1,name:"bbox_id",kind:"scalar",T:9}]),xp=s.makeMessageType("viam.app.data.v1.RemoveBoundingBoxFromImageByIDRequest",()=>[{no:3,name:"binary_id",kind:"message",T:de},{no:4,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"bbox_id",kind:"scalar",T:9}]),Jp=s.makeMessageType("viam.app.data.v1.RemoveBoundingBoxFromImageByIDResponse",[]),zp=s.makeMessageType("viam.app.data.v1.UpdateBoundingBoxRequest",()=>[{no:1,name:"binary_id",kind:"message",T:de},{no:8,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"bbox_id",kind:"scalar",T:9},{no:3,name:"label",kind:"scalar",T:9,opt:!0},{no:4,name:"x_min_normalized",kind:"scalar",T:1,opt:!0},{no:5,name:"y_min_normalized",kind:"scalar",T:1,opt:!0},{no:6,name:"x_max_normalized",kind:"scalar",T:1,opt:!0},{no:7,name:"y_max_normalized",kind:"scalar",T:1,opt:!0},{no:9,name:"confidence",kind:"scalar",T:1,opt:!0}]),Vp=s.makeMessageType("viam.app.data.v1.UpdateBoundingBoxResponse",[]),$p=s.makeMessageType("viam.app.data.v1.BoundingBoxLabelsByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ye}]),Yp=s.makeMessageType("viam.app.data.v1.BoundingBoxLabelsByFilterResponse",()=>[{no:1,name:"labels",kind:"scalar",T:9,repeated:!0}]),Wp=s.makeMessageType("viam.app.data.v1.ConfigureDatabaseUserRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"password",kind:"scalar",T:9}]),jp=s.makeMessageType("viam.app.data.v1.ConfigureDatabaseUserResponse",[]),Hp=s.makeMessageType("viam.app.data.v1.GetDatabaseConnectionRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),Kp=s.makeMessageType("viam.app.data.v1.GetDatabaseConnectionResponse",()=>[{no:1,name:"hostname",kind:"scalar",T:9},{no:2,name:"mongodb_uri",kind:"scalar",T:9},{no:3,name:"has_database_user",kind:"scalar",T:8}]),Xp=s.makeMessageType("viam.app.data.v1.AddBinaryDataToDatasetByIDsRequest",()=>[{no:1,name:"binary_ids",kind:"message",T:de,repeated:!0},{no:3,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"dataset_id",kind:"scalar",T:9}]),Qp=s.makeMessageType("viam.app.data.v1.AddBinaryDataToDatasetByIDsResponse",[]),Zp=s.makeMessageType("viam.app.data.v1.RemoveBinaryDataFromDatasetByIDsRequest",()=>[{no:1,name:"binary_ids",kind:"message",T:de,repeated:!0},{no:3,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"dataset_id",kind:"scalar",T:9}]),eu=s.makeMessageType("viam.app.data.v1.RemoveBinaryDataFromDatasetByIDsResponse",[]),nu=s.makeMessageType("viam.app.data.v1.CreateIndexRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"collection_type",kind:"enum",T:s.getEnumType(Ln)},{no:3,name:"pipeline_name",kind:"scalar",T:9,opt:!0},{no:4,name:"index_spec",kind:"scalar",T:12,repeated:!0}]),au=s.makeMessageType("viam.app.data.v1.CreateIndexResponse",[]),tu=s.makeMessageType("viam.app.data.v1.DeleteIndexRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"collection_type",kind:"enum",T:s.getEnumType(Ln)},{no:3,name:"pipeline_name",kind:"scalar",T:9,opt:!0},{no:4,name:"index_name",kind:"scalar",T:9}]),su=s.makeMessageType("viam.app.data.v1.DeleteIndexResponse",[]),ou=s.makeMessageType("viam.app.data.v1.ListIndexesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"collection_type",kind:"enum",T:s.getEnumType(Ln)},{no:3,name:"pipeline_name",kind:"scalar",T:9,opt:!0}]),iu=s.makeMessageType("viam.app.data.v1.ListIndexesResponse",()=>[{no:1,name:"indexes",kind:"message",T:ru,repeated:!0}]),ru=s.makeMessageType("viam.app.data.v1.Index",()=>[{no:1,name:"collection_type",kind:"enum",T:s.getEnumType(Ln)},{no:2,name:"pipeline_name",kind:"scalar",T:9,opt:!0},{no:3,name:"index_name",kind:"scalar",T:9},{no:4,name:"index_spec",kind:"scalar",T:12,repeated:!0},{no:5,name:"created_by",kind:"enum",T:s.getEnumType(sp)}]),mu=s.makeMessageType("viam.app.data.v1.CreateSavedQueryRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0}]),cu=s.makeMessageType("viam.app.data.v1.CreateSavedQueryResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),No=s.makeMessageType("viam.app.data.v1.Query",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:5,name:"created_on",kind:"message",T:S},{no:6,name:"updated_at",kind:"message",T:S}]),du=s.makeMessageType("viam.app.data.v1.DeleteSavedQueryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),lu=s.makeMessageType("viam.app.data.v1.DeleteSavedQueryResponse",[]),pu=s.makeMessageType("viam.app.data.v1.GetSavedQueryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),uu=s.makeMessageType("viam.app.data.v1.GetSavedQueryResponse",()=>[{no:1,name:"saved_query",kind:"message",T:No}]),gu=s.makeMessageType("viam.app.data.v1.UpdateSavedQueryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0}]),Tu=s.makeMessageType("viam.app.data.v1.UpdateSavedQueryResponse",[]),ku=s.makeMessageType("viam.app.data.v1.ListSavedQueriesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"limit",kind:"scalar",T:3}]),yu=s.makeMessageType("viam.app.data.v1.ListSavedQueriesResponse",()=>[{no:1,name:"queries",kind:"message",T:No,repeated:!0}]),vu=s.makeMessageType("viam.app.data.v1.CreateBinaryDataSignedURLRequest",()=>[{no:1,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"expiration_minutes",kind:"scalar",T:13,opt:!0}]),hu=s.makeMessageType("viam.app.data.v1.CreateBinaryDataSignedURLResponse",()=>[{no:1,name:"signed_url",kind:"scalar",T:9},{no:2,name:"expires_at",kind:"message",T:S}]),z_=Object.freeze(Object.defineProperty({__proto__:null,AddBinaryDataToDatasetByIDsRequest:Xp,AddBinaryDataToDatasetByIDsResponse:Qp,AddBoundingBoxToImageByIDRequest:Bp,AddBoundingBoxToImageByIDResponse:Fp,AddTagsToBinaryDataByFilterRequest:Np,AddTagsToBinaryDataByFilterResponse:Pp,AddTagsToBinaryDataByIDsRequest:wp,AddTagsToBinaryDataByIDsResponse:Cp,Annotations:Aa,BinaryData:Co,BinaryDataByFilterRequest:kp,BinaryDataByFilterResponse:yp,BinaryDataByIDsRequest:vp,BinaryDataByIDsResponse:hp,BinaryID:de,BinaryMetadata:_p,BoundingBox:fp,BoundingBoxLabelsByFilterRequest:$p,BoundingBoxLabelsByFilterResponse:Yp,CaptureInterval:Gn,CaptureMetadata:Da,Classification:Rp,ConfigureDatabaseUserRequest:Wp,ConfigureDatabaseUserResponse:jp,CreateBinaryDataSignedURLRequest:vu,CreateBinaryDataSignedURLResponse:hu,CreateIndexRequest:nu,CreateIndexResponse:au,CreateSavedQueryRequest:mu,CreateSavedQueryResponse:cu,DataRequest:bo,DeleteBinaryDataByFilterRequest:Ep,DeleteBinaryDataByFilterResponse:Mp,DeleteBinaryDataByIDsRequest:bp,DeleteBinaryDataByIDsResponse:Op,DeleteIndexRequest:tu,DeleteIndexResponse:su,DeleteSavedQueryRequest:du,DeleteSavedQueryResponse:lu,DeleteTabularDataRequest:Sp,DeleteTabularDataResponse:Ip,ExportTabularDataRequest:pp,ExportTabularDataResponse:up,Filter:Ye,GetDatabaseConnectionRequest:Hp,GetDatabaseConnectionResponse:Kp,GetLatestTabularDataRequest:gp,GetLatestTabularDataResponse:Tp,GetSavedQueryRequest:pu,GetSavedQueryResponse:uu,Index:ru,IndexCreator:sp,IndexableCollection:Ln,ListIndexesRequest:ou,ListIndexesResponse:iu,ListSavedQueriesRequest:ku,ListSavedQueriesResponse:yu,Order:ap,Query:No,RemoveBinaryDataFromDatasetByIDsRequest:Zp,RemoveBinaryDataFromDatasetByIDsResponse:eu,RemoveBoundingBoxFromImageByIDRequest:xp,RemoveBoundingBoxFromImageByIDResponse:Jp,RemoveTagsFromBinaryDataByFilterRequest:Up,RemoveTagsFromBinaryDataByFilterResponse:qp,RemoveTagsFromBinaryDataByIDsRequest:Dp,RemoveTagsFromBinaryDataByIDsResponse:Ap,TabularData:rp,TabularDataByFilterRequest:op,TabularDataByFilterResponse:ip,TabularDataByMQLRequest:dp,TabularDataByMQLResponse:lp,TabularDataBySQLRequest:mp,TabularDataBySQLResponse:cp,TabularDataSource:wo,TabularDataSourceType:en,TagsByFilterRequest:Lp,TagsByFilterResponse:Gp,TagsFilter:Oo,TagsFilterType:tp,UpdateBoundingBoxRequest:zp,UpdateBoundingBoxResponse:Vp,UpdateSavedQueryRequest:gu,UpdateSavedQueryResponse:Tu},Symbol.toStringTag,{value:"Module"})),fu=s.makeEnum("viam.component.camera.v1.Format",[{no:0,name:"FORMAT_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"FORMAT_RAW_RGBA",localName:"RAW_RGBA"},{no:2,name:"FORMAT_RAW_DEPTH",localName:"RAW_DEPTH"},{no:3,name:"FORMAT_JPEG",localName:"JPEG"},{no:4,name:"FORMAT_PNG",localName:"PNG"}]),Ru=s.makeMessageType("viam.component.camera.v1.GetImageRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),_u=s.makeMessageType("viam.component.camera.v1.GetImageResponse",()=>[{no:1,name:"mime_type",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:12}]),Po=s.makeMessageType("viam.component.camera.v1.GetImagesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"filter_source_names",kind:"scalar",T:9,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Su=s.makeMessageType("viam.component.camera.v1.GetImagesResponse",()=>[{no:1,name:"images",kind:"message",T:Do,repeated:!0},{no:84260,name:"response_metadata",kind:"message",T:xr}]),Do=s.makeMessageType("viam.component.camera.v1.Image",()=>[{no:1,name:"source_name",kind:"scalar",T:9},{no:2,name:"format",kind:"enum",T:s.getEnumType(fu)},{no:3,name:"image",kind:"scalar",T:12},{no:4,name:"mime_type",kind:"scalar",T:9},{no:5,name:"annotations",kind:"message",T:Aa}]),Iu=s.makeMessageType("viam.component.camera.v1.RenderFrameRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ao=s.makeMessageType("viam.component.camera.v1.GetPointCloudRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Eu=s.makeMessageType("viam.component.camera.v1.GetPointCloudResponse",()=>[{no:1,name:"mime_type",kind:"scalar",T:9},{no:2,name:"point_cloud",kind:"scalar",T:12}]),Mu=s.makeMessageType("viam.component.camera.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),bu=s.makeMessageType("viam.component.camera.v1.GetPropertiesResponse",()=>[{no:1,name:"supports_pcd",kind:"scalar",T:8},{no:2,name:"intrinsic_parameters",kind:"message",T:Cu},{no:3,name:"distortion_parameters",kind:"message",T:Nu},{no:4,name:"mime_types",kind:"scalar",T:9,repeated:!0},{no:5,name:"frame_rate",kind:"scalar",T:2,opt:!0}]),V_=s.makeMessageType("viam.component.camera.v1.Webcams",()=>[{no:1,name:"webcams",kind:"message",T:Ou,repeated:!0}]),Ou=s.makeMessageType("viam.component.camera.v1.Webcam",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"status",kind:"scalar",T:9},{no:3,name:"properties",kind:"message",T:wu,repeated:!0},{no:4,name:"name",kind:"scalar",T:9},{no:5,name:"id",kind:"scalar",T:9}]),wu=s.makeMessageType("viam.component.camera.v1.Property",()=>[{no:1,name:"width_px",kind:"scalar",T:5},{no:2,name:"height_px",kind:"scalar",T:5},{no:3,name:"frame_format",kind:"scalar",T:9},{no:4,name:"frame_rate",kind:"scalar",T:2}]),Cu=s.makeMessageType("viam.component.camera.v1.IntrinsicParameters",()=>[{no:1,name:"width_px",kind:"scalar",T:13},{no:2,name:"height_px",kind:"scalar",T:13},{no:3,name:"focal_x_px",kind:"scalar",T:1},{no:4,name:"focal_y_px",kind:"scalar",T:1},{no:5,name:"center_x_px",kind:"scalar",T:1},{no:6,name:"center_y_px",kind:"scalar",T:1}]),Nu=s.makeMessageType("viam.component.camera.v1.DistortionParameters",()=>[{no:1,name:"model",kind:"scalar",T:9},{no:2,name:"parameters",kind:"scalar",T:1,repeated:!0}]),$_=Object.freeze(Object.defineProperty({__proto__:null,DistortionParameters:Nu,Format:fu,GetImageRequest:Ru,GetImageResponse:_u,GetImagesRequest:Po,GetImagesResponse:Su,GetPointCloudRequest:Ao,GetPointCloudResponse:Eu,GetPropertiesRequest:Mu,GetPropertiesResponse:bu,Image:Do,IntrinsicParameters:Cu,Property:wu,RenderFrameRequest:Iu,Webcam:Ou,Webcams:V_},Symbol.toStringTag,{value:"Module"})),Uo=s.makeMessageType("viam.service.vision.v1.GetDetectionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:12},{no:3,name:"width",kind:"scalar",T:3},{no:4,name:"height",kind:"scalar",T:3},{no:5,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Pu=s.makeMessageType("viam.service.vision.v1.GetDetectionsResponse",()=>[{no:1,name:"detections",kind:"message",T:Ua,repeated:!0}]),qo=s.makeMessageType("viam.service.vision.v1.GetDetectionsFromCameraRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Du=s.makeMessageType("viam.service.vision.v1.GetDetectionsFromCameraResponse",()=>[{no:1,name:"detections",kind:"message",T:Ua,repeated:!0}]),Ua=s.makeMessageType("viam.service.vision.v1.Detection",()=>[{no:1,name:"x_min",kind:"scalar",T:3,opt:!0},{no:2,name:"y_min",kind:"scalar",T:3,opt:!0},{no:3,name:"x_max",kind:"scalar",T:3,opt:!0},{no:4,name:"y_max",kind:"scalar",T:3,opt:!0},{no:5,name:"confidence",kind:"scalar",T:1},{no:6,name:"class_name",kind:"scalar",T:9},{no:7,name:"x_min_normalized",kind:"scalar",T:1,opt:!0},{no:8,name:"y_min_normalized",kind:"scalar",T:1,opt:!0},{no:9,name:"x_max_normalized",kind:"scalar",T:1,opt:!0},{no:10,name:"y_max_normalized",kind:"scalar",T:1,opt:!0}]),Lo=s.makeMessageType("viam.service.vision.v1.GetClassificationsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:12},{no:3,name:"width",kind:"scalar",T:5},{no:4,name:"height",kind:"scalar",T:5},{no:5,name:"mime_type",kind:"scalar",T:9},{no:6,name:"n",kind:"scalar",T:5},{no:99,name:"extra",kind:"message",T:p}]),Au=s.makeMessageType("viam.service.vision.v1.GetClassificationsResponse",()=>[{no:1,name:"classifications",kind:"message",T:qa,repeated:!0}]),Go=s.makeMessageType("viam.service.vision.v1.GetClassificationsFromCameraRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:3,name:"n",kind:"scalar",T:5},{no:99,name:"extra",kind:"message",T:p}]),Uu=s.makeMessageType("viam.service.vision.v1.GetClassificationsFromCameraResponse",()=>[{no:1,name:"classifications",kind:"message",T:qa,repeated:!0}]),qa=s.makeMessageType("viam.service.vision.v1.Classification",()=>[{no:1,name:"class_name",kind:"scalar",T:9},{no:2,name:"confidence",kind:"scalar",T:1}]),Bo=s.makeMessageType("viam.service.vision.v1.GetObjectPointCloudsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:3,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),qu=s.makeMessageType("viam.service.vision.v1.GetObjectPointCloudsResponse",()=>[{no:1,name:"mime_type",kind:"scalar",T:9},{no:2,name:"objects",kind:"message",T:Mt,repeated:!0}]),Fo=s.makeMessageType("viam.service.vision.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),xo=s.makeMessageType("viam.service.vision.v1.CaptureAllFromCameraRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:3,name:"return_image",kind:"scalar",T:8},{no:4,name:"return_classifications",kind:"scalar",T:8},{no:5,name:"return_detections",kind:"scalar",T:8},{no:6,name:"return_object_point_clouds",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),Lu=s.makeMessageType("viam.service.vision.v1.CaptureAllFromCameraResponse",()=>[{no:1,name:"image",kind:"message",T:Do},{no:2,name:"detections",kind:"message",T:Ua,repeated:!0},{no:3,name:"classifications",kind:"message",T:qa,repeated:!0},{no:4,name:"objects",kind:"message",T:Mt,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Gu=s.makeMessageType("viam.service.vision.v1.GetPropertiesResponse",()=>[{no:1,name:"classifications_supported",kind:"scalar",T:8},{no:2,name:"detections_supported",kind:"scalar",T:8},{no:3,name:"object_point_clouds_supported",kind:"scalar",T:8}]),Bu=Object.freeze(Object.defineProperty({__proto__:null,CaptureAllFromCameraRequest:xo,CaptureAllFromCameraResponse:Lu,Classification:qa,Detection:Ua,GetClassificationsFromCameraRequest:Go,GetClassificationsFromCameraResponse:Uu,GetClassificationsRequest:Lo,GetClassificationsResponse:Au,GetDetectionsFromCameraRequest:qo,GetDetectionsFromCameraResponse:Du,GetDetectionsRequest:Uo,GetDetectionsResponse:Pu,GetObjectPointCloudsRequest:Bo,GetObjectPointCloudsResponse:qu,GetPropertiesRequest:Fo,GetPropertiesResponse:Gu},Symbol.toStringTag,{value:"Module"})),Fu={typeName:"viam.service.vision.v1.VisionService",methods:{getDetectionsFromCamera:{name:"GetDetectionsFromCamera",I:qo,O:Du,kind:m.Unary},getDetections:{name:"GetDetections",I:Uo,O:Pu,kind:m.Unary},getClassificationsFromCamera:{name:"GetClassificationsFromCamera",I:Go,O:Uu,kind:m.Unary},getClassifications:{name:"GetClassifications",I:Lo,O:Au,kind:m.Unary},getObjectPointClouds:{name:"GetObjectPointClouds",I:Bo,O:qu,kind:m.Unary},getProperties:{name:"GetProperties",I:Fo,O:Gu,kind:m.Unary},captureAllFromCamera:{name:"CaptureAllFromCamera",I:xo,O:Lu,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}},Y_=new Blob([`self.onmessage = function(e) {
|
|
5
5
|
setTimeout(() => self.postMessage(""), e.data);
|
|
6
6
|
};`],{type:"text/javascript"});class W_{constructor(e,n,a=1e4){this.deferredTransport=e,this.onDisconnect=n,this.heartbeatIntervalMs=a}connecting;get client(){const e=this.deferredTransport();return W(Qs,e)}heartbeat(){let e;const n=async()=>{try{await this.client.getOperations({})}catch{this.onDisconnect();return}e?e.postMessage(this.heartbeatIntervalMs):setTimeout(()=>{n().catch(console.error)},this.heartbeatIntervalMs)};if(globalThis.Worker!==void 0){const a=window.URL.createObjectURL(Y_);e=new Worker(a),URL.revokeObjectURL(a),e.addEventListener("message",()=>{n().catch(console.error)})}n().catch(console.error)}async start(){this.connecting&&await this.connecting,this.connecting=new Promise((e,n)=>{(async()=>{await this.client.getOperations({})})().then(e).catch(n).finally(()=>{this.connecting=void 0})});try{await this.connecting}finally{this.connecting=void 0}this.heartbeat()}}const La=s.makeMessageType("grpc.reflection.v1.ServerReflectionRequest",()=>[{no:1,name:"host",kind:"scalar",T:9},{no:3,name:"file_by_filename",kind:"scalar",T:9,oneof:"message_request"},{no:4,name:"file_containing_symbol",kind:"scalar",T:9,oneof:"message_request"},{no:5,name:"file_containing_extension",kind:"message",T:j_,oneof:"message_request"},{no:6,name:"all_extension_numbers_of_type",kind:"scalar",T:9,oneof:"message_request"},{no:7,name:"list_services",kind:"scalar",T:9,oneof:"message_request"}]),j_=s.makeMessageType("grpc.reflection.v1.ExtensionRequest",()=>[{no:1,name:"containing_type",kind:"scalar",T:9},{no:2,name:"extension_number",kind:"scalar",T:5}]),H_=s.makeMessageType("grpc.reflection.v1.ServerReflectionResponse",()=>[{no:1,name:"valid_host",kind:"scalar",T:9},{no:2,name:"original_request",kind:"message",T:La},{no:4,name:"file_descriptor_response",kind:"message",T:K_,oneof:"message_response"},{no:5,name:"all_extension_numbers_response",kind:"message",T:X_,oneof:"message_response"},{no:6,name:"list_services_response",kind:"message",T:Q_,oneof:"message_response"},{no:7,name:"error_response",kind:"message",T:eS,oneof:"message_response"}]),K_=s.makeMessageType("grpc.reflection.v1.FileDescriptorResponse",()=>[{no:1,name:"file_descriptor_proto",kind:"scalar",T:12,repeated:!0}]),X_=s.makeMessageType("grpc.reflection.v1.ExtensionNumberResponse",()=>[{no:1,name:"base_type_name",kind:"scalar",T:9},{no:2,name:"extension_number",kind:"scalar",T:5,repeated:!0}]),Q_=s.makeMessageType("grpc.reflection.v1.ListServiceResponse",()=>[{no:1,name:"service",kind:"message",T:Z_,repeated:!0}]),Z_=s.makeMessageType("grpc.reflection.v1.ServiceResponse",()=>[{no:1,name:"name",kind:"scalar",T:9}]),eS=s.makeMessageType("grpc.reflection.v1.ErrorResponse",()=>[{no:1,name:"error_code",kind:"scalar",T:5},{no:2,name:"error_message",kind:"scalar",T:9}]),nS={typeName:"grpc.reflection.v1.ServerReflection",methods:{serverReflectionInfo:{name:"ServerReflectionInfo",I:La,O:H_,kind:m.BiDiStreaming}}};class aS{constructor(e,n){this.deferredTransport=e,this.sessionManager=n}async getSessionMetadata(){try{return await this.sessionManager.getSessionMetadata()}catch(e){throw e instanceof C&&e.code===u.Code.InvalidArgument&&e.message==="SESSION_EXPIRED"&&this.sessionManager.reset(),e}}async unary(e,n,a,o,i,r,c){const l=Cn(i),d=`/${e.typeName}/${n.name}`;for(const[g,f]of An)l.set(g,f);if(nn.heartbeatMonitoredMethods[d]??!1){const g=await this.getSessionMetadata();for(const[f,I]of g)l.set(f,I)}return this.deferredTransport().unary(e,n,a,o,l,r,c)}async stream(e,n,a,o,i,r,c){const l=Cn(i),d=`/${e.typeName}/${n.name}`;for(const[g,f]of An)l.set(g,f);if(nn.heartbeatMonitoredMethods[d]??!1){const g=await this.getSessionMetadata();for(const[f,I]of g)l.set(f,I)}return this.deferredTransport().stream(e,n,a,o,l,r,c)}}const tS=new Blob([`self.onmessage = function(e) {
|
|
7
7
|
setTimeout(() => self.postMessage(""), e.data);
|
|
8
|
-
};`],{type:"text/javascript"});class nn{constructor(e,n){this.deferredTransport=n,this.host=e??"",this.transport=new aS(this.deferredTransport,this)}static heartbeatMonitoredMethods={};transport;currentSessionID="";sessionsSupported;heartbeatIntervalMs;host="";starting;get client(){const e=this.deferredTransport();return W(Qs,e)}get sessionID(){return this.currentSessionID}setHost(e){this.host=e}getSessionMetadataInner(){const e=new Headers;return this.sessionsSupported&&this.currentSessionID!==""&&e.set("viam-sid",this.currentSessionID),e}reset(){this.starting||(this.sessionsSupported=void 0)}backgroundHeartbeat=!0;async heartbeat(){if(!this.sessionsSupported||this.currentSessionID==="")return;for(;this.starting;)await this.starting;let e;const n=async()=>{const a=new js({id:this.currentSessionID});try{await this.client.sendSessionHeartbeat(a)}catch(o){if(o instanceof C&&o.code===u.Code.Unimplemented){console.error("sessions unsupported; will not try again"),this.sessionsSupported=!1;return}if(o instanceof ce||o instanceof C&&o.rawMessage==="closed"){this.reset();return}}e?e.postMessage(this.heartbeatIntervalMs):setTimeout(()=>{n().catch(console.error)},this.heartbeatIntervalMs)};if(this.backgroundHeartbeat&&globalThis.Worker!==void 0){const a=window.URL.createObjectURL(tS);e=new Worker(a),URL.revokeObjectURL(a),e.addEventListener("message",()=>{n().catch(console.error)})}n().catch(console.error)}async getSessionMetadata(){for(;this.starting;)await this.starting;return this.sessionsSupported!==void 0?this.getSessionMetadataInner():(this.starting=new Promise((e,n)=>{(async()=>{const a=new Ws;this.currentSessionID!==""&&(a.resume=this.currentSessionID);let o;try{o=await this.client.startSession(a)}catch(r){if(r instanceof C&&r.code===u.Code.Unimplemented){console.error("sessions unsupported; will not try again"),this.sessionsSupported=!1;return}throw r}const{heartbeatWindow:i}=o;if(!i)throw new Error("expected heartbeat window in response to start session");this.sessionsSupported=!0,this.currentSessionID=o.id,this.heartbeatIntervalMs=(Number(i.seconds)*1e3+i.nanos/1e6)/5,await this.applyHeartbeatMonitoredMethods(),e(),this.heartbeat().catch(console.error)})().then(e).catch(n).finally(()=>{this.starting=void 0})}),await this.starting,this.getSessionMetadataInner())}async applyHeartbeatMonitoredMethods(){try{const e=W(nS,this.transport),n=new La({host:this.host,messageRequest:{case:"listServices",value:""}}),a=e.serverReflectionInfo(st([n]),{timeoutMs:1e4});for await(const o of a){const i=o.messageResponse.value.service.map(c=>new La({messageRequest:{case:"fileContainingSymbol",value:c.name}})),r=e.serverReflectionInfo(st(i),{timeoutMs:1e4});for await(const c of r)for(const l of c.messageResponse.value.fileDescriptorProto){const d=te.fromBinary(l);for(const g of d.service)for(const f of g.method)nn.heartbeatMonitoredMethods[`/${d.package}.${g.name}/${f.name}`]=nn.hasHeartbeatOption(f.options)}}}catch{nn.heartbeatMonitoredMethods={"/viam.component.arm.v1.ArmService/MoveToPosition":!0,"/viam.component.arm.v1.ArmService/MoveToJointPositions":!0,"/viam.component.arm.v1.ArmService/MoveThroughJointPositions":!0,"/viam.component.base.v1.BaseService/MoveStraight":!0,"/viam.component.base.v1.BaseService/Spin":!0,"/viam.component.base.v1.BaseService/SetPower":!0,"/viam.component.base.v1.BaseService/SetVelocity":!0,"/viam.component.gantry.v1.GantryService/MoveToPosition":!0,"/viam.component.gripper.v1.GripperService/Open":!0,"/viam.component.gripper.v1.GripperService/Grab":!0,"/viam.component.motor.v1.MotorService/SetPower":!0,"/viam.component.motor.v1.MotorService/GoFor":!0,"/viam.component.motor.v1.MotorService/GoTo":!0,"/viam.component.motor.v1.MotorService/SetRPM":!0,"/viam.component.servo.v1.ServoService/Move":!0}}}static hasHeartbeatOption(e){if(!e)return!1;const n=new Ni(e.toBinary());for(;n.pos<n.len;){const a=n.tag(),[o]=a;if(o===zr.field.no)return!0;n.string()}return!1}}const sS=s.makeEnum("viam.service.mlmodel.v1.LabelType",[{no:0,name:"LABEL_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"LABEL_TYPE_TENSOR_VALUE",localName:"TENSOR_VALUE"},{no:2,name:"LABEL_TYPE_TENSOR_AXIS",localName:"TENSOR_AXIS"}]),xu=s.makeMessageType("viam.service.mlmodel.v1.InferRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:3,name:"input_tensors",kind:"message",T:Vu},{no:99,name:"extra",kind:"message",T:p}]),oS=s.makeMessageType("viam.service.mlmodel.v1.InferResponse",()=>[{no:3,name:"output_tensors",kind:"message",T:Vu}]),Ju=s.makeMessageType("viam.service.mlmodel.v1.MetadataRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),iS=s.makeMessageType("viam.service.mlmodel.v1.MetadataResponse",()=>[{no:1,name:"metadata",kind:"message",T:rS}]),rS=s.makeMessageType("viam.service.mlmodel.v1.Metadata",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"description",kind:"scalar",T:9},{no:4,name:"input_info",kind:"message",T:zu,repeated:!0},{no:5,name:"output_info",kind:"message",T:zu,repeated:!0}]),zu=s.makeMessageType("viam.service.mlmodel.v1.TensorInfo",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:3,name:"data_type",kind:"scalar",T:9},{no:4,name:"shape",kind:"scalar",T:5,repeated:!0},{no:5,name:"associated_files",kind:"message",T:mS,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),mS=s.makeMessageType("viam.service.mlmodel.v1.File",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:3,name:"label_type",kind:"enum",T:s.getEnumType(sS)}]),cS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt8",()=>[{no:1,name:"data",kind:"scalar",T:12}]),dS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt8",()=>[{no:1,name:"data",kind:"scalar",T:12}]),lS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt16",()=>[{no:1,name:"data",kind:"scalar",T:7,repeated:!0}]),pS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt16",()=>[{no:1,name:"data",kind:"scalar",T:7,repeated:!0}]),uS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt32",()=>[{no:1,name:"data",kind:"scalar",T:15,repeated:!0}]),gS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt32",()=>[{no:1,name:"data",kind:"scalar",T:7,repeated:!0}]),TS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt64",()=>[{no:1,name:"data",kind:"scalar",T:16,repeated:!0}]),kS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt64",()=>[{no:1,name:"data",kind:"scalar",T:6,repeated:!0}]),yS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataFloat",()=>[{no:1,name:"data",kind:"scalar",T:2,repeated:!0}]),vS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataDouble",()=>[{no:1,name:"data",kind:"scalar",T:1,repeated:!0}]),hS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensor",()=>[{no:1,name:"shape",kind:"scalar",T:6,repeated:!0},{no:2,name:"int8_tensor",kind:"message",T:cS,oneof:"tensor"},{no:3,name:"uint8_tensor",kind:"message",T:dS,oneof:"tensor"},{no:4,name:"int16_tensor",kind:"message",T:lS,oneof:"tensor"},{no:5,name:"uint16_tensor",kind:"message",T:pS,oneof:"tensor"},{no:6,name:"int32_tensor",kind:"message",T:uS,oneof:"tensor"},{no:7,name:"uint32_tensor",kind:"message",T:gS,oneof:"tensor"},{no:8,name:"int64_tensor",kind:"message",T:TS,oneof:"tensor"},{no:9,name:"uint64_tensor",kind:"message",T:kS,oneof:"tensor"},{no:10,name:"float_tensor",kind:"message",T:yS,oneof:"tensor"},{no:11,name:"double_tensor",kind:"message",T:vS,oneof:"tensor"}]),Vu=s.makeMessageType("viam.service.mlmodel.v1.FlatTensors",()=>[{no:1,name:"tensors",kind:"map",K:9,V:{kind:"message",T:hS}}]),$u={typeName:"viam.service.mlmodel.v1.MLModelService",methods:{infer:{name:"Infer",I:xu,O:oS,kind:m.Unary},metadata:{name:"Metadata",I:Ju,O:iS,kind:m.Unary}}},Yu=s.makeEnum("viam.service.worldstatestore.v1.TransformChangeType",[{no:0,name:"TRANSFORM_CHANGE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TRANSFORM_CHANGE_TYPE_ADDED",localName:"ADDED"},{no:2,name:"TRANSFORM_CHANGE_TYPE_REMOVED",localName:"REMOVED"},{no:3,name:"TRANSFORM_CHANGE_TYPE_UPDATED",localName:"UPDATED"}]),Wu=s.makeMessageType("viam.service.worldstatestore.v1.ListUUIDsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),fS=s.makeMessageType("viam.service.worldstatestore.v1.ListUUIDsResponse",()=>[{no:1,name:"uuids",kind:"scalar",T:12,repeated:!0}]),ju=s.makeMessageType("viam.service.worldstatestore.v1.GetTransformRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"uuid",kind:"scalar",T:12},{no:99,name:"extra",kind:"message",T:p}]),RS=s.makeMessageType("viam.service.worldstatestore.v1.GetTransformResponse",()=>[{no:2,name:"transform",kind:"message",T:Le}]),Hu=s.makeMessageType("viam.service.worldstatestore.v1.StreamTransformChangesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),_S=s.makeMessageType("viam.service.worldstatestore.v1.StreamTransformChangesResponse",()=>[{no:1,name:"change_type",kind:"enum",T:s.getEnumType(Yu)},{no:2,name:"transform",kind:"message",T:Le},{no:3,name:"updated_fields",kind:"message",T:Ae}]),Ku={typeName:"viam.service.worldstatestore.v1.WorldStateStoreService",methods:{listUUIDs:{name:"ListUUIDs",I:Wu,O:fS,kind:m.Unary},getTransform:{name:"GetTransform",I:ju,O:RS,kind:m.Unary},streamTransformChanges:{name:"StreamTransformChanges",I:Hu,O:_S,kind:m.ServerStreaming},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}},SS=(t,e)=>{if(t==null)throw new Error(e)},gn="Dial operation aborted",IS=t=>{const e=t;return typeof e.signalingAddress!="string"?!1:!e.iceServers||Array.isArray(e.iceServers)},Xu=t=>t>0&&Number.isInteger(t),Qu=t=>{if(t instanceof C&&[u.Code.Canceled,u.Code.InvalidArgument,u.Code.NotFound,u.Code.AlreadyExists,u.Code.PermissionDenied,u.Code.FailedPrecondition,u.Code.OutOfRange,u.Code.Unimplemented,u.Code.Unauthenticated].includes(t.code))return!1;if(t instanceof Error){const e=t.message.toLowerCase();if(e.includes("invalid")||e.includes("configuration")||e.includes("cannot dial"))return!1}return!0},ES=t=>{if(t.credentials&&Un(t.credentials))try{t.credentials.authEntity=new URL(t.credentials.authEntity).host}catch(e){if(!(e instanceof TypeError))throw e}if(t.reconnectMaxAttempts!==void 0&&!Xu(t.reconnectMaxAttempts))throw new Error(`Value of max reconnect attempts (${t.reconnectMaxAttempts}) should be a positive integer`);if(t.reconnectMaxWait!==void 0&&!Xu(t.reconnectMaxWait))throw new Error(`Value of max reconnect wait (${t.reconnectMaxWait}) should be a positive integer`)},Zu=t=>{if(t instanceof Error&&t.message===gn)throw t};class We extends Yr{serviceHost="";webrtcOptions={enabled:!1,host:"",signalingAddress:"",rtcConfig:{}};directOptions={};sessionOptions={disabled:!1};gRPCConnectionManager;sessionManager;peerConn;dataChannel;transport;connecting;connectResolve;dialing;currentDialAbortSignal;savedCreds;closed;robotServiceClient;armServiceClient;baseServiceClient;boardServiceClient;encoderServiceClient;gantryServiceClient;genericServiceClient;gripperServiceClient;mlModelServiceClient;movementSensorServiceClient;powerSensorServiceClient;inputControllerServiceClient;motorServiceClient;navigationServiceClient;discoveryServiceClient;motionServiceClient;visionServiceClient;servoServiceClient;slamServiceClient;worldStateStoreServiceClient;currentRetryAttempt=0;onICEConnectionStateChange;onDataChannelClose;onTrack;constructor(e,n,a,o){super(),e!==void 0&&(this.serviceHost=e),n&&(this.webrtcOptions=n),o&&(this.directOptions=o),a&&(this.sessionOptions=a),this.gRPCConnectionManager=new W_(()=>{if(!this.transport)throw new Error(We.notConnectedYetStr);return this.transport},()=>{this.onDisconnect()}),this.sessionManager=new nn(this.serviceHost,()=>{if(!this.transport)throw new Error(We.notConnectedYetStr);return this.transport});for(const i of Object.values(H))this.on(i,()=>{this.emit("connectionstatechange",{eventType:i})});this.closed=!1}cleanupEventListeners(){this.peerConn&&this.onICEConnectionStateChange&&(this.peerConn.removeEventListener("iceconnectionstatechange",this.onICEConnectionStateChange),this.onICEConnectionStateChange=void 0),this.peerConn&&this.onTrack&&(this.peerConn.removeEventListener("track",this.onTrack),this.onTrack=void 0),this.dataChannel&&this.onDataChannelClose&&(this.dataChannel.removeEventListener("close",this.onDataChannelClose),this.onDataChannelClose=void 0)}onDisconnect(e){if(this.emit(H.DISCONNECTED,e??{}),this.noReconnect!==void 0&&this.noReconnect||this.closed)return;console.debug("Connection closed, will try to reconnect");const n={retry:(a,o)=>(console.debug(`Failed to connect, attempt ${o} with backoff`,a),this.currentRetryAttempt=o,this.closed?!1:Qu(a)?!0:(console.debug("Non-retryable error encountered, stopping reconnection attempts",a),!1))};this.reconnectMaxWait!==void 0&&(n.maxDelay=this.reconnectMaxWait),this.reconnectMaxAttempts!==void 0&&(n.numOfAttempts=this.reconnectMaxAttempts),this.currentRetryAttempt=0,kt(async()=>this.connect(),n).then(()=>{console.debug("Reconnected successfully!")}).catch(a=>{if(this.reconnectMaxAttempts!==void 0&&this.currentRetryAttempt>=this.reconnectMaxAttempts){console.debug(`Reached max attempts: ${this.reconnectMaxAttempts}`);return}console.error(a)})}get noReconnect(){return this.webrtcOptions.noReconnect??this.directOptions.noReconnect}get reconnectMaxAttempts(){return this.webrtcOptions.reconnectMaxAttempts??this.directOptions.reconnectMaxAttempts}get reconnectMaxWait(){return this.webrtcOptions.reconnectMaxWait??this.directOptions.reconnectMaxWait}get sessionId(){return this.sessionManager.sessionID}static notConnectedYetStr="not connected yet";get robotService(){if(!this.robotServiceClient)throw new Error(We.notConnectedYetStr);return this.robotServiceClient}get armService(){return this.armServiceClient??=this.createServiceClient(tm),this.armServiceClient}get baseService(){return this.baseServiceClient??=this.createServiceClient(pm),this.baseServiceClient}get boardService(){return this.boardServiceClient??=this.createServiceClient(Mm),this.boardServiceClient}get encoderService(){return this.encoderServiceClient??=this.createServiceClient(Nm),this.encoderServiceClient}get gantryService(){return this.gantryServiceClient??=this.createServiceClient(Gm),this.gantryServiceClient}get genericService(){return this.genericServiceClient??=this.createServiceClient(ls),this.genericServiceClient}get gripperService(){return this.gripperServiceClient??=this.createServiceClient($m),this.gripperServiceClient}get mlModelService(){return this.mlModelServiceClient??=this.createServiceClient($u),this.mlModelServiceClient}get movementSensorService(){return this.movementSensorServiceClient??=this.createServiceClient(Rc),this.movementSensorServiceClient}get powerSensorService(){return this.powerSensorServiceClient??=this.createServiceClient(Ec),this.powerSensorServiceClient}get inputControllerService(){return this.inputControllerServiceClient??=this.createServiceClient(ec),this.inputControllerServiceClient}get motorService(){return this.motorServiceClient??=this.createServiceClient(lc),this.motorServiceClient}get navigationService(){return this.navigationServiceClient??=this.createServiceClient(Yl),this.navigationServiceClient}get discoveryService(){return this.discoveryServiceClient??=this.createServiceClient(ll),this.discoveryServiceClient}get motionService(){return this.motionServiceClient??=this.createServiceClient(Pl),this.motionServiceClient}get visionService(){return this.visionServiceClient??=this.createServiceClient(Fu),this.visionServiceClient}get servoService(){return this.servoServiceClient??=this.createServiceClient(Cc),this.servoServiceClient}get slamService(){return this.slamServiceClient??=this.createServiceClient(np),this.slamServiceClient}get worldStateStoreService(){return this.worldStateStoreServiceClient??=this.createServiceClient(Ku),this.worldStateStoreServiceClient}createServiceClient(e){return SS(this.clientTransport,We.notConnectedYetStr),W(e,this.clientTransport)}get peerConnection(){return this.peerConn}get clientTransport(){return this.sessionOptions.disabled?this.transport:this.sessionManager.transport}async dialWebRTC(e,n){if(n?.abort===!0)throw new Error(gn);return this.emit(H.DIALING,{method:"webrtc",attempt:this.currentRetryAttempt}),this.serviceHost=e.serviceHost??e.host,this.sessionManager.setHost(this.serviceHost),this.webrtcOptions.enabled=!0,this.webrtcOptions.host=e.host,this.webrtcOptions.signalingAddress=e.signalingAddress,this.webrtcOptions.rtcConfig.iceServers=e.iceServers??[],this.webrtcOptions.noReconnect=e.noReconnect,this.webrtcOptions.reconnectMaxWait=e.reconnectMaxWait,this.webrtcOptions.reconnectMaxAttempts=e.reconnectMaxAttempts,this.sessionOptions.disabled=e.disableSessions??!1,await this.connect({priority:e.priority,dialTimeout:e.dialTimeout??Nt,creds:e.credentials}),this}async dialDirect(e,n){if(n?.abort===!0)throw new Error(gn);if(this.emit(H.DIALING,{method:"grpc",attempt:this.currentRetryAttempt}),!e.host.includes("local"))throw new Error(`cannot dial "${e.host}" directly, please use a local url instead.`);return this.serviceHost=e.host,this.sessionManager.setHost(this.serviceHost),this.webrtcOptions.enabled=!1,this.directOptions.noReconnect=e.noReconnect,this.directOptions.reconnectMaxWait=e.reconnectMaxWait,this.directOptions.reconnectMaxAttempts=e.reconnectMaxAttempts,this.sessionOptions.disabled=e.disableSessions??!1,await this.connect({creds:e.credentials,dialTimeout:e.dialTimeout??Nt}),this}resetDialing(e){this.dialing===e&&(this.dialing=void 0,this.currentDialAbortSignal=void 0)}async dial(e){ES(e),this.dialing&&this.currentDialAbortSignal&&(console.debug("Aborting previous dial attempt due to new dial call"),this.currentDialAbortSignal.abort=!0,this.dialing.catch(()=>{console.debug("Ignored abort error from previous dial")})),this.currentDialAbortSignal={abort:!1};const n=this.performDial(e,this.currentDialAbortSignal,e.reconnectAbortSignal??{abort:!1});this.dialing=n;try{const a=await n;return this.resetDialing(n),a}catch(a){if(this.resetDialing(n),a instanceof Error&&a.message===gn)return console.debug(gn),this;throw a}}createBackOffOpts({abort:e},{abort:n}){return{retry:(a,o)=>{if(e||n)throw new Error(gn);return console.debug(`Failed to connect, attempt ${o} with backoff`,a),this.currentRetryAttempt=o,this.closed?!1:Qu(a)?!0:(console.debug("Non-retryable error encountered, stopping connection attempts",a),!1)}}}async tryWebRTCDial(e,n,a){try{return{dialer:await kt(async()=>this.dialWebRTC(e,n),a)}}catch(o){Zu(o);const i=o instanceof Error?o:new Error(String(o));return console.debug("Failed to connect via WebRTC",i),this.emit(H.DISCONNECTED,{error:i}),{dialer:this,error:i}}}async tryDirectDial(e,n,a){try{return{dialer:await kt(async()=>this.dialDirect(e,n),a)}}catch(o){Zu(o);const i=o instanceof Error?o:new Error(String(o));return console.debug("Failed to connect via gRPC",i),this.emit(H.DISCONNECTED,{error:i}),{dialer:this,error:i}}}async performDial(e,n,a){const o=this.createBackOffOpts(n,a??{abort:!1});e.reconnectMaxWait!==void 0&&(o.maxDelay=e.reconnectMaxWait),o.numOfAttempts=e.noReconnect?1:e.reconnectMaxAttempts,this.currentRetryAttempt=0;const i=[],r=IS(e),c=r?2:1,l=n.abort||a?.abort===!0;if(r&&!l){const{dialer:g,error:f}=await this.tryWebRTCDial(e,n,o);if(!f)return g;i.push(f)}if(this.currentRetryAttempt=0,!(n.abort||a?.abort===!0)){const{dialer:g,error:f}=await this.tryDirectDial(e,n,o);if(!f)return g;i.push(f)}if(i.length===c)throw new Error("Failed to connect via all methods",{cause:i});return this}async disconnect(){for(this.emit(H.DISCONNECTING,{}),this.currentDialAbortSignal&&this.dialing&&(this.currentDialAbortSignal.abort=!0,this.dialing.catch(()=>{console.debug("Ignored abort error from previous dial")}),this.resetDialing(this.dialing));this.connecting;)await this.connecting;this.cleanupEventListeners(),this.peerConn&&(this.peerConn.close(),this.peerConn=void 0),this.dataChannel&&(this.dataChannel.close(),this.dataChannel=void 0),this.sessionManager.reset(),this.closed=!0,this.emit(H.DISCONNECTED,{})}isConnected(){return this.peerConn?.iceConnectionState==="connected"}async connect({creds:e=this.savedCreds,priority:n,dialTimeout:a}={}){if(this.emit(H.CONNECTING,{}),this.closed=!1,this.connecting){for(;this.connecting!==void 0;)await this.connecting;return}this.connecting=new Promise(o=>{this.connectResolve=o}),this.peerConn&&(this.peerConn.close(),this.peerConn=void 0),this.dataChannel&&(this.dataChannel.close(),this.dataChannel=void 0),(!e||e!==this.savedCreds||this.sessionOptions.disabled)&&this.sessionManager.reset();try{const o={webrtcOptions:{disableTrickleICE:!1,rtcConfig:this.webrtcOptions.rtcConfig},dialTimeout:a??Nt,extraHeaders:An};if(e&&(Un(e)?o.credentials=e:o.accessToken=e.payload),n!==void 0&&o.webrtcOptions&&(o.webrtcOptions.additionalSdpFields={"x-priority":n}),this.savedCreds=e,this.webrtcOptions.enabled){o.webrtcOptions&&(o.webrtcOptions.signalingCredentials=o.credentials);const r=this.webrtcOptions.signalingAddress||this.serviceHost,c=await Q1(r,this.webrtcOptions.host,o,this.serviceHost!==""&&r!==this.serviceHost);this.peerConn=c.peerConnection,this.dataChannel=c.dataChannel,this.cleanupEventListeners(),this.onICEConnectionStateChange=()=>{this.peerConn?.iceConnectionState==="connected"?this.emit(H.CONNECTED,{}):this.peerConn?.iceConnectionState==="closed"&&this.onDisconnect()},this.peerConn.addEventListener("iceconnectionstatechange",this.onICEConnectionStateChange),this.onDataChannelClose=l=>this.onDisconnect(l),this.dataChannel.addEventListener("close",this.onDataChannelClose),this.transport=c.transport,this.onTrack=l=>{const[d]=l.streams;if(!d)throw this.emit("track",l),new Error("expected event stream to exist");const g=d.id.replaceAll("+",":");Object.defineProperty(d,"id",{value:g}),this.emit("track",l)},this.peerConn.addEventListener("track",this.onTrack)}else this.transport=await Sa(this.serviceHost,o),await this.gRPCConnectionManager.start();const i=this.sessionOptions.disabled?this.transport:this.sessionManager.transport;this.robotServiceClient=W(Qs,i),this.emit(H.CONNECTED,{})}catch(o){throw this.emit(H.DISCONNECTED,{}),o}finally{this.connectResolve?.(),this.connectResolve=void 0,this.connecting=void 0}}async getSessions(){return(await this.robotService.getSessions({})).sessions}async getOperations(){return(await this.robotService.getOperations({})).operations}async cancelOperation(e){await this.robotService.cancelOperation({id:e})}async blockForOperation(e){await this.robotService.blockForOperation({id:e})}async stopAll(){await this.robotService.stopAll({})}async frameSystemConfig(e){return(await this.robotService.frameSystemConfig({supplementalTransforms:e})).frameSystemConfigs}async transformPose(e,n,a){const o=new zs({source:e,destination:n,supplementalTransforms:a}),r=(await this.robotService.transformPose(o)).pose;if(!r)throw new Error("no pose");return r}async transformPCD(e,n,a){const o=new Vs({pointCloudPcd:e,source:n,destination:a});return(await this.robotService.transformPCD(o)).pointCloudPcd}async getModelsFromModules(){const e=new $s({});return(await this.robotService.getModelsFromModules(e)).models}async getCloudMetadata(){return this.robotService.getCloudMetadata({})}async resourceNames(){return(await this.robotService.resourceNames({})).resources}async resourceRPCSubtypes(){return(await this.robotService.resourceRPCSubtypes({})).resourceRpcSubtypes}async getMachineStatus(){return this.robotService.getMachineStatus({})}async getVersion(){return this.robotService.getVersion({})}async restartModule(e,n){const a=new Ks;e!==void 0&&(a.idOrName.case="moduleId",a.idOrName.value=e),n!==void 0&&(a.idOrName.case="moduleName",a.idOrName.value=n),await this.robotService.restartModule(a)}async getPose(e,n,a){const o=new Xs({componentName:e,destinationFrame:n,supplementalTransforms:a}),r=(await this.robotService.getPose(o)).pose;if(!r)throw new Error("no pose");return r}}const eg=async t=>{const e=await new We().dial(t);if(e.isConnected())return e;throw new Error("Failed to connect to robot")},Ga=s.makeEnum("viam.app.packages.v1.PackageType",[{no:0,name:"PACKAGE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PACKAGE_TYPE_ARCHIVE",localName:"ARCHIVE"},{no:2,name:"PACKAGE_TYPE_ML_MODEL",localName:"ML_MODEL"},{no:3,name:"PACKAGE_TYPE_MODULE",localName:"MODULE"},{no:4,name:"PACKAGE_TYPE_SLAM_MAP",localName:"SLAM_MAP"},{no:5,name:"PACKAGE_TYPE_ML_TRAINING",localName:"ML_TRAINING"}]),je=s.makeEnum("viam.app.mltraining.v1.ModelType",[{no:0,name:"MODEL_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODEL_TYPE_SINGLE_LABEL_CLASSIFICATION",localName:"SINGLE_LABEL_CLASSIFICATION"},{no:2,name:"MODEL_TYPE_MULTI_LABEL_CLASSIFICATION",localName:"MULTI_LABEL_CLASSIFICATION"},{no:3,name:"MODEL_TYPE_OBJECT_DETECTION",localName:"OBJECT_DETECTION"}]),an=s.makeEnum("viam.app.mltraining.v1.ModelFramework",[{no:0,name:"MODEL_FRAMEWORK_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODEL_FRAMEWORK_TFLITE",localName:"TFLITE"},{no:2,name:"MODEL_FRAMEWORK_TENSORFLOW",localName:"TENSORFLOW"},{no:3,name:"MODEL_FRAMEWORK_PYTORCH",localName:"PYTORCH"},{no:4,name:"MODEL_FRAMEWORK_ONNX",localName:"ONNX"}]),Ba=s.makeEnum("viam.app.mltraining.v1.TrainingStatus",[{no:0,name:"TRAINING_STATUS_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TRAINING_STATUS_PENDING",localName:"PENDING"},{no:2,name:"TRAINING_STATUS_IN_PROGRESS",localName:"IN_PROGRESS"},{no:3,name:"TRAINING_STATUS_COMPLETED",localName:"COMPLETED"},{no:4,name:"TRAINING_STATUS_FAILED",localName:"FAILED"},{no:5,name:"TRAINING_STATUS_CANCELED",localName:"CANCELED"},{no:6,name:"TRAINING_STATUS_CANCELING",localName:"CANCELING"}]),ng=s.makeMessageType("viam.app.mltraining.v1.SubmitTrainingJobRequest",()=>[{no:7,name:"dataset_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"model_name",kind:"scalar",T:9},{no:4,name:"model_version",kind:"scalar",T:9},{no:5,name:"model_type",kind:"enum",T:s.getEnumType(je)},{no:8,name:"model_framework",kind:"enum",T:s.getEnumType(an)},{no:6,name:"tags",kind:"scalar",T:9,repeated:!0}]),ag=s.makeMessageType("viam.app.mltraining.v1.SubmitTrainingJobResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),tg=s.makeMessageType("viam.app.mltraining.v1.SubmitCustomTrainingJobRequest",()=>[{no:1,name:"dataset_id",kind:"scalar",T:9},{no:2,name:"registry_item_id",kind:"scalar",T:9},{no:6,name:"registry_item_version",kind:"scalar",T:9},{no:3,name:"organization_id",kind:"scalar",T:9},{no:4,name:"model_name",kind:"scalar",T:9},{no:5,name:"model_version",kind:"scalar",T:9},{no:7,name:"arguments",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:8,name:"container_version",kind:"scalar",T:9}]),sg=s.makeMessageType("viam.app.mltraining.v1.SubmitCustomTrainingJobResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),og=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ig=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobResponse",()=>[{no:1,name:"metadata",kind:"message",T:Jo}]),rg=s.makeMessageType("viam.app.mltraining.v1.ListTrainingJobsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:s.getEnumType(Ba)}]),mg=s.makeMessageType("viam.app.mltraining.v1.ListTrainingJobsResponse",()=>[{no:1,name:"jobs",kind:"message",T:Jo,repeated:!0}]),Jo=s.makeMessageType("viam.app.mltraining.v1.TrainingJobMetadata",()=>[{no:7,name:"id",kind:"scalar",T:9},{no:11,name:"dataset_id",kind:"scalar",T:9},{no:12,name:"organization_id",kind:"scalar",T:9},{no:13,name:"model_name",kind:"scalar",T:9},{no:14,name:"model_version",kind:"scalar",T:9},{no:15,name:"model_type",kind:"enum",T:s.getEnumType(je)},{no:17,name:"model_framework",kind:"enum",T:s.getEnumType(an)},{no:18,name:"is_custom_job",kind:"scalar",T:8},{no:19,name:"registry_item_id",kind:"scalar",T:9},{no:20,name:"registry_item_version",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:s.getEnumType(Ba)},{no:8,name:"error_status",kind:"message",T:ln},{no:3,name:"created_on",kind:"message",T:S},{no:4,name:"last_modified",kind:"message",T:S},{no:9,name:"training_started",kind:"message",T:S},{no:10,name:"training_ended",kind:"message",T:S},{no:5,name:"synced_model_id",kind:"scalar",T:9},{no:16,name:"tags",kind:"scalar",T:9,repeated:!0},{no:21,name:"arguments",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:22,name:"container_version",kind:"scalar",T:9}]),cg=s.makeMessageType("viam.app.mltraining.v1.CancelTrainingJobRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),dg=s.makeMessageType("viam.app.mltraining.v1.CancelTrainingJobResponse",[]),lg=s.makeMessageType("viam.app.mltraining.v1.DeleteCompletedTrainingJobRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),pg=s.makeMessageType("viam.app.mltraining.v1.DeleteCompletedTrainingJobResponse",[]),ug=s.makeMessageType("viam.app.mltraining.v1.TrainingJobLogEntry",()=>[{no:1,name:"level",kind:"scalar",T:9},{no:2,name:"time",kind:"message",T:S},{no:3,name:"message",kind:"scalar",T:9}]),gg=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobLogsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9,opt:!0}]),Tg=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobLogsResponse",()=>[{no:1,name:"logs",kind:"message",T:ug,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),kg=s.makeMessageType("viam.app.mltraining.v1.ListSupportedContainersRequest",[]),yg=s.makeMessageType("viam.app.mltraining.v1.ListSupportedContainersResponse",()=>[{no:1,name:"container_map",kind:"map",K:9,V:{kind:"message",T:vg}}]),vg=s.makeMessageType("viam.app.mltraining.v1.Container",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"uri",kind:"scalar",T:9},{no:3,name:"framework",kind:"scalar",T:9},{no:4,name:"description",kind:"scalar",T:9},{no:5,name:"eol",kind:"message",T:S}]),MS=Object.freeze(Object.defineProperty({__proto__:null,CancelTrainingJobRequest:cg,CancelTrainingJobResponse:dg,Container:vg,DeleteCompletedTrainingJobRequest:lg,DeleteCompletedTrainingJobResponse:pg,GetTrainingJobLogsRequest:gg,GetTrainingJobLogsResponse:Tg,GetTrainingJobRequest:og,GetTrainingJobResponse:ig,ListSupportedContainersRequest:kg,ListSupportedContainersResponse:yg,ListTrainingJobsRequest:rg,ListTrainingJobsResponse:mg,ModelFramework:an,ModelType:je,SubmitCustomTrainingJobRequest:tg,SubmitCustomTrainingJobResponse:sg,SubmitTrainingJobRequest:ng,SubmitTrainingJobResponse:ag,TrainingJobLogEntry:ug,TrainingJobMetadata:Jo,TrainingStatus:Ba},Symbol.toStringTag,{value:"Module"})),Fa=s.makeEnum("viam.app.v1.OnlineState",[{no:0,name:"ONLINE_STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"ONLINE_STATE_ONLINE",localName:"ONLINE"},{no:2,name:"ONLINE_STATE_OFFLINE",localName:"OFFLINE"},{no:3,name:"ONLINE_STATE_AWAITING_SETUP",localName:"AWAITING_SETUP"}]),hg=s.makeEnum("viam.app.v1.AuthenticationType",[{no:0,name:"AUTHENTICATION_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"AUTHENTICATION_TYPE_WEB_OAUTH",localName:"WEB_OAUTH"},{no:2,name:"AUTHENTICATION_TYPE_API_KEY",localName:"API_KEY"},{no:3,name:"AUTHENTICATION_TYPE_ROBOT_PART_SECRET",localName:"ROBOT_PART_SECRET"},{no:4,name:"AUTHENTICATION_TYPE_LOCATION_SECRET",localName:"LOCATION_SECRET"}]),Bn=s.makeEnum("viam.app.v1.FragmentVisibility",[{no:0,name:"FRAGMENT_VISIBILITY_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"FRAGMENT_VISIBILITY_PRIVATE",localName:"PRIVATE"},{no:2,name:"FRAGMENT_VISIBILITY_PUBLIC",localName:"PUBLIC"},{no:3,name:"FRAGMENT_VISIBILITY_PUBLIC_UNLISTED",localName:"PUBLIC_UNLISTED"}]),fg=s.makeEnum("viam.app.v1.FragmentErrorType",[{no:0,name:"FRAGMENT_ERROR_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"FRAGMENT_ERROR_TYPE_NO_ACCESS",localName:"NO_ACCESS"},{no:2,name:"FRAGMENT_ERROR_TYPE_NESTING_LIMIT_EXCEEDED",localName:"NESTING_LIMIT_EXCEEDED"},{no:3,name:"FRAGMENT_ERROR_TYPE_CHILD_ID_INVALID",localName:"CHILD_ID_INVALID"},{no:4,name:"FRAGMENT_ERROR_TYPE_CYCLE_DETECTED",localName:"CYCLE_DETECTED"}]),xa=s.makeEnum("viam.app.v1.ModuleSourceType",[{no:0,name:"MODULE_SOURCE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODULE_SOURCE_TYPE_EXTERNAL",localName:"EXTERNAL"},{no:2,name:"MODULE_SOURCE_TYPE_VIAM_HOSTED",localName:"VIAM_HOSTED"}]),Ja=s.makeEnum("viam.app.v1.ModuleLanguage",[{no:0,name:"MODULE_LANGUAGE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODULE_LANGUAGE_GOLANG",localName:"GOLANG"},{no:2,name:"MODULE_LANGUAGE_PYTHON",localName:"PYTHON"},{no:3,name:"MODULE_LANGUAGE_CPP",localName:"CPP"}]),Rg=s.makeEnum("viam.app.v1.RegistryItemStatus",[{no:0,name:"REGISTRY_ITEM_STATUS_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"REGISTRY_ITEM_STATUS_PUBLISHED",localName:"PUBLISHED"},{no:2,name:"REGISTRY_ITEM_STATUS_IN_DEVELOPMENT",localName:"IN_DEVELOPMENT"}]),Tn=s.makeEnum("viam.app.v1.Visibility",[{no:0,name:"VISIBILITY_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"VISIBILITY_PRIVATE",localName:"PRIVATE"},{no:2,name:"VISIBILITY_PUBLIC",localName:"PUBLIC"},{no:3,name:"VISIBILITY_PUBLIC_UNLISTED",localName:"PUBLIC_UNLISTED"}]),_g=s.makeEnum("viam.app.v1.AppType",[{no:0,name:"APP_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"APP_TYPE_SINGLE_MACHINE",localName:"SINGLE_MACHINE"},{no:2,name:"APP_TYPE_MULTI_MACHINE",localName:"MULTI_MACHINE"}]),Sg=s.makeEnum("viam.app.v1.ClientAuthentication",[{no:0,name:"CLIENT_AUTHENTICATION_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"CLIENT_AUTHENTICATION_REQUIRED",localName:"REQUIRED"},{no:2,name:"CLIENT_AUTHENTICATION_NOT_REQUIRED",localName:"NOT_REQUIRED"},{no:3,name:"CLIENT_AUTHENTICATION_NOT_REQUIRED_WHEN_USING_PKCE",localName:"NOT_REQUIRED_WHEN_USING_PKCE"}]),Ig=s.makeEnum("viam.app.v1.PKCE",[{no:0,name:"PKCE_UNSPECIFIED"},{no:1,name:"PKCE_REQUIRED"},{no:2,name:"PKCE_NOT_REQUIRED"},{no:3,name:"PKCE_NOT_REQUIRED_WHEN_USING_CLIENT_AUTHENTICATION"}]),Eg=s.makeEnum("viam.app.v1.URLValidation",[{no:0,name:"URL_VALIDATION_UNSPECIFIED"},{no:1,name:"URL_VALIDATION_EXACT_MATCH"},{no:2,name:"URL_VALIDATION_ALLOW_WILDCARDS"}]),Mg=s.makeEnum("viam.app.v1.EnabledGrant",[{no:0,name:"ENABLED_GRANT_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"ENABLED_GRANT_AUTHORIZATION_CODE",localName:"AUTHORIZATION_CODE"},{no:2,name:"ENABLED_GRANT_IMPLICIT",localName:"IMPLICIT"},{no:3,name:"ENABLED_GRANT_PASSWORD",localName:"PASSWORD"},{no:4,name:"ENABLED_GRANT_REFRESH_TOKEN",localName:"REFRESH_TOKEN"},{no:5,name:"ENABLED_GRANT_DEVICE_CODE",localName:"DEVICE_CODE"}]),kn=s.makeMessageType("viam.app.v1.Robot",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"location",kind:"scalar",T:9},{no:4,name:"last_access",kind:"message",T:S},{no:5,name:"created_on",kind:"message",T:S},{no:6,name:"online_state",kind:"enum",T:s.getEnumType(Fa)},{no:7,name:"seconds_since_online",kind:"scalar",T:3}]),tn=s.makeMessageType("viam.app.v1.RobotPart",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:10,name:"dns_name",kind:"scalar",T:9},{no:3,name:"secret",kind:"scalar",T:9},{no:4,name:"robot",kind:"scalar",T:9},{no:12,name:"location_id",kind:"scalar",T:9},{no:5,name:"robot_config",kind:"message",T:p},{no:6,name:"last_access",kind:"message",T:S},{no:7,name:"user_supplied_info",kind:"message",T:p},{no:8,name:"main_part",kind:"scalar",T:8},{no:9,name:"fqdn",kind:"scalar",T:9},{no:11,name:"local_fqdn",kind:"scalar",T:9},{no:13,name:"created_on",kind:"message",T:S},{no:14,name:"secrets",kind:"message",T:Yo,repeated:!0},{no:15,name:"last_updated",kind:"message",T:S},{no:16,name:"online_state",kind:"enum",T:s.getEnumType(Fa)},{no:17,name:"seconds_since_online",kind:"scalar",T:3}]),bg=s.makeMessageType("viam.app.v1.RobotPartHistoryEntry",()=>[{no:1,name:"part",kind:"scalar",T:9},{no:2,name:"robot",kind:"scalar",T:9},{no:3,name:"when",kind:"message",T:S},{no:4,name:"old",kind:"message",T:tn},{no:5,name:"edited_by",kind:"message",T:zo}]),zo=s.makeMessageType("viam.app.v1.AuthenticatorInfo",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(hg)},{no:2,name:"value",kind:"scalar",T:9},{no:3,name:"is_deactivated",kind:"scalar",T:8}]),Og=s.makeMessageType("viam.app.v1.ListOrganizationsRequest",[]),yn=s.makeMessageType("viam.app.v1.Organization",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"created_on",kind:"message",T:S},{no:4,name:"public_namespace",kind:"scalar",T:9},{no:5,name:"default_region",kind:"scalar",T:9},{no:6,name:"cid",kind:"scalar",T:9,opt:!0},{no:7,name:"default_fragments",kind:"message",T:Vo,opt:!0}]),wg=s.makeMessageType("viam.app.v1.OrganizationMember",()=>[{no:1,name:"user_id",kind:"scalar",T:9},{no:2,name:"emails",kind:"scalar",T:9,repeated:!0},{no:3,name:"date_added",kind:"message",T:S},{no:4,name:"last_login",kind:"message",T:S,opt:!0},{no:5,name:"last_access",kind:"message",T:S,opt:!0}]),Cg=s.makeMessageType("viam.app.v1.ListOrganizationsResponse",()=>[{no:1,name:"organizations",kind:"message",T:yn,repeated:!0}]),Fn=s.makeMessageType("viam.app.v1.OrganizationInvite",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"created_on",kind:"message",T:S},{no:4,name:"authorizations",kind:"message",T:Q,repeated:!0}]),Ng=s.makeMessageType("viam.app.v1.CreateOrganizationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Pg=s.makeMessageType("viam.app.v1.CreateOrganizationResponse",()=>[{no:1,name:"organization",kind:"message",T:yn}]),Dg=s.makeMessageType("viam.app.v1.GetOrganizationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),Ag=s.makeMessageType("viam.app.v1.GetOrganizationResponse",()=>[{no:1,name:"organization",kind:"message",T:yn}]),Ug=s.makeMessageType("viam.app.v1.GetOrganizationNamespaceAvailabilityRequest",()=>[{no:1,name:"public_namespace",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),qg=s.makeMessageType("viam.app.v1.GetOrganizationNamespaceAvailabilityResponse",()=>[{no:1,name:"available",kind:"scalar",T:8}]),Vo=s.makeMessageType("viam.app.v1.FragmentImportList",()=>[{no:1,name:"fragments",kind:"message",T:Ek,repeated:!0}]),Lg=s.makeMessageType("viam.app.v1.UpdateOrganizationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"public_namespace",kind:"scalar",T:9,opt:!0},{no:4,name:"region",kind:"scalar",T:9,opt:!0},{no:5,name:"cid",kind:"scalar",T:9,opt:!0},{no:6,name:"default_fragments",kind:"message",T:Vo,opt:!0}]),Gg=s.makeMessageType("viam.app.v1.UpdateOrganizationResponse",()=>[{no:1,name:"organization",kind:"message",T:yn}]),Bg=s.makeMessageType("viam.app.v1.UpdateOrganizationNamespaceRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"new_public_namespace",kind:"scalar",T:9}]),Fg=s.makeMessageType("viam.app.v1.UpdateOrganizationNamespaceResponse",()=>[{no:1,name:"organization",kind:"message",T:yn}]),xg=s.makeMessageType("viam.app.v1.DeleteOrganizationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),Jg=s.makeMessageType("viam.app.v1.DeleteOrganizationResponse",[]),zg=s.makeMessageType("viam.app.v1.GetOrganizationMetadataRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),Vg=s.makeMessageType("viam.app.v1.GetOrganizationMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),$g=s.makeMessageType("viam.app.v1.UpdateOrganizationMetadataRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),Yg=s.makeMessageType("viam.app.v1.UpdateOrganizationMetadataResponse",[]),Wg=s.makeMessageType("viam.app.v1.ListOrganizationMembersRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),jg=s.makeMessageType("viam.app.v1.ListOrganizationMembersResponse",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"members",kind:"message",T:wg,repeated:!0},{no:3,name:"invites",kind:"message",T:Fn,repeated:!0}]),Hg=s.makeMessageType("viam.app.v1.CreateOrganizationInviteRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"authorizations",kind:"message",T:Q,repeated:!0},{no:4,name:"send_email_invite",kind:"scalar",T:8,opt:!0}]),Kg=s.makeMessageType("viam.app.v1.CreateOrganizationInviteResponse",()=>[{no:1,name:"invite",kind:"message",T:Fn}]),Xg=s.makeMessageType("viam.app.v1.UpdateOrganizationInviteAuthorizationsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"add_authorizations",kind:"message",T:Q,repeated:!0},{no:4,name:"remove_authorizations",kind:"message",T:Q,repeated:!0}]),Qg=s.makeMessageType("viam.app.v1.UpdateOrganizationInviteAuthorizationsResponse",()=>[{no:1,name:"invite",kind:"message",T:Fn}]),Zg=s.makeMessageType("viam.app.v1.DeleteOrganizationInviteRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9}]),eT=s.makeMessageType("viam.app.v1.DeleteOrganizationInviteResponse",[]),nT=s.makeMessageType("viam.app.v1.ResendOrganizationInviteRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"send_email_invite",kind:"scalar",T:8,opt:!0}]),aT=s.makeMessageType("viam.app.v1.ResendOrganizationInviteResponse",()=>[{no:1,name:"invite",kind:"message",T:Fn}]),tT=s.makeMessageType("viam.app.v1.DeleteOrganizationMemberRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9}]),sT=s.makeMessageType("viam.app.v1.DeleteOrganizationMemberResponse",[]),za=s.makeMessageType("viam.app.v1.BillingAddress",()=>[{no:1,name:"address_line_1",kind:"scalar",T:9},{no:2,name:"address_line_2",kind:"scalar",T:9,opt:!0},{no:3,name:"city",kind:"scalar",T:9},{no:4,name:"state",kind:"scalar",T:9},{no:5,name:"zipcode",kind:"scalar",T:9},{no:6,name:"country",kind:"scalar",T:9}]),oT=s.makeMessageType("viam.app.v1.EnableBillingServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"billing_address",kind:"message",T:za}]),iT=s.makeMessageType("viam.app.v1.EnableBillingServiceResponse",[]),rT=s.makeMessageType("viam.app.v1.UpdateBillingServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"billing_address",kind:"message",T:za}]),mT=s.makeMessageType("viam.app.v1.UpdateBillingServiceResponse",[]),cT=s.makeMessageType("viam.app.v1.GetBillingServiceConfigRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),dT=s.makeMessageType("viam.app.v1.GetBillingServiceConfigResponse",()=>[{no:1,name:"billing_address",kind:"message",T:za},{no:2,name:"support_email",kind:"scalar",T:9},{no:3,name:"logo_url",kind:"scalar",T:9},{no:4,name:"billing_dashboard_url",kind:"scalar",T:9}]),lT=s.makeMessageType("viam.app.v1.DisableBillingServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),pT=s.makeMessageType("viam.app.v1.DisableBillingServiceResponse",[]),uT=s.makeMessageType("viam.app.v1.OrganizationSetSupportEmailRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9}]),gT=s.makeMessageType("viam.app.v1.OrganizationSetSupportEmailResponse",[]),TT=s.makeMessageType("viam.app.v1.OrganizationGetSupportEmailRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),kT=s.makeMessageType("viam.app.v1.OrganizationGetSupportEmailResponse",()=>[{no:1,name:"email",kind:"scalar",T:9}]),$o=s.makeMessageType("viam.app.v1.OrganizationIdentity",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),yT=s.makeMessageType("viam.app.v1.LocationOrganization",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"primary",kind:"scalar",T:8}]),Va=s.makeMessageType("viam.app.v1.LocationAuth",()=>[{no:1,name:"secret",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9},{no:3,name:"secrets",kind:"message",T:Yo,repeated:!0}]),vT=s.makeMessageType("viam.app.v1.StorageConfig",()=>[{no:1,name:"region",kind:"scalar",T:9}]),xn=s.makeMessageType("viam.app.v1.Location",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:4,name:"parent_location_id",kind:"scalar",T:9},{no:5,name:"auth",kind:"message",T:Va},{no:6,name:"organizations",kind:"message",T:yT,repeated:!0},{no:3,name:"created_on",kind:"message",T:S},{no:7,name:"robot_count",kind:"scalar",T:5},{no:8,name:"config",kind:"message",T:vT},{no:9,name:"primary_org_identity",kind:"message",T:$o,opt:!0}]),Yo=s.makeMessageType("viam.app.v1.SharedSecret",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"secret",kind:"scalar",T:9},{no:3,name:"created_on",kind:"message",T:S},{no:4,name:"state",kind:"enum",T:s.getEnumType(hT)}]),hT=s.makeEnum("viam.app.v1.SharedSecret.State",[{no:0,name:"STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"STATE_ENABLED",localName:"ENABLED"},{no:2,name:"STATE_DISABLED",localName:"DISABLED"}]),fT=s.makeMessageType("viam.app.v1.CreateLocationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"parent_location_id",kind:"scalar",T:9,opt:!0}]),RT=s.makeMessageType("viam.app.v1.CreateLocationResponse",()=>[{no:1,name:"location",kind:"message",T:xn}]),_T=s.makeMessageType("viam.app.v1.GetLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),ST=s.makeMessageType("viam.app.v1.GetLocationResponse",()=>[{no:1,name:"location",kind:"message",T:xn}]),IT=s.makeMessageType("viam.app.v1.UpdateLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"parent_location_id",kind:"scalar",T:9,opt:!0},{no:4,name:"region",kind:"scalar",T:9,opt:!0}]),ET=s.makeMessageType("viam.app.v1.UpdateLocationResponse",()=>[{no:1,name:"location",kind:"message",T:xn}]),MT=s.makeMessageType("viam.app.v1.DeleteLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),bT=s.makeMessageType("viam.app.v1.DeleteLocationResponse",[]),OT=s.makeMessageType("viam.app.v1.GetLocationMetadataRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),wT=s.makeMessageType("viam.app.v1.GetLocationMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),CT=s.makeMessageType("viam.app.v1.UpdateLocationMetadataRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),NT=s.makeMessageType("viam.app.v1.UpdateLocationMetadataResponse",[]),PT=s.makeMessageType("viam.app.v1.GetOrganizationsWithAccessToLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),DT=s.makeMessageType("viam.app.v1.GetOrganizationsWithAccessToLocationResponse",()=>[{no:1,name:"organization_identities",kind:"message",T:$o,repeated:!0}]),AT=s.makeMessageType("viam.app.v1.ListLocationsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),UT=s.makeMessageType("viam.app.v1.ShareLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),qT=s.makeMessageType("viam.app.v1.ShareLocationResponse",[]),LT=s.makeMessageType("viam.app.v1.UnshareLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),GT=s.makeMessageType("viam.app.v1.UnshareLocationResponse",[]),BT=s.makeMessageType("viam.app.v1.ListLocationsResponse",()=>[{no:1,name:"locations",kind:"message",T:xn,repeated:!0}]),FT=s.makeMessageType("viam.app.v1.CreateLocationSecretRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),xT=s.makeMessageType("viam.app.v1.CreateLocationSecretResponse",()=>[{no:1,name:"auth",kind:"message",T:Va}]),JT=s.makeMessageType("viam.app.v1.DeleteLocationSecretRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"secret_id",kind:"scalar",T:9}]),zT=s.makeMessageType("viam.app.v1.DeleteLocationSecretResponse",[]),VT=s.makeMessageType("viam.app.v1.LocationAuthRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),$T=s.makeMessageType("viam.app.v1.LocationAuthResponse",()=>[{no:1,name:"auth",kind:"message",T:Va}]),YT=s.makeMessageType("viam.app.v1.GetRobotRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),WT=s.makeMessageType("viam.app.v1.GetRoverRentalRobotsRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),jT=s.makeMessageType("viam.app.v1.RoverRentalRobot",()=>[{no:1,name:"robot_id",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9},{no:3,name:"robot_name",kind:"scalar",T:9},{no:4,name:"robot_main_part_id",kind:"scalar",T:9}]),HT=s.makeMessageType("viam.app.v1.GetRoverRentalRobotsResponse",()=>[{no:1,name:"robots",kind:"message",T:jT,repeated:!0}]),KT=s.makeMessageType("viam.app.v1.GetRobotResponse",()=>[{no:1,name:"robot",kind:"message",T:kn}]),XT=s.makeMessageType("viam.app.v1.GetRobotPartsRequest",()=>[{no:1,name:"robot_id",kind:"scalar",T:9}]),QT=s.makeMessageType("viam.app.v1.GetRobotPartsResponse",()=>[{no:1,name:"parts",kind:"message",T:tn,repeated:!0}]),ZT=s.makeMessageType("viam.app.v1.GetRobotPartRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ek=s.makeMessageType("viam.app.v1.GetRobotPartResponse",()=>[{no:1,name:"part",kind:"message",T:tn},{no:2,name:"config_json",kind:"scalar",T:9}]),nk=s.makeMessageType("viam.app.v1.GetRobotPartByNameAndLocationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9}]),ak=s.makeMessageType("viam.app.v1.GetRobotPartByNameAndLocationResponse",()=>[{no:1,name:"part",kind:"message",T:tn}]),tk=s.makeMessageType("viam.app.v1.GetRobotPartLogsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"errors_only",kind:"scalar",T:8},{no:3,name:"filter",kind:"scalar",T:9,opt:!0},{no:4,name:"page_token",kind:"scalar",T:9,opt:!0},{no:5,name:"levels",kind:"scalar",T:9,repeated:!0},{no:6,name:"start",kind:"message",T:S,opt:!0},{no:7,name:"end",kind:"message",T:S,opt:!0},{no:8,name:"limit",kind:"scalar",T:3,opt:!0},{no:9,name:"source",kind:"scalar",T:9,opt:!0},{no:10,name:"user_facing_only",kind:"scalar",T:8,opt:!0}]),sk=s.makeMessageType("viam.app.v1.GetRobotPartLogsResponse",()=>[{no:1,name:"logs",kind:"message",T:Pn,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),ok=s.makeMessageType("viam.app.v1.TailRobotPartLogsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"errors_only",kind:"scalar",T:8},{no:3,name:"filter",kind:"scalar",T:9,opt:!0}]),ik=s.makeMessageType("viam.app.v1.TailRobotPartLogsResponse",()=>[{no:1,name:"logs",kind:"message",T:Pn,repeated:!0}]),rk=s.makeMessageType("viam.app.v1.GetRobotPartHistoryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),mk=s.makeMessageType("viam.app.v1.GetRobotPartHistoryResponse",()=>[{no:1,name:"history",kind:"message",T:bg,repeated:!0}]),ck=s.makeMessageType("viam.app.v1.UpdateRobotPartRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"robot_config",kind:"message",T:p},{no:4,name:"last_known_update",kind:"message",T:S,opt:!0}]),dk=s.makeMessageType("viam.app.v1.UpdateRobotPartResponse",()=>[{no:1,name:"part",kind:"message",T:tn}]),lk=s.makeMessageType("viam.app.v1.NewRobotPartRequest",()=>[{no:1,name:"robot_id",kind:"scalar",T:9},{no:2,name:"part_name",kind:"scalar",T:9}]),pk=s.makeMessageType("viam.app.v1.NewRobotPartResponse",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),uk=s.makeMessageType("viam.app.v1.DeleteRobotPartRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),gk=s.makeMessageType("viam.app.v1.GetRobotPartMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Tk=s.makeMessageType("viam.app.v1.GetRobotPartMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),kk=s.makeMessageType("viam.app.v1.UpdateRobotPartMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),yk=s.makeMessageType("viam.app.v1.UpdateRobotPartMetadataResponse",[]),vk=s.makeMessageType("viam.app.v1.GetRobotAPIKeysRequest",()=>[{no:1,name:"robot_id",kind:"scalar",T:9}]),hk=s.makeMessageType("viam.app.v1.APIKey",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"created_on",kind:"message",T:S}]),fk=s.makeMessageType("viam.app.v1.GetRobotAPIKeysResponse",()=>[{no:1,name:"api_keys",kind:"message",T:ei,repeated:!0}]),Rk=s.makeMessageType("viam.app.v1.DeleteRobotPartResponse",[]),He=s.makeMessageType("viam.app.v1.Fragment",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"fragment",kind:"message",T:p},{no:4,name:"organization_owner",kind:"scalar",T:9},{no:5,name:"public",kind:"scalar",T:8},{no:6,name:"created_on",kind:"message",T:S},{no:7,name:"organization_name",kind:"scalar",T:9},{no:9,name:"robot_part_count",kind:"scalar",T:5},{no:10,name:"organization_count",kind:"scalar",T:5},{no:11,name:"only_used_by_owner",kind:"scalar",T:8},{no:12,name:"visibility",kind:"enum",T:s.getEnumType(Bn)},{no:13,name:"last_updated",kind:"message",T:S},{no:14,name:"revision",kind:"scalar",T:9}]),_k=s.makeMessageType("viam.app.v1.FragmentHistoryEntry",()=>[{no:1,name:"fragment",kind:"scalar",T:9},{no:2,name:"edited_on",kind:"message",T:S},{no:3,name:"old",kind:"message",T:He},{no:4,name:"edited_by",kind:"message",T:zo},{no:5,name:"revision",kind:"scalar",T:9},{no:6,name:"config",kind:"message",T:p}]),Sk=s.makeMessageType("viam.app.v1.FragmentRevision",()=>[{no:1,name:"revision",kind:"scalar",T:9},{no:2,name:"created_at",kind:"message",T:S}]),$a=s.makeMessageType("viam.app.v1.FragmentTag",()=>[{no:1,name:"tag",kind:"scalar",T:9},{no:2,name:"revision",kind:"scalar",T:9}]),Ik=s.makeMessageType("viam.app.v1.FragmentError",()=>[{no:1,name:"error_type",kind:"enum",T:s.getEnumType(fg)},{no:2,name:"fragment_id",kind:"scalar",T:9},{no:3,name:"detail",kind:"scalar",T:9}]),Ya=s.makeMessageType("viam.app.v1.FragmentUsage",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"organizations",kind:"scalar",T:5},{no:3,name:"machines",kind:"scalar",T:5},{no:4,name:"machines_in_current_org",kind:"scalar",T:5},{no:5,name:"version",kind:"scalar",T:9,opt:!0}]),Ek=s.makeMessageType("viam.app.v1.FragmentImport",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"prefix",kind:"scalar",T:9,opt:!0},{no:4,name:"variables",kind:"map",K:9,V:{kind:"scalar",T:9}}]),Wo=s.makeMessageType("viam.app.v1.ResolvedFragment",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"resolved_config",kind:"message",T:p},{no:3,name:"error",kind:"message",T:Ik},{no:4,name:"revision",kind:"scalar",T:9}]),Mk=s.makeMessageType("viam.app.v1.ListFragmentsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"show_public",kind:"scalar",T:8},{no:3,name:"fragment_visibility",kind:"enum",T:s.getEnumType(Bn),repeated:!0}]),bk=s.makeMessageType("viam.app.v1.ListFragmentsResponse",()=>[{no:1,name:"fragments",kind:"message",T:He,repeated:!0},{no:2,name:"fragment_usages",kind:"message",T:Ya,repeated:!0}]),Ok=s.makeMessageType("viam.app.v1.GetFragmentRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"current_organization_id",kind:"scalar",T:9},{no:3,name:"version",kind:"scalar",T:9,opt:!0}]),wk=s.makeMessageType("viam.app.v1.GetFragmentResponse",()=>[{no:1,name:"fragment",kind:"message",T:He},{no:2,name:"fragment_usage",kind:"message",T:Ya},{no:3,name:"revisions",kind:"message",T:Sk,repeated:!0},{no:4,name:"tags",kind:"message",T:$a,repeated:!0}]),Ck=s.makeMessageType("viam.app.v1.CreateFragmentRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"config",kind:"message",T:p},{no:3,name:"organization_id",kind:"scalar",T:9},{no:4,name:"visibility",kind:"enum",T:s.getEnumType(Bn),opt:!0}]),Nk=s.makeMessageType("viam.app.v1.CreateFragmentResponse",()=>[{no:1,name:"fragment",kind:"message",T:He}]),Pk=s.makeMessageType("viam.app.v1.UpdateFragmentRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"config",kind:"message",T:p},{no:4,name:"public",kind:"scalar",T:8,opt:!0},{no:5,name:"visibility",kind:"enum",T:s.getEnumType(Bn),opt:!0},{no:6,name:"last_known_update",kind:"message",T:S,opt:!0}]),Dk=s.makeMessageType("viam.app.v1.UpdateFragmentResponse",()=>[{no:1,name:"fragment",kind:"message",T:He}]),Ak=s.makeMessageType("viam.app.v1.DeleteFragmentRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Uk=s.makeMessageType("viam.app.v1.DeleteFragmentResponse",[]),qk=s.makeMessageType("viam.app.v1.GetFragmentHistoryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9,opt:!0},{no:3,name:"page_limit",kind:"scalar",T:3,opt:!0}]),Lk=s.makeMessageType("viam.app.v1.GetFragmentHistoryResponse",()=>[{no:1,name:"history",kind:"message",T:_k,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),Gk=s.makeMessageType("viam.app.v1.GetFragmentUsageRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9}]),Bk=s.makeMessageType("viam.app.v1.GetFragmentUsageResponse",()=>[{no:1,name:"version_usages",kind:"message",T:Ya,repeated:!0}]),Fk=s.makeMessageType("viam.app.v1.SetFragmentTagRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"tag",kind:"scalar",T:9},{no:3,name:"revision",kind:"scalar",T:9}]),xk=s.makeMessageType("viam.app.v1.SetFragmentTagResponse",()=>[{no:1,name:"tags",kind:"message",T:$a,repeated:!0}]),Jk=s.makeMessageType("viam.app.v1.DeleteFragmentTagRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"tag",kind:"scalar",T:9}]),zk=s.makeMessageType("viam.app.v1.DeleteFragmentTagResponse",()=>[{no:1,name:"tags",kind:"message",T:$a,repeated:!0}]),Vk=s.makeMessageType("viam.app.v1.ListRobotsRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),$k=s.makeMessageType("viam.app.v1.ListRobotsForLocationsRequest",()=>[{no:1,name:"location_ids",kind:"scalar",T:9,repeated:!0}]),Yk=s.makeMessageType("viam.app.v1.ListRobotsForOrgRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),jo=s.makeMessageType("viam.app.v1.AdditionalFragment",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9,opt:!0}]),Wk=s.makeMessageType("viam.app.v1.ListNestedFragmentsRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9,opt:!0},{no:2,name:"additional_fragments",kind:"message",T:jo,repeated:!0}]),jk=s.makeMessageType("viam.app.v1.ListNestedFragmentsResponse",()=>[{no:1,name:"fragments",kind:"message",T:He,repeated:!0},{no:2,name:"resolved_fragments",kind:"message",T:Wo,repeated:!0}]),Hk=s.makeMessageType("viam.app.v1.ListMachineFragmentsRequest",()=>[{no:1,name:"machine_id",kind:"scalar",T:9},{no:2,name:"additional_fragment_ids",kind:"scalar",T:9,repeated:!0},{no:3,name:"additional_fragments",kind:"message",T:jo,repeated:!0}]),Kk=s.makeMessageType("viam.app.v1.ListMachineFragmentsResponse",()=>[{no:1,name:"fragments",kind:"message",T:He,repeated:!0},{no:2,name:"resolved_fragments",kind:"message",T:Wo,repeated:!0}]),Ho=s.makeMessageType("viam.app.v1.ListMachineSummariesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"fragment_ids",kind:"scalar",T:9,repeated:!0},{no:3,name:"location_ids",kind:"scalar",T:9,repeated:!0},{no:4,name:"limit",kind:"scalar",T:5,opt:!0}]),Xk=s.makeMessageType("viam.app.v1.ListMachineSummariesResponse",()=>[{no:1,name:"location_summaries",kind:"message",T:Qk,repeated:!0}]),Qk=s.makeMessageType("viam.app.v1.LocationSummary",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"location_name",kind:"scalar",T:9},{no:3,name:"machine_summaries",kind:"message",T:Zk,repeated:!0}]),Zk=s.makeMessageType("viam.app.v1.MachineSummary",()=>[{no:1,name:"machine_id",kind:"scalar",T:9},{no:2,name:"machine_name",kind:"scalar",T:9},{no:3,name:"part_summaries",kind:"message",T:ty,repeated:!0}]),ey=s.makeMessageType("viam.app.v1.FragmentSummary",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9}]),ny=s.makeMessageType("viam.app.v1.ViamServerVersion",()=>[{no:1,name:"major",kind:"scalar",T:9,oneof:"version"},{no:2,name:"minor",kind:"scalar",T:9,oneof:"version"}]),ay=s.makeMessageType("viam.app.v1.ViamAgentVersion",()=>[{no:1,name:"major",kind:"scalar",T:9,oneof:"version"},{no:2,name:"minor",kind:"scalar",T:9,oneof:"version"}]),ty=s.makeMessageType("viam.app.v1.PartSummary",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"part_name",kind:"scalar",T:9},{no:11,name:"is_main_part",kind:"scalar",T:8},{no:12,name:"online_state",kind:"enum",T:s.getEnumType(Fa)},{no:13,name:"seconds_since_online",kind:"scalar",T:3},{no:14,name:"last_access",kind:"message",T:S,opt:!0},{no:3,name:"last_online",kind:"message",T:S,opt:!0},{no:4,name:"viam_server_version",kind:"message",T:ny,opt:!0},{no:5,name:"viam_agent_version",kind:"message",T:ay,opt:!0},{no:6,name:"os",kind:"scalar",T:9,opt:!0},{no:7,name:"platform",kind:"scalar",T:9,opt:!0},{no:8,name:"public_ip_address",kind:"scalar",T:9,opt:!0},{no:10,name:"dns_name",kind:"scalar",T:9,opt:!0},{no:9,name:"fragments",kind:"message",T:ey,repeated:!0}]),sy=s.makeMessageType("viam.app.v1.ListRobotsResponse",()=>[{no:1,name:"robots",kind:"message",T:kn,repeated:!0}]),oy=s.makeMessageType("viam.app.v1.ListRobotsForLocationsResponse",()=>[{no:1,name:"robots",kind:"message",T:kn,repeated:!0}]),iy=s.makeMessageType("viam.app.v1.ListRobotsForOrgResponse",()=>[{no:1,name:"robots",kind:"message",T:kn,repeated:!0}]),ry=s.makeMessageType("viam.app.v1.NewRobotRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"location",kind:"scalar",T:9}]),my=s.makeMessageType("viam.app.v1.NewRobotResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),cy=s.makeMessageType("viam.app.v1.UpdateRobotRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"location",kind:"scalar",T:9}]),dy=s.makeMessageType("viam.app.v1.UpdateRobotResponse",()=>[{no:1,name:"robot",kind:"message",T:kn}]),ly=s.makeMessageType("viam.app.v1.DeleteRobotRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),py=s.makeMessageType("viam.app.v1.DeleteRobotResponse",[]),uy=s.makeMessageType("viam.app.v1.GetRobotMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),gy=s.makeMessageType("viam.app.v1.GetRobotMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),Ty=s.makeMessageType("viam.app.v1.UpdateRobotMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),ky=s.makeMessageType("viam.app.v1.UpdateRobotMetadataResponse",[]),yy=s.makeMessageType("viam.app.v1.MarkPartAsMainRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),vy=s.makeMessageType("viam.app.v1.MarkPartAsMainResponse",[]),hy=s.makeMessageType("viam.app.v1.MarkPartForRestartRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),fy=s.makeMessageType("viam.app.v1.MarkPartForRestartResponse",[]),Ry=s.makeMessageType("viam.app.v1.CreateRobotPartSecretRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),_y=s.makeMessageType("viam.app.v1.CreateRobotPartSecretResponse",()=>[{no:1,name:"part",kind:"message",T:tn}]),Sy=s.makeMessageType("viam.app.v1.DeleteRobotPartSecretRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"secret_id",kind:"scalar",T:9}]),Iy=s.makeMessageType("viam.app.v1.DeleteRobotPartSecretResponse",[]),Q=s.makeMessageType("viam.app.v1.Authorization",()=>[{no:1,name:"authorization_type",kind:"scalar",T:9},{no:2,name:"authorization_id",kind:"scalar",T:9},{no:3,name:"resource_type",kind:"scalar",T:9},{no:4,name:"resource_id",kind:"scalar",T:9},{no:5,name:"identity_id",kind:"scalar",T:9},{no:6,name:"organization_id",kind:"scalar",T:9},{no:7,name:"identity_type",kind:"scalar",T:9}]),Ey=s.makeMessageType("viam.app.v1.AddRoleRequest",()=>[{no:1,name:"authorization",kind:"message",T:Q}]),My=s.makeMessageType("viam.app.v1.AddRoleResponse",[]),by=s.makeMessageType("viam.app.v1.RemoveRoleRequest",()=>[{no:1,name:"authorization",kind:"message",T:Q}]),Oy=s.makeMessageType("viam.app.v1.RemoveRoleResponse",[]),wy=s.makeMessageType("viam.app.v1.ChangeRoleRequest",()=>[{no:1,name:"old_authorization",kind:"message",T:Q},{no:2,name:"new_authorization",kind:"message",T:Q}]),Cy=s.makeMessageType("viam.app.v1.ChangeRoleResponse",[]),Ny=s.makeMessageType("viam.app.v1.ListAuthorizationsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"resource_ids",kind:"scalar",T:9,repeated:!0}]),Py=s.makeMessageType("viam.app.v1.ListAuthorizationsResponse",()=>[{no:1,name:"authorizations",kind:"message",T:Q,repeated:!0}]),Dy=s.makeMessageType("viam.app.v1.CheckPermissionsRequest",()=>[{no:1,name:"permissions",kind:"message",T:Ko,repeated:!0}]),Ko=s.makeMessageType("viam.app.v1.AuthorizedPermissions",()=>[{no:1,name:"resource_type",kind:"scalar",T:9},{no:2,name:"resource_id",kind:"scalar",T:9},{no:3,name:"permissions",kind:"scalar",T:9,repeated:!0}]),Ay=s.makeMessageType("viam.app.v1.CheckPermissionsResponse",()=>[{no:1,name:"authorized_permissions",kind:"message",T:Ko,repeated:!0}]),Uy=s.makeMessageType("viam.app.v1.ModuleVersion",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"files",kind:"message",T:Qo,repeated:!0},{no:3,name:"models",kind:"message",T:on,repeated:!0},{no:4,name:"entrypoint",kind:"scalar",T:9},{no:5,name:"first_run",kind:"scalar",T:9,opt:!0},{no:6,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:7,name:"apps",kind:"message",T:sn,repeated:!0}]),qy=s.makeMessageType("viam.app.v1.ModuleMetadata",()=>[{no:1,name:"models",kind:"message",T:on,repeated:!0},{no:2,name:"versions",kind:"message",T:Uy,repeated:!0},{no:3,name:"entrypoint",kind:"scalar",T:9},{no:4,name:"first_run",kind:"scalar",T:9,opt:!0},{no:5,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:6,name:"apps",kind:"message",T:sn,repeated:!0},{no:7,name:"source_type",kind:"enum",T:s.getEnumType(xa),opt:!0},{no:8,name:"language",kind:"enum",T:s.getEnumType(Ja),opt:!0}]),Ly=s.makeMessageType("viam.app.v1.MLModelVersion",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"created_on",kind:"message",T:S}]),Gy=s.makeMessageType("viam.app.v1.MLModelMetadata",()=>[{no:1,name:"versions",kind:"scalar",T:9,repeated:!0},{no:2,name:"model_type",kind:"enum",T:s.getEnumType(je)},{no:3,name:"model_framework",kind:"enum",T:s.getEnumType(an)},{no:4,name:"detailed_versions",kind:"message",T:Ly,repeated:!0}]),By=s.makeMessageType("viam.app.v1.MLTrainingVersion",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"created_on",kind:"message",T:S}]),Fy=s.makeMessageType("viam.app.v1.MLTrainingMetadata",()=>[{no:5,name:"versions",kind:"message",T:By,repeated:!0},{no:2,name:"model_type",kind:"enum",T:s.getEnumType(je)},{no:3,name:"model_framework",kind:"enum",T:s.getEnumType(an)},{no:4,name:"draft",kind:"scalar",T:8}]),Wa=s.makeMessageType("viam.app.v1.RegistryItem",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"public_namespace",kind:"scalar",T:9},{no:4,name:"name",kind:"scalar",T:9},{no:5,name:"type",kind:"enum",T:s.getEnumType(Ga)},{no:6,name:"visibility",kind:"enum",T:s.getEnumType(Tn)},{no:7,name:"url",kind:"scalar",T:9},{no:8,name:"description",kind:"scalar",T:9},{no:9,name:"total_robot_usage",kind:"scalar",T:3},{no:13,name:"total_external_robot_usage",kind:"scalar",T:3},{no:10,name:"total_organization_usage",kind:"scalar",T:3},{no:14,name:"total_external_organization_usage",kind:"scalar",T:3},{no:11,name:"module_metadata",kind:"message",T:qy,oneof:"metadata"},{no:12,name:"ml_model_metadata",kind:"message",T:Gy,oneof:"metadata"},{no:18,name:"ml_training_metadata",kind:"message",T:Fy,oneof:"metadata"},{no:15,name:"created_at",kind:"message",T:S},{no:16,name:"updated_at",kind:"message",T:S}]),xy=s.makeMessageType("viam.app.v1.GetRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0}]),Jy=s.makeMessageType("viam.app.v1.GetRegistryItemResponse",()=>[{no:1,name:"item",kind:"message",T:Wa}]),zy=s.makeMessageType("viam.app.v1.CreateRegistryItemRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"type",kind:"enum",T:s.getEnumType(Ga)}]),Vy=s.makeMessageType("viam.app.v1.CreateRegistryItemResponse",[]),$y=s.makeMessageType("viam.app.v1.UpdateRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:s.getEnumType(Ga)},{no:3,name:"description",kind:"scalar",T:9},{no:4,name:"visibility",kind:"enum",T:s.getEnumType(Tn)},{no:5,name:"url",kind:"scalar",T:9,opt:!0},{no:6,name:"update_module_metadata",kind:"message",T:ov,oneof:"metadata"},{no:7,name:"update_ml_model_metadata",kind:"message",T:iv,oneof:"metadata"},{no:8,name:"update_ml_training_metadata",kind:"message",T:rv,oneof:"metadata"},{no:9,name:"markdown_description",kind:"scalar",T:9,opt:!0}]),Yy=s.makeMessageType("viam.app.v1.UpdateRegistryItemResponse",[]),Wy=s.makeMessageType("viam.app.v1.ListRegistryItemsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9,opt:!0},{no:2,name:"types",kind:"enum",T:s.getEnumType(Ga),repeated:!0},{no:3,name:"visibilities",kind:"enum",T:s.getEnumType(Tn),repeated:!0},{no:4,name:"platforms",kind:"scalar",T:9,repeated:!0},{no:5,name:"statuses",kind:"enum",T:s.getEnumType(Rg),repeated:!0},{no:6,name:"search_term",kind:"scalar",T:9,opt:!0},{no:7,name:"page_token",kind:"scalar",T:9,opt:!0},{no:8,name:"public_namespaces",kind:"scalar",T:9,repeated:!0},{no:9,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0},{no:10,name:"module_source_types",kind:"enum",T:s.getEnumType(xa),repeated:!0},{no:11,name:"module_languages",kind:"enum",T:s.getEnumType(Ja),repeated:!0}]),jy=s.makeMessageType("viam.app.v1.ListRegistryItemsResponse",()=>[{no:1,name:"items",kind:"message",T:Wa,repeated:!0}]),Hy=s.makeMessageType("viam.app.v1.DeleteRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9}]),Ky=s.makeMessageType("viam.app.v1.DeleteRegistryItemResponse",[]),Xy=s.makeMessageType("viam.app.v1.RenameRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"new_name",kind:"scalar",T:9}]),Qy=s.makeMessageType("viam.app.v1.RenameRegistryItemResponse",()=>[{no:1,name:"item",kind:"message",T:Wa}]),Zy=s.makeMessageType("viam.app.v1.TransferRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"new_public_namespace",kind:"scalar",T:9}]),ev=s.makeMessageType("viam.app.v1.TransferRegistryItemResponse",[]),nv=s.makeMessageType("viam.app.v1.CreateModuleRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),av=s.makeMessageType("viam.app.v1.CreateModuleResponse",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9}]),tv=s.makeMessageType("viam.app.v1.UpdateModuleRequest",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"visibility",kind:"enum",T:s.getEnumType(Tn)},{no:3,name:"url",kind:"scalar",T:9},{no:4,name:"description",kind:"scalar",T:9},{no:5,name:"models",kind:"message",T:on,repeated:!0},{no:6,name:"entrypoint",kind:"scalar",T:9},{no:7,name:"first_run",kind:"scalar",T:9,opt:!0},{no:8,name:"apps",kind:"message",T:sn,repeated:!0},{no:9,name:"markdown_description",kind:"scalar",T:9,opt:!0}]),sn=s.makeMessageType("viam.app.v1.App",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"entrypoint",kind:"scalar",T:9},{no:4,name:"fragment_ids",kind:"scalar",T:9,repeated:!0},{no:5,name:"logo_path",kind:"scalar",T:9,opt:!0},{no:6,name:"customizations",kind:"message",T:sh}]),sv=s.makeMessageType("viam.app.v1.UpdateModuleResponse",()=>[{no:1,name:"url",kind:"scalar",T:9}]),ov=s.makeMessageType("viam.app.v1.UpdateModuleMetadata",()=>[{no:1,name:"models",kind:"message",T:on,repeated:!0},{no:2,name:"entrypoint",kind:"scalar",T:9},{no:3,name:"apps",kind:"message",T:sn,repeated:!0},{no:4,name:"source_type",kind:"enum",T:s.getEnumType(xa),opt:!0},{no:5,name:"language",kind:"enum",T:s.getEnumType(Ja),opt:!0}]),iv=s.makeMessageType("viam.app.v1.UpdateMLModelMetadata",()=>[{no:1,name:"model_type",kind:"enum",T:s.getEnumType(je)},{no:2,name:"model_framework",kind:"enum",T:s.getEnumType(an)}]),rv=s.makeMessageType("viam.app.v1.UpdateMLTrainingMetadata",()=>[{no:1,name:"model_type",kind:"enum",T:s.getEnumType(je)},{no:2,name:"model_framework",kind:"enum",T:s.getEnumType(an)},{no:3,name:"draft",kind:"scalar",T:8}]),on=s.makeMessageType("viam.app.v1.Model",()=>[{no:1,name:"api",kind:"scalar",T:9},{no:2,name:"model",kind:"scalar",T:9},{no:3,name:"markdown_documentation",kind:"scalar",T:9,opt:!0},{no:4,name:"description",kind:"scalar",T:9,opt:!0},{no:5,name:"supported_hardware",kind:"scalar",T:9,repeated:!0}]),mv=s.makeMessageType("viam.app.v1.ModuleFileInfo",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"platform",kind:"scalar",T:9},{no:5,name:"platform_tags",kind:"scalar",T:9,repeated:!0}]),cv=s.makeMessageType("viam.app.v1.UploadModuleFileRequest",()=>[{no:1,name:"module_file_info",kind:"message",T:mv,oneof:"module_file"},{no:2,name:"file",kind:"scalar",T:12,oneof:"module_file"}]),dv=s.makeMessageType("viam.app.v1.UploadModuleFileResponse",()=>[{no:1,name:"url",kind:"scalar",T:9}]),lv=s.makeMessageType("viam.app.v1.GetModuleRequest",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0}]),pv=s.makeMessageType("viam.app.v1.GetModuleResponse",()=>[{no:1,name:"module",kind:"message",T:Xo}]),Xo=s.makeMessageType("viam.app.v1.Module",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"visibility",kind:"enum",T:s.getEnumType(Tn)},{no:4,name:"versions",kind:"message",T:uv,repeated:!0},{no:5,name:"url",kind:"scalar",T:9},{no:6,name:"description",kind:"scalar",T:9},{no:7,name:"models",kind:"message",T:on,repeated:!0},{no:8,name:"total_robot_usage",kind:"scalar",T:3},{no:9,name:"total_organization_usage",kind:"scalar",T:3},{no:10,name:"organization_id",kind:"scalar",T:9},{no:11,name:"entrypoint",kind:"scalar",T:9},{no:12,name:"public_namespace",kind:"scalar",T:9},{no:13,name:"first_run",kind:"scalar",T:9,opt:!0},{no:14,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:15,name:"apps",kind:"message",T:sn,repeated:!0}]),uv=s.makeMessageType("viam.app.v1.VersionHistory",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"files",kind:"message",T:Qo,repeated:!0},{no:3,name:"models",kind:"message",T:on,repeated:!0},{no:4,name:"entrypoint",kind:"scalar",T:9},{no:5,name:"first_run",kind:"scalar",T:9,opt:!0},{no:6,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:7,name:"apps",kind:"message",T:sn,repeated:!0}]),Qo=s.makeMessageType("viam.app.v1.Uploads",()=>[{no:1,name:"platform",kind:"scalar",T:9},{no:2,name:"uploaded_at",kind:"message",T:S}]),gv=s.makeMessageType("viam.app.v1.ListModulesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9,opt:!0},{no:2,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0}]),Tv=s.makeMessageType("viam.app.v1.ListModulesResponse",()=>[{no:1,name:"modules",kind:"message",T:Xo,repeated:!0}]),kv=s.makeMessageType("viam.app.v1.GetUserIDByEmailRequest",()=>[{no:1,name:"email",kind:"scalar",T:9}]),yv=s.makeMessageType("viam.app.v1.GetUserIDByEmailResponse",()=>[{no:1,name:"user_id",kind:"scalar",T:9}]),vv=s.makeMessageType("viam.app.v1.ListOrganizationsByUserRequest",()=>[{no:1,name:"user_id",kind:"scalar",T:9}]),Zo=s.makeMessageType("viam.app.v1.OrgDetails",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"org_name",kind:"scalar",T:9},{no:3,name:"org_cid",kind:"scalar",T:9,opt:!0},{no:4,name:"public_namespace",kind:"scalar",T:9,opt:!0},{no:5,name:"billing_tier",kind:"scalar",T:9,opt:!0}]),hv=s.makeMessageType("viam.app.v1.ListOrganizationsByUserResponse",()=>[{no:1,name:"orgs",kind:"message",T:Zo,repeated:!0}]),fv=s.makeMessageType("viam.app.v1.SearchOrganizationsRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9,opt:!0},{no:2,name:"org_name",kind:"scalar",T:9,opt:!0},{no:3,name:"cid",kind:"scalar",T:9,opt:!0},{no:4,name:"public_namespace",kind:"scalar",T:9,opt:!0}]),Rv=s.makeMessageType("viam.app.v1.SearchOrganizationsResponse",()=>[{no:1,name:"organizations",kind:"message",T:Zo,repeated:!0}]),_v=s.makeMessageType("viam.app.v1.CreateKeyRequest",()=>[{no:1,name:"authorizations",kind:"message",T:Q,repeated:!0},{no:2,name:"name",kind:"scalar",T:9}]),Sv=s.makeMessageType("viam.app.v1.CreateKeyResponse",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"id",kind:"scalar",T:9}]),Iv=s.makeMessageType("viam.app.v1.DeleteKeyRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ev=s.makeMessageType("viam.app.v1.DeleteKeyResponse",[]),Mv=s.makeMessageType("viam.app.v1.RenameKeyRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),bv=s.makeMessageType("viam.app.v1.RenameKeyResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Ov=s.makeMessageType("viam.app.v1.AuthorizationDetails",()=>[{no:1,name:"authorization_type",kind:"scalar",T:9},{no:2,name:"authorization_id",kind:"scalar",T:9},{no:3,name:"resource_type",kind:"scalar",T:9},{no:4,name:"resource_id",kind:"scalar",T:9},{no:5,name:"org_id",kind:"scalar",T:9}]),ei=s.makeMessageType("viam.app.v1.APIKeyWithAuthorizations",()=>[{no:1,name:"api_key",kind:"message",T:hk},{no:2,name:"authorizations",kind:"message",T:Ov,repeated:!0}]),wv=s.makeMessageType("viam.app.v1.ListKeysRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Cv=s.makeMessageType("viam.app.v1.ListKeysResponse",()=>[{no:1,name:"api_keys",kind:"message",T:ei,repeated:!0}]),Nv=s.makeMessageType("viam.app.v1.RotateKeyRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Pv=s.makeMessageType("viam.app.v1.RotateKeyResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]),Dv=s.makeMessageType("viam.app.v1.CreateKeyFromExistingKeyAuthorizationsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Av=s.makeMessageType("viam.app.v1.CreateKeyFromExistingKeyAuthorizationsResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]),Uv=s.makeMessageType("viam.app.v1.GetAppContentRequest",()=>[{no:1,name:"public_namespace",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),qv=s.makeMessageType("viam.app.v1.GetAppContentResponse",()=>[{no:1,name:"blob_path",kind:"scalar",T:9},{no:2,name:"entrypoint",kind:"scalar",T:9},{no:3,name:"app_type",kind:"enum",T:s.getEnumType(_g)},{no:4,name:"public",kind:"scalar",T:8}]),Lv=s.makeMessageType("viam.app.v1.OrganizationSetLogoRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"logo",kind:"scalar",T:12}]),Gv=s.makeMessageType("viam.app.v1.OrganizationSetLogoResponse",[]),Bv=s.makeMessageType("viam.app.v1.OrganizationGetLogoRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Fv=s.makeMessageType("viam.app.v1.OrganizationGetLogoResponse",()=>[{no:1,name:"url",kind:"scalar",T:9}]),xv=s.makeMessageType("viam.app.v1.EnableAuthServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Jv=s.makeMessageType("viam.app.v1.EnableAuthServiceResponse",[]),zv=s.makeMessageType("viam.app.v1.DisableAuthServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Vv=s.makeMessageType("viam.app.v1.DisableAuthServiceResponse",[]),$v=s.makeMessageType("viam.app.v1.CreateOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_name",kind:"scalar",T:9},{no:3,name:"oauth_config",kind:"message",T:ja}]),Yv=s.makeMessageType("viam.app.v1.CreateOAuthAppResponse",()=>[{no:1,name:"client_id",kind:"scalar",T:9},{no:2,name:"client_secret",kind:"scalar",T:9}]),Wv=s.makeMessageType("viam.app.v1.ReadOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_id",kind:"scalar",T:9}]),jv=s.makeMessageType("viam.app.v1.ReadOAuthAppResponse",()=>[{no:1,name:"client_name",kind:"scalar",T:9},{no:2,name:"client_secret",kind:"scalar",T:9},{no:3,name:"oauth_config",kind:"message",T:ja}]),Hv=s.makeMessageType("viam.app.v1.UpdateOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_id",kind:"scalar",T:9},{no:3,name:"client_name",kind:"scalar",T:9},{no:4,name:"oauth_config",kind:"message",T:ja}]),Kv=s.makeMessageType("viam.app.v1.UpdateOAuthAppResponse",[]),Xv=s.makeMessageType("viam.app.v1.DeleteOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_id",kind:"scalar",T:9}]),Qv=s.makeMessageType("viam.app.v1.DeleteOAuthAppResponse",[]),Zv=s.makeMessageType("viam.app.v1.ListOAuthAppsRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),eh=s.makeMessageType("viam.app.v1.ListOAuthAppsResponse",()=>[{no:1,name:"client_ids",kind:"scalar",T:9,repeated:!0}]),ja=s.makeMessageType("viam.app.v1.OAuthConfig",()=>[{no:1,name:"client_authentication",kind:"enum",T:s.getEnumType(Sg)},{no:2,name:"pkce",kind:"enum",T:s.getEnumType(Ig)},{no:3,name:"url_validation",kind:"enum",T:s.getEnumType(Eg)},{no:4,name:"origin_uris",kind:"scalar",T:9,repeated:!0},{no:5,name:"redirect_uris",kind:"scalar",T:9,repeated:!0},{no:6,name:"logout_uri",kind:"scalar",T:9},{no:7,name:"enabled_grants",kind:"enum",T:s.getEnumType(Mg),repeated:!0}]),nh=s.makeMessageType("viam.app.v1.GetAppBrandingRequest",()=>[{no:1,name:"public_namespace",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),ah=s.makeMessageType("viam.app.v1.TextOverrides",()=>[{no:1,name:"fields",kind:"map",K:9,V:{kind:"scalar",T:9}}]),th=s.makeMessageType("viam.app.v1.GetAppBrandingResponse",()=>[{no:1,name:"logo_path",kind:"scalar",T:9,opt:!0},{no:2,name:"text_customizations",kind:"map",K:9,V:{kind:"message",T:ah}},{no:3,name:"fragment_ids",kind:"scalar",T:9,repeated:!0}]),sh=s.makeMessageType("viam.app.v1.AppCustomizations",()=>[{no:1,name:"machine_picker",kind:"message",T:oh}]),oh=s.makeMessageType("viam.app.v1.MachinePickerCustomizations",()=>[{no:1,name:"heading",kind:"scalar",T:9,opt:!0},{no:2,name:"subheading",kind:"scalar",T:9,opt:!0}]),bS=Object.freeze(Object.defineProperty({__proto__:null,APIKey:hk,APIKeyWithAuthorizations:ei,AddRoleRequest:Ey,AddRoleResponse:My,AdditionalFragment:jo,App:sn,AppCustomizations:sh,AppType:_g,AuthenticationType:hg,AuthenticatorInfo:zo,Authorization:Q,AuthorizationDetails:Ov,AuthorizedPermissions:Ko,BillingAddress:za,ChangeRoleRequest:wy,ChangeRoleResponse:Cy,CheckPermissionsRequest:Dy,CheckPermissionsResponse:Ay,ClientAuthentication:Sg,CreateFragmentRequest:Ck,CreateFragmentResponse:Nk,CreateKeyFromExistingKeyAuthorizationsRequest:Dv,CreateKeyFromExistingKeyAuthorizationsResponse:Av,CreateKeyRequest:_v,CreateKeyResponse:Sv,CreateLocationRequest:fT,CreateLocationResponse:RT,CreateLocationSecretRequest:FT,CreateLocationSecretResponse:xT,CreateModuleRequest:nv,CreateModuleResponse:av,CreateOAuthAppRequest:$v,CreateOAuthAppResponse:Yv,CreateOrganizationInviteRequest:Hg,CreateOrganizationInviteResponse:Kg,CreateOrganizationRequest:Ng,CreateOrganizationResponse:Pg,CreateRegistryItemRequest:zy,CreateRegistryItemResponse:Vy,CreateRobotPartSecretRequest:Ry,CreateRobotPartSecretResponse:_y,DeleteFragmentRequest:Ak,DeleteFragmentResponse:Uk,DeleteFragmentTagRequest:Jk,DeleteFragmentTagResponse:zk,DeleteKeyRequest:Iv,DeleteKeyResponse:Ev,DeleteLocationRequest:MT,DeleteLocationResponse:bT,DeleteLocationSecretRequest:JT,DeleteLocationSecretResponse:zT,DeleteOAuthAppRequest:Xv,DeleteOAuthAppResponse:Qv,DeleteOrganizationInviteRequest:Zg,DeleteOrganizationInviteResponse:eT,DeleteOrganizationMemberRequest:tT,DeleteOrganizationMemberResponse:sT,DeleteOrganizationRequest:xg,DeleteOrganizationResponse:Jg,DeleteRegistryItemRequest:Hy,DeleteRegistryItemResponse:Ky,DeleteRobotPartRequest:uk,DeleteRobotPartResponse:Rk,DeleteRobotPartSecretRequest:Sy,DeleteRobotPartSecretResponse:Iy,DeleteRobotRequest:ly,DeleteRobotResponse:py,DisableAuthServiceRequest:zv,DisableAuthServiceResponse:Vv,DisableBillingServiceRequest:lT,DisableBillingServiceResponse:pT,EnableAuthServiceRequest:xv,EnableAuthServiceResponse:Jv,EnableBillingServiceRequest:oT,EnableBillingServiceResponse:iT,EnabledGrant:Mg,Fragment:He,FragmentError:Ik,FragmentErrorType:fg,FragmentHistoryEntry:_k,FragmentImport:Ek,FragmentImportList:Vo,FragmentRevision:Sk,FragmentSummary:ey,FragmentTag:$a,FragmentUsage:Ya,FragmentVisibility:Bn,GetAppBrandingRequest:nh,GetAppBrandingResponse:th,GetAppContentRequest:Uv,GetAppContentResponse:qv,GetBillingServiceConfigRequest:cT,GetBillingServiceConfigResponse:dT,GetFragmentHistoryRequest:qk,GetFragmentHistoryResponse:Lk,GetFragmentRequest:Ok,GetFragmentResponse:wk,GetFragmentUsageRequest:Gk,GetFragmentUsageResponse:Bk,GetLocationMetadataRequest:OT,GetLocationMetadataResponse:wT,GetLocationRequest:_T,GetLocationResponse:ST,GetModuleRequest:lv,GetModuleResponse:pv,GetOrganizationMetadataRequest:zg,GetOrganizationMetadataResponse:Vg,GetOrganizationNamespaceAvailabilityRequest:Ug,GetOrganizationNamespaceAvailabilityResponse:qg,GetOrganizationRequest:Dg,GetOrganizationResponse:Ag,GetOrganizationsWithAccessToLocationRequest:PT,GetOrganizationsWithAccessToLocationResponse:DT,GetRegistryItemRequest:xy,GetRegistryItemResponse:Jy,GetRobotAPIKeysRequest:vk,GetRobotAPIKeysResponse:fk,GetRobotMetadataRequest:uy,GetRobotMetadataResponse:gy,GetRobotPartByNameAndLocationRequest:nk,GetRobotPartByNameAndLocationResponse:ak,GetRobotPartHistoryRequest:rk,GetRobotPartHistoryResponse:mk,GetRobotPartLogsRequest:tk,GetRobotPartLogsResponse:sk,GetRobotPartMetadataRequest:gk,GetRobotPartMetadataResponse:Tk,GetRobotPartRequest:ZT,GetRobotPartResponse:ek,GetRobotPartsRequest:XT,GetRobotPartsResponse:QT,GetRobotRequest:YT,GetRobotResponse:KT,GetRoverRentalRobotsRequest:WT,GetRoverRentalRobotsResponse:HT,GetUserIDByEmailRequest:kv,GetUserIDByEmailResponse:yv,ListAuthorizationsRequest:Ny,ListAuthorizationsResponse:Py,ListFragmentsRequest:Mk,ListFragmentsResponse:bk,ListKeysRequest:wv,ListKeysResponse:Cv,ListLocationsRequest:AT,ListLocationsResponse:BT,ListMachineFragmentsRequest:Hk,ListMachineFragmentsResponse:Kk,ListMachineSummariesRequest:Ho,ListMachineSummariesResponse:Xk,ListModulesRequest:gv,ListModulesResponse:Tv,ListNestedFragmentsRequest:Wk,ListNestedFragmentsResponse:jk,ListOAuthAppsRequest:Zv,ListOAuthAppsResponse:eh,ListOrganizationMembersRequest:Wg,ListOrganizationMembersResponse:jg,ListOrganizationsByUserRequest:vv,ListOrganizationsByUserResponse:hv,ListOrganizationsRequest:Og,ListOrganizationsResponse:Cg,ListRegistryItemsRequest:Wy,ListRegistryItemsResponse:jy,ListRobotsForLocationsRequest:$k,ListRobotsForLocationsResponse:oy,ListRobotsForOrgRequest:Yk,ListRobotsForOrgResponse:iy,ListRobotsRequest:Vk,ListRobotsResponse:sy,Location:xn,LocationAuth:Va,LocationAuthRequest:VT,LocationAuthResponse:$T,LocationOrganization:yT,LocationSummary:Qk,MLModelMetadata:Gy,MLModelVersion:Ly,MLTrainingMetadata:Fy,MLTrainingVersion:By,MachinePickerCustomizations:oh,MachineSummary:Zk,MarkPartAsMainRequest:yy,MarkPartAsMainResponse:vy,MarkPartForRestartRequest:hy,MarkPartForRestartResponse:fy,Model:on,Module:Xo,ModuleFileInfo:mv,ModuleLanguage:Ja,ModuleMetadata:qy,ModuleSourceType:xa,ModuleVersion:Uy,NewRobotPartRequest:lk,NewRobotPartResponse:pk,NewRobotRequest:ry,NewRobotResponse:my,OAuthConfig:ja,OnlineState:Fa,OrgDetails:Zo,Organization:yn,OrganizationGetLogoRequest:Bv,OrganizationGetLogoResponse:Fv,OrganizationGetSupportEmailRequest:TT,OrganizationGetSupportEmailResponse:kT,OrganizationIdentity:$o,OrganizationInvite:Fn,OrganizationMember:wg,OrganizationSetLogoRequest:Lv,OrganizationSetLogoResponse:Gv,OrganizationSetSupportEmailRequest:uT,OrganizationSetSupportEmailResponse:gT,PKCE:Ig,PartSummary:ty,ReadOAuthAppRequest:Wv,ReadOAuthAppResponse:jv,RegistryItem:Wa,RegistryItemStatus:Rg,RemoveRoleRequest:by,RemoveRoleResponse:Oy,RenameKeyRequest:Mv,RenameKeyResponse:bv,RenameRegistryItemRequest:Xy,RenameRegistryItemResponse:Qy,ResendOrganizationInviteRequest:nT,ResendOrganizationInviteResponse:aT,ResolvedFragment:Wo,Robot:kn,RobotPart:tn,RobotPartHistoryEntry:bg,RotateKeyRequest:Nv,RotateKeyResponse:Pv,RoverRentalRobot:jT,SearchOrganizationsRequest:fv,SearchOrganizationsResponse:Rv,SetFragmentTagRequest:Fk,SetFragmentTagResponse:xk,ShareLocationRequest:UT,ShareLocationResponse:qT,SharedSecret:Yo,SharedSecret_State:hT,StorageConfig:vT,TailRobotPartLogsRequest:ok,TailRobotPartLogsResponse:ik,TextOverrides:ah,TransferRegistryItemRequest:Zy,TransferRegistryItemResponse:ev,URLValidation:Eg,UnshareLocationRequest:LT,UnshareLocationResponse:GT,UpdateBillingServiceRequest:rT,UpdateBillingServiceResponse:mT,UpdateFragmentRequest:Pk,UpdateFragmentResponse:Dk,UpdateLocationMetadataRequest:CT,UpdateLocationMetadataResponse:NT,UpdateLocationRequest:IT,UpdateLocationResponse:ET,UpdateMLModelMetadata:iv,UpdateMLTrainingMetadata:rv,UpdateModuleMetadata:ov,UpdateModuleRequest:tv,UpdateModuleResponse:sv,UpdateOAuthAppRequest:Hv,UpdateOAuthAppResponse:Kv,UpdateOrganizationInviteAuthorizationsRequest:Xg,UpdateOrganizationInviteAuthorizationsResponse:Qg,UpdateOrganizationMetadataRequest:$g,UpdateOrganizationMetadataResponse:Yg,UpdateOrganizationNamespaceRequest:Bg,UpdateOrganizationNamespaceResponse:Fg,UpdateOrganizationRequest:Lg,UpdateOrganizationResponse:Gg,UpdateRegistryItemRequest:$y,UpdateRegistryItemResponse:Yy,UpdateRobotMetadataRequest:Ty,UpdateRobotMetadataResponse:ky,UpdateRobotPartMetadataRequest:kk,UpdateRobotPartMetadataResponse:yk,UpdateRobotPartRequest:ck,UpdateRobotPartResponse:dk,UpdateRobotRequest:cy,UpdateRobotResponse:dy,UploadModuleFileRequest:cv,UploadModuleFileResponse:dv,Uploads:Qo,VersionHistory:uv,ViamAgentVersion:ay,ViamServerVersion:ny,Visibility:Tn},Symbol.toStringTag,{value:"Module"})),OS={typeName:"viam.app.v1.AppService",methods:{getUserIDByEmail:{name:"GetUserIDByEmail",I:kv,O:yv,kind:m.Unary},createOrganization:{name:"CreateOrganization",I:Ng,O:Pg,kind:m.Unary},listOrganizations:{name:"ListOrganizations",I:Og,O:Cg,kind:m.Unary},getOrganizationsWithAccessToLocation:{name:"GetOrganizationsWithAccessToLocation",I:PT,O:DT,kind:m.Unary},listOrganizationsByUser:{name:"ListOrganizationsByUser",I:vv,O:hv,kind:m.Unary},searchOrganizations:{name:"SearchOrganizations",I:fv,O:Rv,kind:m.Unary},getOrganization:{name:"GetOrganization",I:Dg,O:Ag,kind:m.Unary},getOrganizationNamespaceAvailability:{name:"GetOrganizationNamespaceAvailability",I:Ug,O:qg,kind:m.Unary},updateOrganization:{name:"UpdateOrganization",I:Lg,O:Gg,kind:m.Unary},updateOrganizationNamespace:{name:"UpdateOrganizationNamespace",I:Bg,O:Fg,kind:m.Unary},deleteOrganization:{name:"DeleteOrganization",I:xg,O:Jg,kind:m.Unary},getOrganizationMetadata:{name:"GetOrganizationMetadata",I:zg,O:Vg,kind:m.Unary},updateOrganizationMetadata:{name:"UpdateOrganizationMetadata",I:$g,O:Yg,kind:m.Unary},listOrganizationMembers:{name:"ListOrganizationMembers",I:Wg,O:jg,kind:m.Unary},createOrganizationInvite:{name:"CreateOrganizationInvite",I:Hg,O:Kg,kind:m.Unary},updateOrganizationInviteAuthorizations:{name:"UpdateOrganizationInviteAuthorizations",I:Xg,O:Qg,kind:m.Unary},deleteOrganizationMember:{name:"DeleteOrganizationMember",I:tT,O:sT,kind:m.Unary},deleteOrganizationInvite:{name:"DeleteOrganizationInvite",I:Zg,O:eT,kind:m.Unary},resendOrganizationInvite:{name:"ResendOrganizationInvite",I:nT,O:aT,kind:m.Unary},enableBillingService:{name:"EnableBillingService",I:oT,O:iT,kind:m.Unary},disableBillingService:{name:"DisableBillingService",I:lT,O:pT,kind:m.Unary},updateBillingService:{name:"UpdateBillingService",I:rT,O:mT,kind:m.Unary},getBillingServiceConfig:{name:"GetBillingServiceConfig",I:cT,O:dT,kind:m.Unary},organizationSetSupportEmail:{name:"OrganizationSetSupportEmail",I:uT,O:gT,kind:m.Unary},organizationGetSupportEmail:{name:"OrganizationGetSupportEmail",I:TT,O:kT,kind:m.Unary},organizationSetLogo:{name:"OrganizationSetLogo",I:Lv,O:Gv,kind:m.Unary},organizationGetLogo:{name:"OrganizationGetLogo",I:Bv,O:Fv,kind:m.Unary},enableAuthService:{name:"EnableAuthService",I:xv,O:Jv,kind:m.Unary},disableAuthService:{name:"DisableAuthService",I:zv,O:Vv,kind:m.Unary},createOAuthApp:{name:"CreateOAuthApp",I:$v,O:Yv,kind:m.Unary},readOAuthApp:{name:"ReadOAuthApp",I:Wv,O:jv,kind:m.Unary},updateOAuthApp:{name:"UpdateOAuthApp",I:Hv,O:Kv,kind:m.Unary},deleteOAuthApp:{name:"DeleteOAuthApp",I:Xv,O:Qv,kind:m.Unary},listOAuthApps:{name:"ListOAuthApps",I:Zv,O:eh,kind:m.Unary},createLocation:{name:"CreateLocation",I:fT,O:RT,kind:m.Unary},getLocation:{name:"GetLocation",I:_T,O:ST,kind:m.Unary},updateLocation:{name:"UpdateLocation",I:IT,O:ET,kind:m.Unary},deleteLocation:{name:"DeleteLocation",I:MT,O:bT,kind:m.Unary},getLocationMetadata:{name:"GetLocationMetadata",I:OT,O:wT,kind:m.Unary},updateLocationMetadata:{name:"UpdateLocationMetadata",I:CT,O:NT,kind:m.Unary},listLocations:{name:"ListLocations",I:AT,O:BT,kind:m.Unary},shareLocation:{name:"ShareLocation",I:UT,O:qT,kind:m.Unary},unshareLocation:{name:"UnshareLocation",I:LT,O:GT,kind:m.Unary},locationAuth:{name:"LocationAuth",I:VT,O:$T,kind:m.Unary},createLocationSecret:{name:"CreateLocationSecret",I:FT,O:xT,kind:m.Unary},deleteLocationSecret:{name:"DeleteLocationSecret",I:JT,O:zT,kind:m.Unary},getRobot:{name:"GetRobot",I:YT,O:KT,kind:m.Unary},getRobotMetadata:{name:"GetRobotMetadata",I:uy,O:gy,kind:m.Unary},updateRobotMetadata:{name:"UpdateRobotMetadata",I:Ty,O:ky,kind:m.Unary},getRoverRentalRobots:{name:"GetRoverRentalRobots",I:WT,O:HT,kind:m.Unary},getRobotParts:{name:"GetRobotParts",I:XT,O:QT,kind:m.Unary},getRobotPart:{name:"GetRobotPart",I:ZT,O:ek,kind:m.Unary},getRobotPartByNameAndLocation:{name:"GetRobotPartByNameAndLocation",I:nk,O:ak,kind:m.Unary},getRobotPartLogs:{name:"GetRobotPartLogs",I:tk,O:sk,kind:m.Unary},tailRobotPartLogs:{name:"TailRobotPartLogs",I:ok,O:ik,kind:m.ServerStreaming},getRobotPartHistory:{name:"GetRobotPartHistory",I:rk,O:mk,kind:m.Unary},updateRobotPart:{name:"UpdateRobotPart",I:ck,O:dk,kind:m.Unary},newRobotPart:{name:"NewRobotPart",I:lk,O:pk,kind:m.Unary},deleteRobotPart:{name:"DeleteRobotPart",I:uk,O:Rk,kind:m.Unary},getRobotPartMetadata:{name:"GetRobotPartMetadata",I:gk,O:Tk,kind:m.Unary},updateRobotPartMetadata:{name:"UpdateRobotPartMetadata",I:kk,O:yk,kind:m.Unary},getRobotAPIKeys:{name:"GetRobotAPIKeys",I:vk,O:fk,kind:m.Unary},markPartAsMain:{name:"MarkPartAsMain",I:yy,O:vy,kind:m.Unary},markPartForRestart:{name:"MarkPartForRestart",I:hy,O:fy,kind:m.Unary},createRobotPartSecret:{name:"CreateRobotPartSecret",I:Ry,O:_y,kind:m.Unary},deleteRobotPartSecret:{name:"DeleteRobotPartSecret",I:Sy,O:Iy,kind:m.Unary},listRobots:{name:"ListRobots",I:Vk,O:sy,kind:m.Unary},listRobotsForLocations:{name:"ListRobotsForLocations",I:$k,O:oy,kind:m.Unary},listRobotsForOrg:{name:"ListRobotsForOrg",I:Yk,O:iy,kind:m.Unary},newRobot:{name:"NewRobot",I:ry,O:my,kind:m.Unary},updateRobot:{name:"UpdateRobot",I:cy,O:dy,kind:m.Unary},deleteRobot:{name:"DeleteRobot",I:ly,O:py,kind:m.Unary},listFragments:{name:"ListFragments",I:Mk,O:bk,kind:m.Unary},getFragment:{name:"GetFragment",I:Ok,O:wk,kind:m.Unary},createFragment:{name:"CreateFragment",I:Ck,O:Nk,kind:m.Unary},updateFragment:{name:"UpdateFragment",I:Pk,O:Dk,kind:m.Unary},deleteFragment:{name:"DeleteFragment",I:Ak,O:Uk,kind:m.Unary},listNestedFragments:{name:"ListNestedFragments",I:Wk,O:jk,kind:m.Unary},listMachineFragments:{name:"ListMachineFragments",I:Hk,O:Kk,kind:m.Unary},listMachineSummaries:{name:"ListMachineSummaries",I:Ho,O:Xk,kind:m.Unary},getFragmentHistory:{name:"GetFragmentHistory",I:qk,O:Lk,kind:m.Unary},getFragmentUsage:{name:"GetFragmentUsage",I:Gk,O:Bk,kind:m.Unary},setFragmentTag:{name:"SetFragmentTag",I:Fk,O:xk,kind:m.Unary},deleteFragmentTag:{name:"DeleteFragmentTag",I:Jk,O:zk,kind:m.Unary},addRole:{name:"AddRole",I:Ey,O:My,kind:m.Unary},removeRole:{name:"RemoveRole",I:by,O:Oy,kind:m.Unary},changeRole:{name:"ChangeRole",I:wy,O:Cy,kind:m.Unary},listAuthorizations:{name:"ListAuthorizations",I:Ny,O:Py,kind:m.Unary},checkPermissions:{name:"CheckPermissions",I:Dy,O:Ay,kind:m.Unary},getRegistryItem:{name:"GetRegistryItem",I:xy,O:Jy,kind:m.Unary},createRegistryItem:{name:"CreateRegistryItem",I:zy,O:Vy,kind:m.Unary},updateRegistryItem:{name:"UpdateRegistryItem",I:$y,O:Yy,kind:m.Unary},listRegistryItems:{name:"ListRegistryItems",I:Wy,O:jy,kind:m.Unary},deleteRegistryItem:{name:"DeleteRegistryItem",I:Hy,O:Ky,kind:m.Unary},renameRegistryItem:{name:"RenameRegistryItem",I:Xy,O:Qy,kind:m.Unary},transferRegistryItem:{name:"TransferRegistryItem",I:Zy,O:ev,kind:m.Unary},createModule:{name:"CreateModule",I:nv,O:av,kind:m.Unary},updateModule:{name:"UpdateModule",I:tv,O:sv,kind:m.Unary},uploadModuleFile:{name:"UploadModuleFile",I:cv,O:dv,kind:m.ClientStreaming},getModule:{name:"GetModule",I:lv,O:pv,kind:m.Unary},listModules:{name:"ListModules",I:gv,O:Tv,kind:m.Unary},createKey:{name:"CreateKey",I:_v,O:Sv,kind:m.Unary},deleteKey:{name:"DeleteKey",I:Iv,O:Ev,kind:m.Unary},listKeys:{name:"ListKeys",I:wv,O:Cv,kind:m.Unary},renameKey:{name:"RenameKey",I:Mv,O:bv,kind:m.Unary},rotateKey:{name:"RotateKey",I:Nv,O:Pv,kind:m.Unary},createKeyFromExistingKeyAuthorizations:{name:"CreateKeyFromExistingKeyAuthorizations",I:Dv,O:Av,kind:m.Unary},getAppContent:{name:"GetAppContent",I:Uv,O:qv,kind:m.Unary},getAppBranding:{name:"GetAppBranding",I:nh,O:th,kind:m.Unary}}},ih=(t,e,n,a,o,i)=>new Q({authorizationType:"role",identityId:e,identityType:o,authorizationId:`${a}_${n}`,resourceType:a,organizationId:t,resourceId:i});class wS{client;constructor(e){this.client=W(OS,e)}async getUserIDByEmail(e){return(await this.client.getUserIDByEmail({email:e})).userId}async createOrganization(e){return(await this.client.createOrganization({name:e})).organization}async listOrganizations(){return(await this.client.listOrganizations({})).organizations}async getOrganizationsWithAccessToLocation(e){return(await this.client.getOrganizationsWithAccessToLocation({locationId:e})).organizationIdentities}async listOrganizationsByUser(e){return(await this.client.listOrganizationsByUser({userId:e})).orgs}async getOrganization(e){return(await this.client.getOrganization({organizationId:e})).organization}async getOrganizationNamespaceAvailability(e){return(await this.client.getOrganizationNamespaceAvailability({publicNamespace:e})).available}async updateOrganization(e,n,a,o,i,r){return(await this.client.updateOrganization({organizationId:e,name:n,publicNamespace:a,region:o,cid:i,defaultFragments:r})).organization}async deleteOrganization(e){await this.client.deleteOrganization({organizationId:e})}async listOrganizationMembers(e){return this.client.listOrganizationMembers({organizationId:e})}async createOrganizationInvite(e,n,a,o=!0){return(await this.client.createOrganizationInvite({organizationId:e,email:n,authorizations:a,sendEmailInvite:o})).invite}async updateOrganizationInviteAuthorizations(e,n,a,o){return(await this.client.updateOrganizationInviteAuthorizations({organizationId:e,email:n,addAuthorizations:a,removeAuthorizations:o})).invite}async deleteOrganizationMember(e,n){await this.client.deleteOrganizationMember({organizationId:e,userId:n})}async deleteOrganizationInvite(e,n){await this.client.deleteOrganizationInvite({organizationId:e,email:n})}async resendOrganizationInvite(e,n){return(await this.client.resendOrganizationInvite({organizationId:e,email:n})).invite}async createLocation(e,n,a){return(await this.client.createLocation({organizationId:e,name:n,parentLocationId:a})).location}async getLocation(e){return(await this.client.getLocation({locationId:e})).location}async updateLocation(e,n,a,o){return(await this.client.updateLocation({locationId:e,name:n,parentLocationId:a,region:o})).location}async deleteLocation(e){await this.client.deleteLocation({locationId:e})}async listLocations(e){return(await this.client.listLocations({organizationId:e})).locations}async shareLocation(e,n){await this.client.shareLocation({organizationId:e,locationId:n})}async unshareLocation(e,n){await this.client.unshareLocation({organizationId:e,locationId:n})}async locationAuth(e){return(await this.client.locationAuth({locationId:e})).auth}async createLocationSecret(e){return(await this.client.createLocationSecret({locationId:e})).auth}async deleteLocationSecret(e,n){await this.client.deleteLocationSecret({locationId:e,secretId:n})}async getRobot(e){return(await this.client.getRobot({id:e})).robot}async getRoverRentalRobots(e){return(await this.client.getRoverRentalRobots({orgId:e})).robots}async getRobotParts(e){return(await this.client.getRobotParts({robotId:e})).parts}async getRobotPart(e){return this.client.getRobotPart({id:e})}async getRobotPartByNameAndLocation(e,n){return this.client.getRobotPartByNameAndLocation({name:e,locationId:n})}async getRobotPartLogs(e,n,a,o=""){return this.client.getRobotPartLogs({id:e,filter:n,levels:a,pageToken:o})}async tailRobotPartLogs(e,n,a,o=!0){const i=this.client.tailRobotPartLogs({id:e,errorsOnly:o,filter:a});for await(const r of i)for(const c of r.logs)n.push(c)}async getRobotPartHistory(e){return(await this.client.getRobotPartHistory({id:e})).history}async updateRobotPart(e,n,a){return(await this.client.updateRobotPart({id:e,name:n,robotConfig:a})).part}async newRobotPart(e,n){return(await this.client.newRobotPart({robotId:e,partName:n})).partId}async deleteRobotPart(e){await this.client.deleteRobotPart({partId:e})}async getRobotAPIKeys(e){return(await this.client.getRobotAPIKeys({robotId:e})).apiKeys}async markPartAsMain(e){await this.client.markPartAsMain({partId:e})}async markPartForRestart(e){await this.client.markPartForRestart({partId:e})}async createRobotPartSecret(e){return(await this.client.createRobotPartSecret({partId:e})).part}async deleteRobotPartSecret(e,n){await this.client.deleteRobotPartSecret({partId:e,secretId:n})}async listRobots(e){return(await this.client.listRobots({locationId:e})).robots}async newRobot(e,n){return(await this.client.newRobot({name:n,location:e})).id}async updateRobot(e,n,a){return(await this.client.updateRobot({id:e,location:n,name:a})).robot}async deleteRobot(e){await this.client.deleteRobot({id:e})}async listFragments(e,n=!0,a=[]){return(await this.client.listFragments({organizationId:e,showPublic:n,fragmentVisibility:a})).fragments}async getFragment(e){return(await this.client.getFragment({id:e})).fragment}async createFragment(e,n,a){return(await this.client.createFragment({organizationId:e,name:n,config:a})).fragment}async updateFragment(e,n,a,o,i){return(await this.client.updateFragment({id:e,name:n,config:a,public:o,visibility:i})).fragment}async deleteFragment(e){await this.client.deleteFragment({id:e})}async listMachineFragments(e,n){return(await this.client.listMachineFragments({machineId:e,additionalFragmentIds:n})).fragments}async addRole(e,n,a,o,i){await this.client.addRole({authorization:ih(e,n,a,o,"",i)})}async removeRole(e,n,a,o,i){await this.client.removeRole({authorization:ih(e,n,a,o,"",i)})}async changeRole(e,n){await this.client.changeRole({oldAuthorization:e,newAuthorization:n})}async listAuthorizations(e,n){return(await this.client.listAuthorizations({organizationId:e,resourceIds:n})).authorizations}async checkPermissions(e){return(await this.client.checkPermissions({permissions:e})).authorizedPermissions}async getRegistryItem(e){return(await this.client.getRegistryItem({itemId:e})).item}async createRegistryItem(e,n,a){await this.client.createRegistryItem({organizationId:e,name:n,type:a})}async updateRegistryItem(e,n,a,o){await this.client.updateRegistryItem({itemId:e,type:n,description:a,visibility:o})}async listRegistryItems(e,n,a,o,i,r,c){const l={organizationId:e,types:n,visibilities:a,platforms:o,statuses:i,searchTerm:r,pageToken:c};return(await this.client.listRegistryItems(l)).items}async deleteRegistryItem(e){await this.client.deleteRegistryItem({itemId:e})}async createModule(e,n){return this.client.createModule({organizationId:e,name:n})}async updateModule(e,n,a,o,i,r){return(await this.client.updateModule({moduleId:e,visibility:n,url:a,description:o,models:i,entrypoint:r})).url}async getModule(e){return(await this.client.getModule({moduleId:e})).module}async listModules(e){return(await this.client.listModules({organizationId:e})).modules}async createKey(e,n){return this.client.createKey({name:n,authorizations:e})}async deleteKey(e){return this.client.deleteKey({id:e})}async listKeys(e){return(await this.client.listKeys({orgId:e})).apiKeys}async rotateKey(e){return this.client.rotateKey({id:e})}async createKeyFromExistingKeyAuthorizations(e){return this.client.createKeyFromExistingKeyAuthorizations({id:e})}async getAppContent(e,n){return this.client.getAppContent({publicNamespace:e,name:n})}async getOrganizationMetadata(e){return(await this.client.getOrganizationMetadata({organizationId:e})).toJson().data??{}}async updateOrganizationMetadata(e,n){await this.client.updateOrganizationMetadata({organizationId:e,data:p.fromJson(n)})}async getLocationMetadata(e){return(await this.client.getLocationMetadata({locationId:e})).toJson().data??{}}async updateLocationMetadata(e,n){await this.client.updateLocationMetadata({locationId:e,data:p.fromJson(n)})}async getRobotMetadata(e){return(await this.client.getRobotMetadata({id:e})).toJson().data??{}}async updateRobotMetadata(e,n){await this.client.updateRobotMetadata({id:e,data:p.fromJson(n)})}async getRobotPartMetadata(e){return(await this.client.getRobotPartMetadata({id:e})).toJson().data??{}}async updateRobotPartMetadata(e,n){await this.client.updateRobotPartMetadata({id:e,data:p.fromJson(n)})}async getAppBranding(e,n){return this.client.getAppBranding({publicNamespace:e,name:n})}async listMachineSummaries(e,n,a,o){const i=new Ho({organizationId:e,fragmentIds:n,locationIds:a,limit:o});return(await this.client.listMachineSummaries(i)).locationSummaries}}const rh=s.makeEnum("viam.app.v1.PaymentMethodType",[{no:0,name:"PAYMENT_METHOD_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PAYMENT_METHOD_TYPE_CARD",localName:"CARD"},{no:2,name:"PAYMENT_METHOD_TYPE_USBANKACCOUNT",localName:"USBANKACCOUNT"}]),mh=s.makeEnum("viam.app.v1.UsageCostType",[{no:0,name:"USAGE_COST_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"USAGE_COST_TYPE_DATA_UPLOAD",localName:"DATA_UPLOAD"},{no:2,name:"USAGE_COST_TYPE_DATA_EGRESS",localName:"DATA_EGRESS"},{no:3,name:"USAGE_COST_TYPE_REMOTE_CONTROL",localName:"REMOTE_CONTROL"},{no:4,name:"USAGE_COST_TYPE_STANDARD_COMPUTE",localName:"STANDARD_COMPUTE"},{no:5,name:"USAGE_COST_TYPE_CLOUD_STORAGE",localName:"CLOUD_STORAGE"},{no:6,name:"USAGE_COST_TYPE_BINARY_DATA_CLOUD_STORAGE",localName:"BINARY_DATA_CLOUD_STORAGE"},{no:7,name:"USAGE_COST_TYPE_OTHER_CLOUD_STORAGE",localName:"OTHER_CLOUD_STORAGE"},{no:8,name:"USAGE_COST_TYPE_PER_MACHINE",localName:"PER_MACHINE"},{no:9,name:"USAGE_COST_TYPE_TRIGGER_NOTIFICATION",localName:"TRIGGER_NOTIFICATION"},{no:10,name:"USAGE_COST_TYPE_TABULAR_DATA_CLOUD_STORAGE",localName:"TABULAR_DATA_CLOUD_STORAGE"},{no:11,name:"USAGE_COST_TYPE_CONFIG_HISTORY_CLOUD_STORAGE",localName:"CONFIG_HISTORY_CLOUD_STORAGE"},{no:12,name:"USAGE_COST_TYPE_LOGS_CLOUD_STORAGE",localName:"LOGS_CLOUD_STORAGE"},{no:13,name:"USAGE_COST_TYPE_TRAINING_LOGS_CLOUD_STORAGE",localName:"TRAINING_LOGS_CLOUD_STORAGE"},{no:14,name:"USAGE_COST_TYPE_PACKAGES_CLOUD_STORAGE",localName:"PACKAGES_CLOUD_STORAGE"},{no:15,name:"USAGE_COST_TYPE_BINARY_DATA_UPLOAD",localName:"BINARY_DATA_UPLOAD"},{no:16,name:"USAGE_COST_TYPE_TABULAR_DATA_UPLOAD",localName:"TABULAR_DATA_UPLOAD"},{no:17,name:"USAGE_COST_TYPE_LOGS_UPLOAD",localName:"LOGS_UPLOAD"},{no:18,name:"USAGE_COST_TYPE_BINARY_DATA_EGRESS",localName:"BINARY_DATA_EGRESS"},{no:19,name:"USAGE_COST_TYPE_TABULAR_DATA_EGRESS",localName:"TABULAR_DATA_EGRESS"},{no:20,name:"USAGE_COST_TYPE_LOGS_EGRESS",localName:"LOGS_EGRESS"},{no:21,name:"USAGE_COST_TYPE_TRAINING_LOGS_EGRESS",localName:"TRAINING_LOGS_EGRESS"},{no:22,name:"USAGE_COST_TYPE_TABULAR_DATA_DATABASE_CLOUD_STORAGE",localName:"TABULAR_DATA_DATABASE_CLOUD_STORAGE"},{no:23,name:"USAGE_COST_TYPE_TABULAR_DATA_DATABASE_COMPUTE",localName:"TABULAR_DATA_DATABASE_COMPUTE"},{no:24,name:"USAGE_COST_TYPE_BINARY_DATA_CROSS_REGION_EGRESS",localName:"BINARY_DATA_CROSS_REGION_EGRESS"},{no:25,name:"USAGE_COST_TYPE_PIPELINE_SINK_CLOUD_STORAGE",localName:"PIPELINE_SINK_CLOUD_STORAGE"},{no:26,name:"USAGE_COST_TYPE_PIPELINE_SINK_COMPUTE",localName:"PIPELINE_SINK_COMPUTE"}]),ch=s.makeEnum("viam.app.v1.SourceType",[{no:0,name:"SOURCE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"SOURCE_TYPE_ORG",localName:"ORG"},{no:2,name:"SOURCE_TYPE_FRAGMENT",localName:"FRAGMENT"}]),dh=s.makeMessageType("viam.app.v1.InvoiceSummary",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"invoice_date",kind:"message",T:S},{no:3,name:"invoice_amount",kind:"scalar",T:1},{no:4,name:"status",kind:"scalar",T:9},{no:5,name:"due_date",kind:"message",T:S},{no:6,name:"paid_date",kind:"message",T:S}]),lh=s.makeMessageType("viam.app.v1.PaymentMethodCard",()=>[{no:1,name:"brand",kind:"scalar",T:9},{no:2,name:"last_four_digits",kind:"scalar",T:9}]),ph=s.makeMessageType("viam.app.v1.VerificationInfo",()=>[{no:1,name:"arrival_date",kind:"scalar",T:3},{no:2,name:"hosted_verification_page_url",kind:"scalar",T:9}]),uh=s.makeMessageType("viam.app.v1.PaymentMethodUSBankAccount",()=>[{no:1,name:"bank_name",kind:"scalar",T:9},{no:2,name:"last_four_digits_account_number",kind:"scalar",T:9},{no:3,name:"routing_number",kind:"scalar",T:9},{no:4,name:"account_type",kind:"scalar",T:9},{no:5,name:"verification_info",kind:"message",T:ph,opt:!0}]),gh=s.makeMessageType("viam.app.v1.GetCurrentMonthUsageRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Th=s.makeMessageType("viam.app.v1.UsageCost",()=>[{no:1,name:"resource_type",kind:"enum",T:s.getEnumType(mh)},{no:2,name:"cost",kind:"scalar",T:1}]),kh=s.makeMessageType("viam.app.v1.ResourceUsageCostsBySource",()=>[{no:1,name:"source_type",kind:"enum",T:s.getEnumType(ch)},{no:2,name:"resource_usage_costs",kind:"message",T:yh},{no:3,name:"tier_name",kind:"scalar",T:9}]),yh=s.makeMessageType("viam.app.v1.ResourceUsageCosts",()=>[{no:1,name:"usage_costs",kind:"message",T:Th,repeated:!0},{no:2,name:"discount",kind:"scalar",T:1},{no:3,name:"total_with_discount",kind:"scalar",T:1},{no:4,name:"total_without_discount",kind:"scalar",T:1}]),vh=s.makeMessageType("viam.app.v1.GetCurrentMonthUsageResponse",()=>[{no:1,name:"start_date",kind:"message",T:S},{no:2,name:"end_date",kind:"message",T:S},{no:14,name:"resource_usage_costs_by_source",kind:"message",T:kh,repeated:!0},{no:15,name:"subtotal",kind:"scalar",T:1},{no:3,name:"cloud_storage_usage_cost",kind:"scalar",T:1},{no:4,name:"data_upload_usage_cost",kind:"scalar",T:1},{no:5,name:"data_egres_usage_cost",kind:"scalar",T:1},{no:6,name:"remote_control_usage_cost",kind:"scalar",T:1},{no:7,name:"standard_compute_usage_cost",kind:"scalar",T:1},{no:8,name:"discount_amount",kind:"scalar",T:1},{no:9,name:"total_usage_with_discount",kind:"scalar",T:1},{no:10,name:"total_usage_without_discount",kind:"scalar",T:1},{no:11,name:"per_machine_usage_cost",kind:"scalar",T:1},{no:12,name:"binary_data_cloud_storage_usage_cost",kind:"scalar",T:1},{no:13,name:"other_cloud_storage_usage_cost",kind:"scalar",T:1}]),hh=s.makeMessageType("viam.app.v1.GetOrgBillingInformationRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),fh=s.makeMessageType("viam.app.v1.GetOrgBillingInformationResponse",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(rh)},{no:2,name:"billing_email",kind:"scalar",T:9},{no:3,name:"method",kind:"message",T:lh,opt:!0},{no:4,name:"billing_tier",kind:"scalar",T:9,opt:!0},{no:5,name:"method_us_bank_account",kind:"message",T:uh,opt:!0}]),Rh=s.makeMessageType("viam.app.v1.GetInvoicesSummaryRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),_h=s.makeMessageType("viam.app.v1.GetInvoicesSummaryResponse",()=>[{no:1,name:"outstanding_balance",kind:"scalar",T:1},{no:2,name:"invoices",kind:"message",T:dh,repeated:!0}]),Sh=s.makeMessageType("viam.app.v1.GetInvoicePdfRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"org_id",kind:"scalar",T:9}]),Ih=s.makeMessageType("viam.app.v1.GetInvoicePdfResponse",()=>[{no:1,name:"chunk",kind:"scalar",T:12}]),Eh=s.makeMessageType("viam.app.v1.SendPaymentRequiredEmailRequest",()=>[{no:1,name:"customer_org_id",kind:"scalar",T:9},{no:2,name:"billing_owner_org_id",kind:"scalar",T:9}]),Mh=s.makeMessageType("viam.app.v1.SendPaymentRequiredEmailResponse",[]),bh=s.makeMessageType("viam.app.v1.GetAvailableBillingTiersRequest",[]),Oh=s.makeMessageType("viam.app.v1.GetAvailableBillingTiersResponse",()=>[{no:1,name:"tiers",kind:"scalar",T:9,repeated:!0}]),wh=s.makeMessageType("viam.app.v1.UpdateOrganizationBillingTierRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"billing_tier",kind:"scalar",T:9}]),Ch=s.makeMessageType("viam.app.v1.UpdateOrganizationBillingTierResponse",[]),Nh=s.makeMessageType("viam.app.v1.GetLocationBillingOrganizationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),Ph=s.makeMessageType("viam.app.v1.GetLocationBillingOrganizationResponse",()=>[{no:1,name:"billing_organization_id",kind:"scalar",T:9}]),Dh=s.makeMessageType("viam.app.v1.UpdateLocationBillingOrganizationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"billing_organization_id",kind:"scalar",T:9}]),Ah=s.makeMessageType("viam.app.v1.UpdateLocationBillingOrganizationResponse",[]),Uh=s.makeMessageType("viam.app.v1.ChargeOrganizationRequest",()=>[{no:1,name:"org_id_to_charge",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9,opt:!0},{no:3,name:"subtotal",kind:"scalar",T:1},{no:4,name:"tax",kind:"scalar",T:1},{no:5,name:"org_id_for_branding",kind:"scalar",T:9,opt:!0},{no:6,name:"disable_confirmation_email",kind:"scalar",T:8}]),qh=s.makeMessageType("viam.app.v1.ChargeOrganizationResponse",()=>[{no:1,name:"invoice_id",kind:"scalar",T:9}]),Lh=s.makeMessageType("viam.app.v1.CreateInvoiceAndChargeImmediatelyRequest",()=>[{no:1,name:"org_id_to_charge",kind:"scalar",T:9},{no:2,name:"amount",kind:"scalar",T:1},{no:3,name:"description",kind:"scalar",T:9,opt:!0},{no:4,name:"org_id_for_branding",kind:"scalar",T:9,opt:!0},{no:5,name:"disable_email",kind:"scalar",T:8}]),Gh=s.makeMessageType("viam.app.v1.CreateInvoiceAndChargeImmediatelyResponse",()=>[{no:1,name:"invoice_id",kind:"scalar",T:9}]),CS=Object.freeze(Object.defineProperty({__proto__:null,ChargeOrganizationRequest:Uh,ChargeOrganizationResponse:qh,CreateInvoiceAndChargeImmediatelyRequest:Lh,CreateInvoiceAndChargeImmediatelyResponse:Gh,GetAvailableBillingTiersRequest:bh,GetAvailableBillingTiersResponse:Oh,GetCurrentMonthUsageRequest:gh,GetCurrentMonthUsageResponse:vh,GetInvoicePdfRequest:Sh,GetInvoicePdfResponse:Ih,GetInvoicesSummaryRequest:Rh,GetInvoicesSummaryResponse:_h,GetLocationBillingOrganizationRequest:Nh,GetLocationBillingOrganizationResponse:Ph,GetOrgBillingInformationRequest:hh,GetOrgBillingInformationResponse:fh,InvoiceSummary:dh,PaymentMethodCard:lh,PaymentMethodType:rh,PaymentMethodUSBankAccount:uh,ResourceUsageCosts:yh,ResourceUsageCostsBySource:kh,SendPaymentRequiredEmailRequest:Eh,SendPaymentRequiredEmailResponse:Mh,SourceType:ch,UpdateLocationBillingOrganizationRequest:Dh,UpdateLocationBillingOrganizationResponse:Ah,UpdateOrganizationBillingTierRequest:wh,UpdateOrganizationBillingTierResponse:Ch,UsageCost:Th,UsageCostType:mh,VerificationInfo:ph},Symbol.toStringTag,{value:"Module"})),NS={typeName:"viam.app.v1.BillingService",methods:{getCurrentMonthUsage:{name:"GetCurrentMonthUsage",I:gh,O:vh,kind:m.Unary},getOrgBillingInformation:{name:"GetOrgBillingInformation",I:hh,O:fh,kind:m.Unary},getInvoicesSummary:{name:"GetInvoicesSummary",I:Rh,O:_h,kind:m.Unary},getInvoicePdf:{name:"GetInvoicePdf",I:Sh,O:Ih,kind:m.ServerStreaming},sendPaymentRequiredEmail:{name:"SendPaymentRequiredEmail",I:Eh,O:Mh,kind:m.Unary},getAvailableBillingTiers:{name:"GetAvailableBillingTiers",I:bh,O:Oh,kind:m.Unary},updateOrganizationBillingTier:{name:"UpdateOrganizationBillingTier",I:wh,O:Ch,kind:m.Unary},getLocationBillingOrganization:{name:"GetLocationBillingOrganization",I:Nh,O:Ph,kind:m.Unary},updateLocationBillingOrganization:{name:"UpdateLocationBillingOrganization",I:Dh,O:Ah,kind:m.Unary},chargeOrganization:{name:"ChargeOrganization",I:Uh,O:qh,kind:m.Unary},createInvoiceAndChargeImmediately:{name:"CreateInvoiceAndChargeImmediately",I:Lh,O:Gh,kind:m.Unary}}};class PS{client;constructor(e){this.client=W(NS,e)}async getCurrentMonthUsage(e){const n=await this.client.getCurrentMonthUsage({orgId:e});return n.start=n.startDate?.toDate(),n.end=n.endDate?.toDate(),n}async getOrgBillingInformation(e){return this.client.getOrgBillingInformation({orgId:e})}async getInvoicesSummary(e){return this.client.getInvoicesSummary({orgId:e})}async getInvoicePdf(e,n){const a=this.client.getInvoicePdf({id:e,orgId:n}),o=[];for await(const i of a)o.push(i.chunk);return DS(o)}}const DS=t=>{const e=t.reduce((o,i)=>o+i.length,0),n=new Uint8Array(e);let a=0;for(const o of t)n.set(o,a),a+=o.length;return n};var Bh={},Fh={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){var n=function(){function y(h){this._id=new Uint8Array(h)}return y.prototype.buffer=function(){return this._id},y}();e.UUID=n;var a=function(){function y(h){this._id=new Uint8Array(h)}return y.prototype.buffer=function(){return this._id},y}();e.ObjectId=a;var o=function(){function y(h){this._time=typeof h!="string"?new Uint8Array(h||R(Date.now())):R(+new Date(h))}return y.prototype.buffer=function(){return this._time},y.prototype.fromString=function(h){this._time=R(+new Date(h))},y.prototype.toNumber=function(){return E(this._time)},y.prototype.toDate=function(){return new Date(E(this._time))},y}();e.UTC=o;function i(y){var h=5;for(var k in y)h+=r(k,y[k]);return h}function r(y,h){var k=1;if(y&&(k+=J(y)+1),h==null)return k;switch(h.constructor){case String:return k+4+J(h)+1;case Number:return Math.floor(h)===h&&h<=2147483647&&h>=-2147483647?k+4:k+8;case Boolean:return k+1;case Array:case Object:return k+i(h);case Int8Array:case Uint8Array:return k+5+h.byteLength;case Date:case o:return k+8;case n:return k+5+16;case a:return k+12;default:return 0}}function c(y){var h=new Uint8Array(i(y));return l(y,h),h}e.serialize=c;function l(y,h,k){if(k===void 0&&(k=0),k+=g(h.length,h,k),y.constructor===Array)for(var v=0,b=y.length;v<b;v++)k=f(v.toString(),y[v],h,k);else for(var M in y)k=f(M,y[M],h,k);return h[k++]=0,k}function d(y,h,k){var v=w(y),b=v.length;return h.set(v,k),h[k+b++]=0,b}function g(y,h,k){return h[k++]=y&255,h[k++]=y>>>8&255,h[k++]=y>>>16&255,h[k++]=y>>>24&255,4}function f(y,h,k,v){if(h==null)return k[v++]=10,v+=d(y,k,v),v;switch(h.constructor){case String:k[v++]=2,v+=d(y,k,v);var b=d(h,k,v+4);return v+=g(b,k,v),v+b;case Number:if(Math.floor(h)===h)h<=2147483647&&h>=-2147483647?(k[v++]=16,v+=d(y,k,v),v+=g(h,k,v)):(k[v++]=18,v+=d(y,k,v),k.set(R(h),v),v+=8);else{k[v++]=1,v+=d(y,k,v);var M=new Float64Array([h]),ne=new Uint8Array(M.buffer);k.set(ne,v),v+=8}return v;case Boolean:return k[v++]=8,v+=d(y,k,v),k[v++]=h?1:0,v;case Array:case Object:k[v++]=h.constructor===Array?4:3,v+=d(y,k,v);var q=l(h,k,v);return g(q-v,k,v),q;case Int8Array:case Uint8Array:return k[v++]=5,v+=d(y,k,v),v+=g(h.byteLength,k,v),k[v++]=0,k.set(h,v),v+=h.byteLength,v;case Date:return k[v++]=9,v+=d(y,k,v),k.set(R(h.getTime()),v),v+=8,v;case o:return k[v++]=9,v+=d(y,k,v),k.set(h.buffer(),v),v+=8,v;case n:return k[v++]=5,v+=d(y,k,v),v+=g(16,k,v),k[v++]=4,k.set(h.buffer(),v),v+=16,v;case a:return k[v++]=7,v+=d(y,k,v),k.set(h.buffer(),v),v+=12,v;case RegExp:return k[v++]=11,v+=d(y,k,v),v+=d(h.source,k,v),h.global&&(k[v++]=115),h.ignoreCase&&(k[v++]=105),h.multiline&&(k[v++]=109),k[v++]=0,v;default:return v}}function I(y,h,k,v){if(h===void 0&&(h=!1),k===void 0&&(k=0),v===void 0&&(v=!1),!(y.length<5)){var b=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24;if(!(b<5||b>y.length)&&y[y.length-1]===0){for(var M=v?[]:{};;){var ne=y[k++];if(ne===0)break;for(var q=k;y[q]!==0&&q<y.length;q++);if(q>=y.length-1)return;var z=N(y.subarray(k,q));switch(v&&(z=parseInt(z)),k=++q,ne){case 1:M[z]=new Float64Array(y.slice(k,k+=8).buffer)[0];break;case 2:b=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24,M[z]=N(y.subarray(k,k+=b-1)),k++;break;case 3:b=y[k]|y[k+1]<<8|y[k+2]<<16|y[k+3]<<24,M[z]=I(y,h,k,!1),k+=b;break;case 4:b=y[k]|y[k+1]<<8|y[k+2]<<16|y[k+3]<<24,M[z]=I(y,h,k,!0),k+=b;break;case 5:if(b=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24,y[k++]===4){if(b!==16)return;M[z]=new n(y.subarray(k,k+=b))}else M[z]=y.slice(k,k+=b);break;case 6:M[z]=null;break;case 7:M[z]=new a(y.subarray(k,k+=12));break;case 8:M[z]=y[k++]===1;break;case 9:M[z]=h?new o(y.subarray(k,k+=8)):new Date(E(y.subarray(k,k+=8)));break;case 10:M[z]=null;break;case 11:for(q=k;q<y.length&&y[q++]!==0;);if(q>=y.length)return;var vi=N(y.subarray(k,q));for(k=q;q<y.length&&y[q++]!==0;);if(q>=y.length)return;var hi=N(y.subarray(k,q));k=q,M[z]=new RegExp(vi,hi);break;case 16:M[z]=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24;break;case 18:M[z]=E(y.subarray(k,k+=8));break;default:return}}return M}}}e.deserialize=I;function R(y){var h=new Uint8Array(8);if(Math.floor(y)===y){var k=4294967296,v=y%k|0,b=y/k|0;y<0&&(v=~(-y%k)|0,b=~(-y/k)|0,v=v+1&4294967295,v||b++);var M=0;h[M++]=v&255,h[M++]=v>>>8&255,h[M++]=v>>>16&255,h[M++]=v>>>24&255,h[M++]=b&255,h[M++]=b>>>8&255,h[M++]=b>>>16&255,h[M]=b>>>24&255}else{var ne=new Float64Array([y]),q=new Uint8Array(ne.buffer);h.set(q)}return h}function E(y,h){h===void 0&&(h=0);var k=4294967296,v=y[h++]|y[h++]<<8|y[h++]<<16|y[h++]<<24,b=y[h++]|y[h++]<<8|y[h++]<<16|y[h]<<24;return b*k+(v>=0?v:k+v)}function w(y){y=y.replace(/\r\n/g,`
|
|
9
|
-
`);for(var h=[],k=0,v=0,b=y.length;v<b;v++){var M=y.charCodeAt(v);M<128?h[k++]=M:M<2048?(h[k++]=M>>>6|192,h[k++]=M&63|128):(h[k++]=M>>>12|224,h[k++]=M>>>6&63|128,h[k++]=M&63|128)}return new Uint8Array(h)}function N(y){for(var h="",k=y.length,v=0,b,M,ne;v<k;)b=y[v],b<128?(h+=String.fromCharCode(b),v++):b>191&&b<224?(M=y[v+1],h+=String.fromCharCode((b&31)<<6|M&63),v+=2):(M=y[v+1],ne=y[v+2],h+=String.fromCharCode((b&15)<<12|(M&63)<<6|ne&63),v+=3);return h}function J(y){return encodeURI(y).split(/%..|./).length-1}}(t.BSON||(t.BSON={}))})(Fh),Object.defineProperty(Bh,"__esModule",{value:!0});var AS=Fh,Jn=Bh.BSON=AS.BSON;const US={typeName:"viam.app.data.v1.DataService",methods:{tabularDataByFilter:{name:"TabularDataByFilter",I:op,O:ip,kind:m.Unary},tabularDataBySQL:{name:"TabularDataBySQL",I:mp,O:cp,kind:m.Unary},tabularDataByMQL:{name:"TabularDataByMQL",I:dp,O:lp,kind:m.Unary},exportTabularData:{name:"ExportTabularData",I:pp,O:up,kind:m.ServerStreaming},getLatestTabularData:{name:"GetLatestTabularData",I:gp,O:Tp,kind:m.Unary},binaryDataByFilter:{name:"BinaryDataByFilter",I:kp,O:yp,kind:m.Unary},binaryDataByIDs:{name:"BinaryDataByIDs",I:vp,O:hp,kind:m.Unary},deleteTabularData:{name:"DeleteTabularData",I:Sp,O:Ip,kind:m.Unary},deleteBinaryDataByFilter:{name:"DeleteBinaryDataByFilter",I:Ep,O:Mp,kind:m.Unary},deleteBinaryDataByIDs:{name:"DeleteBinaryDataByIDs",I:bp,O:Op,kind:m.Unary},addTagsToBinaryDataByIDs:{name:"AddTagsToBinaryDataByIDs",I:wp,O:Cp,kind:m.Unary},addTagsToBinaryDataByFilter:{name:"AddTagsToBinaryDataByFilter",I:Np,O:Pp,kind:m.Unary},removeTagsFromBinaryDataByIDs:{name:"RemoveTagsFromBinaryDataByIDs",I:Dp,O:Ap,kind:m.Unary},removeTagsFromBinaryDataByFilter:{name:"RemoveTagsFromBinaryDataByFilter",I:Up,O:qp,kind:m.Unary},tagsByFilter:{name:"TagsByFilter",I:Lp,O:Gp,kind:m.Unary},addBoundingBoxToImageByID:{name:"AddBoundingBoxToImageByID",I:Bp,O:Fp,kind:m.Unary},removeBoundingBoxFromImageByID:{name:"RemoveBoundingBoxFromImageByID",I:xp,O:Jp,kind:m.Unary},boundingBoxLabelsByFilter:{name:"BoundingBoxLabelsByFilter",I:$p,O:Yp,kind:m.Unary},updateBoundingBox:{name:"UpdateBoundingBox",I:zp,O:Vp,kind:m.Unary},getDatabaseConnection:{name:"GetDatabaseConnection",I:Hp,O:Kp,kind:m.Unary},configureDatabaseUser:{name:"ConfigureDatabaseUser",I:Wp,O:jp,kind:m.Unary},addBinaryDataToDatasetByIDs:{name:"AddBinaryDataToDatasetByIDs",I:Xp,O:Qp,kind:m.Unary},removeBinaryDataFromDatasetByIDs:{name:"RemoveBinaryDataFromDatasetByIDs",I:Zp,O:eu,kind:m.Unary},createIndex:{name:"CreateIndex",I:nu,O:au,kind:m.Unary},listIndexes:{name:"ListIndexes",I:ou,O:iu,kind:m.Unary},deleteIndex:{name:"DeleteIndex",I:tu,O:su,kind:m.Unary},createSavedQuery:{name:"CreateSavedQuery",I:mu,O:cu,kind:m.Unary},updateSavedQuery:{name:"UpdateSavedQuery",I:gu,O:Tu,kind:m.Unary},getSavedQuery:{name:"GetSavedQuery",I:pu,O:uu,kind:m.Unary},deleteSavedQuery:{name:"DeleteSavedQuery",I:du,O:lu,kind:m.Unary},listSavedQueries:{name:"ListSavedQueries",I:ku,O:yu,kind:m.Unary},createBinaryDataSignedURL:{name:"CreateBinaryDataSignedURL",I:vu,O:hu,kind:m.Unary}}},qS=s.makeEnum("viam.app.datapipelines.v1.DataPipelineRunStatus",[{no:0,name:"DATA_PIPELINE_RUN_STATUS_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"DATA_PIPELINE_RUN_STATUS_SCHEDULED",localName:"SCHEDULED"},{no:2,name:"DATA_PIPELINE_RUN_STATUS_STARTED",localName:"STARTED"},{no:3,name:"DATA_PIPELINE_RUN_STATUS_COMPLETED",localName:"COMPLETED"},{no:4,name:"DATA_PIPELINE_RUN_STATUS_FAILED",localName:"FAILED"}]),xh=s.makeMessageType("viam.app.datapipelines.v1.DataPipeline",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:5,name:"schedule",kind:"scalar",T:9},{no:6,name:"enabled",kind:"scalar",T:8},{no:7,name:"created_on",kind:"message",T:S},{no:8,name:"updated_at",kind:"message",T:S},{no:9,name:"data_source_type",kind:"enum",T:s.getEnumType(en),opt:!0}]),LS=s.makeMessageType("viam.app.datapipelines.v1.GetDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),GS=s.makeMessageType("viam.app.datapipelines.v1.GetDataPipelineResponse",()=>[{no:1,name:"data_pipeline",kind:"message",T:xh}]),BS=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelinesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),FS=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelinesResponse",()=>[{no:1,name:"data_pipelines",kind:"message",T:xh,repeated:!0}]),xS=s.makeMessageType("viam.app.datapipelines.v1.CreateDataPipelineRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:4,name:"schedule",kind:"scalar",T:9},{no:5,name:"enable_backfill",kind:"scalar",T:8,opt:!0},{no:6,name:"data_source_type",kind:"enum",T:s.getEnumType(en),opt:!0}]),JS=s.makeMessageType("viam.app.datapipelines.v1.CreateDataPipelineResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),zS=s.makeMessageType("viam.app.datapipelines.v1.RenameDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),VS=s.makeMessageType("viam.app.datapipelines.v1.RenameDataPipelineResponse",[]),$S=s.makeMessageType("viam.app.datapipelines.v1.DeleteDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),YS=s.makeMessageType("viam.app.datapipelines.v1.DeleteDataPipelineResponse",[]),WS=s.makeMessageType("viam.app.datapipelines.v1.EnableDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),jS=s.makeMessageType("viam.app.datapipelines.v1.EnableDataPipelineResponse",[]),HS=s.makeMessageType("viam.app.datapipelines.v1.DisableDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),KS=s.makeMessageType("viam.app.datapipelines.v1.DisableDataPipelineResponse",[]),XS=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelineRunsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_size",kind:"scalar",T:13},{no:3,name:"page_token",kind:"scalar",T:9}]),QS=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelineRunsResponse",()=>[{no:1,name:"pipeline_id",kind:"scalar",T:9},{no:2,name:"runs",kind:"message",T:ZS,repeated:!0},{no:3,name:"next_page_token",kind:"scalar",T:9}]),ZS=s.makeMessageType("viam.app.datapipelines.v1.DataPipelineRun",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"start_time",kind:"message",T:S},{no:3,name:"end_time",kind:"message",T:S},{no:4,name:"data_start_time",kind:"message",T:S},{no:5,name:"data_end_time",kind:"message",T:S},{no:6,name:"status",kind:"enum",T:s.getEnumType(qS)},{no:7,name:"error_message",kind:"scalar",T:9}]),eI={typeName:"viam.app.datapipelines.v1.DataPipelinesService",methods:{getDataPipeline:{name:"GetDataPipeline",I:LS,O:GS,kind:m.Unary},listDataPipelines:{name:"ListDataPipelines",I:BS,O:FS,kind:m.Unary},createDataPipeline:{name:"CreateDataPipeline",I:xS,O:JS,kind:m.Unary},renameDataPipeline:{name:"RenameDataPipeline",I:zS,O:VS,kind:m.Unary},deleteDataPipeline:{name:"DeleteDataPipeline",I:$S,O:YS,kind:m.Unary},enableDataPipeline:{name:"EnableDataPipeline",I:WS,O:jS,kind:m.Unary},disableDataPipeline:{name:"DisableDataPipeline",I:HS,O:KS,kind:m.Unary},listDataPipelineRuns:{name:"ListDataPipelineRuns",I:XS,O:QS,kind:m.Unary}}},Jh=s.makeMessageType("viam.app.dataset.v1.Dataset",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"organization_id",kind:"scalar",T:9},{no:4,name:"time_created",kind:"message",T:S}]),nI=s.makeMessageType("viam.app.dataset.v1.CreateDatasetRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),aI=s.makeMessageType("viam.app.dataset.v1.CreateDatasetResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),tI=s.makeMessageType("viam.app.dataset.v1.DeleteDatasetRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),sI=s.makeMessageType("viam.app.dataset.v1.DeleteDatasetResponse",[]),oI=s.makeMessageType("viam.app.dataset.v1.RenameDatasetRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),iI=s.makeMessageType("viam.app.dataset.v1.RenameDatasetResponse",[]),rI=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByOrganizationIDRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),mI=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByOrganizationIDResponse",()=>[{no:1,name:"datasets",kind:"message",T:Jh,repeated:!0}]),cI=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByIDsRequest",()=>[{no:1,name:"ids",kind:"scalar",T:9,repeated:!0}]),dI=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByIDsResponse",()=>[{no:1,name:"datasets",kind:"message",T:Jh,repeated:!0}]),lI=s.makeMessageType("viam.app.dataset.v1.MergeDatasetsRequest",()=>[{no:1,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"organization_id",kind:"scalar",T:9}]),pI=s.makeMessageType("viam.app.dataset.v1.MergeDatasetsResponse",()=>[{no:1,name:"dataset_id",kind:"scalar",T:9}]),uI={typeName:"viam.app.dataset.v1.DatasetService",methods:{createDataset:{name:"CreateDataset",I:nI,O:aI,kind:m.Unary},deleteDataset:{name:"DeleteDataset",I:tI,O:sI,kind:m.Unary},renameDataset:{name:"RenameDataset",I:oI,O:iI,kind:m.Unary},listDatasetsByOrganizationID:{name:"ListDatasetsByOrganizationID",I:rI,O:mI,kind:m.Unary},listDatasetsByIDs:{name:"ListDatasetsByIDs",I:cI,O:dI,kind:m.Unary},mergeDatasets:{name:"MergeDatasets",I:lI,O:pI,kind:m.Unary}}},zh=s.makeEnum("viam.app.datasync.v1.MimeType",[{no:0,name:"MIME_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MIME_TYPE_IMAGE_JPEG",localName:"IMAGE_JPEG"},{no:2,name:"MIME_TYPE_IMAGE_PNG",localName:"IMAGE_PNG"},{no:3,name:"MIME_TYPE_APPLICATION_PCD",localName:"APPLICATION_PCD"},{no:4,name:"MIME_TYPE_VIDEO_MP4",localName:"VIDEO_MP4"}]),Ha=s.makeEnum("viam.app.datasync.v1.DataType",[{no:0,name:"DATA_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"DATA_TYPE_BINARY_SENSOR",localName:"BINARY_SENSOR"},{no:2,name:"DATA_TYPE_TABULAR_SENSOR",localName:"TABULAR_SENSOR"},{no:3,name:"DATA_TYPE_FILE",localName:"FILE"}]),ni=s.makeMessageType("viam.app.datasync.v1.DataCaptureUploadRequest",()=>[{no:1,name:"metadata",kind:"message",T:vn},{no:2,name:"sensor_contents",kind:"message",T:si,repeated:!0}]),gI=s.makeMessageType("viam.app.datasync.v1.DataCaptureUploadResponse",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"binary_data_id",kind:"scalar",T:9}]),ai=s.makeMessageType("viam.app.datasync.v1.FileUploadRequest",()=>[{no:1,name:"metadata",kind:"message",T:vn,oneof:"upload_packet"},{no:2,name:"file_contents",kind:"message",T:Vh,oneof:"upload_packet"}]),TI=s.makeMessageType("viam.app.datasync.v1.FileUploadResponse",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"binary_data_id",kind:"scalar",T:9}]),kI=s.makeMessageType("viam.app.datasync.v1.StreamingDataCaptureUploadRequest",()=>[{no:1,name:"metadata",kind:"message",T:vI,oneof:"upload_packet"},{no:2,name:"data",kind:"scalar",T:12,oneof:"upload_packet"}]),yI=s.makeMessageType("viam.app.datasync.v1.StreamingDataCaptureUploadResponse",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"binary_data_id",kind:"scalar",T:9}]),ti=s.makeMessageType("viam.app.datasync.v1.SensorMetadata",()=>[{no:1,name:"time_requested",kind:"message",T:S},{no:2,name:"time_received",kind:"message",T:S},{no:3,name:"mime_type",kind:"enum",T:s.getEnumType(zh)},{no:4,name:"annotations",kind:"message",T:Aa}]),si=s.makeMessageType("viam.app.datasync.v1.SensorData",()=>[{no:1,name:"metadata",kind:"message",T:ti},{no:2,name:"struct",kind:"message",T:p,oneof:"data"},{no:3,name:"binary",kind:"scalar",T:12,oneof:"data"}]),Vh=s.makeMessageType("viam.app.datasync.v1.FileData",()=>[{no:1,name:"data",kind:"scalar",T:12}]),vn=s.makeMessageType("viam.app.datasync.v1.UploadMetadata",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"component_type",kind:"scalar",T:9},{no:3,name:"component_name",kind:"scalar",T:9},{no:5,name:"method_name",kind:"scalar",T:9},{no:6,name:"type",kind:"enum",T:s.getEnumType(Ha)},{no:7,name:"file_name",kind:"scalar",T:9},{no:8,name:"method_parameters",kind:"map",K:9,V:{kind:"message",T:K}},{no:9,name:"file_extension",kind:"scalar",T:9},{no:10,name:"tags",kind:"scalar",T:9,repeated:!0},{no:12,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:13,name:"mime_type",kind:"scalar",T:9}]),vI=s.makeMessageType("viam.app.datasync.v1.DataCaptureUploadMetadata",()=>[{no:1,name:"upload_metadata",kind:"message",T:vn},{no:2,name:"sensor_metadata",kind:"message",T:ti}]),hI={typeName:"viam.app.datasync.v1.DataSyncService",methods:{dataCaptureUpload:{name:"DataCaptureUpload",I:ni,O:gI,kind:m.Unary},fileUpload:{name:"FileUpload",I:ai,O:TI,kind:m.ClientStreaming},streamingDataCaptureUpload:{name:"StreamingDataCaptureUpload",I:kI,O:yI,kind:m.ClientStreaming}}},Ge=()=>{console.warn("The BinaryID type is deprecated and will be removed in a future release. Please migrate to the BinaryDataId field instead.")};class zn{dataClient;datasetClient;dataSyncClient;dataPipelinesClient;static UPLOAD_CHUNK_SIZE=1024*64;constructor(e){this.dataClient=W(US,e),this.datasetClient=W(uI,e),this.dataSyncClient=W(hI,e),this.dataPipelinesClient=W(eI,e)}async exportTabularData(e,n,a,o,i,r,c){const l=new Gn;i&&(l.start=S.fromDate(i)),r&&(l.end=S.fromDate(r));let d;c&&(d=p.fromJson(c));const g={partId:e,resourceName:n,resourceSubtype:a,methodName:o,interval:l,additionalParameters:d},f=this.dataClient.exportTabularData(g),I=[];for await(const R of f)I.push({partId:R.partId,resourceName:R.resourceName,resourceSubtype:R.resourceSubtype,methodName:R.methodName,timeCaptured:R.timeCaptured.toDate(),organizationId:R.organizationId,locationId:R.locationId,robotName:R.robotName,robotId:R.robotId,partName:R.partName,methodParameters:R.methodParameters.toJson(),tags:R.tags,payload:R.payload.toJson()});return I}async tabularDataBySQL(e,n){return(await this.dataClient.tabularDataBySQL({organizationId:e,sqlQuery:n})).rawData.map(o=>Jn.deserialize(o))}async tabularDataByMQL(e,n,a,o,i){const r=n[0]instanceof Uint8Array?n:n.map(d=>Jn.serialize(d));let c=o;return a&&(!c||c.type===en.UNSPECIFIED)&&(c=new wo({type:en.HOT_STORAGE})),(await this.dataClient.tabularDataByMQL({organizationId:e,mqlBinary:r,dataSource:c,queryPrefixName:i})).rawData.map(d=>Jn.deserialize(d))}async tabularDataByFilter(e,n,a,o="",i=!1,r=!1){const l={dataRequest:{filter:e,limit:n===void 0?void 0:BigInt(n),sortOrder:a,last:o},countOnly:i,includeInternalData:r},d=await this.dataClient.tabularDataByFilter(l),g=d.metadata.length,f=[];return f.push(...d.data.map(I=>{const R=I.metadataIndex,E=g!==0&&R>=g?new Da:d.metadata[R];return{data:I.data?.toJson(),metadata:E,timeRequested:I.timeRequested?.toDate(),timeReceived:I.timeRequested?.toDate()}})),{data:f,count:d.count,last:d.last}}async binaryDataByFilter(e,n,a,o="",i=!0,r=!1,c=!1){const d={dataRequest:{filter:e,limit:n===void 0?void 0:BigInt(n),sortOrder:a,last:o},includeBinary:i,countOnly:r,includeInternalData:c},g=await this.dataClient.binaryDataByFilter(d);return{data:g.data,count:g.count,last:g.last}}async binaryDataByIds(e,n=!0){return Array.isArray(e)&&typeof e[0]=="string"?(await this.dataClient.binaryDataByIDs({binaryDataIds:e,includeBinary:n})).data:(Ge(),(await this.dataClient.binaryDataByIDs({binaryIds:e,includeBinary:n})).data)}async createBinaryDataSignedURL(e,n){return(await this.dataClient.createBinaryDataSignedURL({binaryDataId:e,expirationMinutes:n})).signedUrl}async deleteTabularData(e,n){return(await this.dataClient.deleteTabularData({organizationId:e,deleteOlderThanDays:n})).deletedCount}async deleteBinaryDataByFilter(e,n=!0){return(await this.dataClient.deleteBinaryDataByFilter({filter:e,includeInternalData:n})).deletedCount}async deleteBinaryDataByIds(e){return Array.isArray(e)&&typeof e[0]=="string"?(await this.dataClient.deleteBinaryDataByIDs({binaryDataIds:e})).deletedCount:(Ge(),(await this.dataClient.deleteBinaryDataByIDs({binaryIds:e})).deletedCount)}async addTagsToBinaryDataByIds(e,n){if(Array.isArray(n)&&typeof n[0]=="string"){await this.dataClient.addTagsToBinaryDataByIDs({tags:e,binaryDataIds:n});return}Ge(),await this.dataClient.addTagsToBinaryDataByIDs({tags:e,binaryIds:n})}async addTagsToBinaryDataByFilter(e,n){await this.dataClient.addTagsToBinaryDataByFilter({tags:e,filter:n})}async removeTagsFromBinaryDataByIds(e,n){return Array.isArray(n)&&typeof n[0]=="string"?(await this.dataClient.removeTagsFromBinaryDataByIDs({tags:e,binaryDataIds:n})).deletedCount:(Ge(),(await this.dataClient.removeTagsFromBinaryDataByIDs({tags:e,binaryIds:n})).deletedCount)}async removeTagsFromBinaryDataByFilter(e,n){return(await this.dataClient.removeTagsFromBinaryDataByFilter({tags:e,filter:n})).deletedCount}async tagsByFilter(e){return(await this.dataClient.tagsByFilter({filter:e})).tags}async addBoundingBoxToImageById(e,n,a,o,i,r,c){return typeof e=="string"?(await this.dataClient.addBoundingBoxToImageByID({binaryDataId:e,label:n,xMinNormalized:a,yMinNormalized:o,xMaxNormalized:i,yMaxNormalized:r,confidence:c})).bboxId:(Ge(),(await this.dataClient.addBoundingBoxToImageByID({binaryId:e,label:n,xMinNormalized:a,yMinNormalized:o,xMaxNormalized:i,yMaxNormalized:r,confidence:c})).bboxId)}async removeBoundingBoxFromImageById(e,n){if(typeof e=="string"){await this.dataClient.removeBoundingBoxFromImageByID({binaryDataId:e,bboxId:n});return}Ge(),await this.dataClient.removeBoundingBoxFromImageByID({binaryId:e,bboxId:n})}async updateBoundingBox(e,n,a,o,i,r,c,l){if(typeof e=="string"){await this.dataClient.updateBoundingBox({binaryDataId:e,bboxId:n,label:a,xMinNormalized:o,yMinNormalized:i,xMaxNormalized:r,yMaxNormalized:c,confidence:l});return}Ge(),await this.dataClient.updateBoundingBox({binaryId:e,bboxId:n,label:a,xMinNormalized:o,yMinNormalized:i,xMaxNormalized:r,yMaxNormalized:c,confidence:l})}async boundingBoxLabelsByFilter(e){return(await this.dataClient.boundingBoxLabelsByFilter({filter:e})).labels}async configureDatabaseUser(e,n){await this.dataClient.configureDatabaseUser({organizationId:e,password:n})}async getDatabaseConnection(e){return(await this.dataClient.getDatabaseConnection({organizationId:e})).hostname}async addBinaryDataToDatasetByIds(e,n){if(Array.isArray(e)&&typeof e[0]=="string"){await this.dataClient.addBinaryDataToDatasetByIDs({binaryDataIds:e,datasetId:n});return}Ge(),await this.dataClient.addBinaryDataToDatasetByIDs({binaryIds:e,datasetId:n})}async removeBinaryDataFromDatasetByIds(e,n){if(Array.isArray(e)&&typeof e[0]=="string"){await this.dataClient.removeBinaryDataFromDatasetByIDs({binaryDataIds:e,datasetId:n});return}Ge(),await this.dataClient.removeBinaryDataFromDatasetByIDs({binaryIds:e,datasetId:n})}async createDataset(e,n){return(await this.datasetClient.createDataset({name:e,organizationId:n})).id}async deleteDataset(e){await this.datasetClient.deleteDataset({id:e})}async renameDataset(e,n){await this.datasetClient.renameDataset({id:e,name:n})}async listDatasetsByOrganizationID(e){return(await this.datasetClient.listDatasetsByOrganizationID({organizationId:e})).datasets.map(a=>({created:a.timeCreated?.toDate(),...a}))}async listDatasetsByIds(e){return(await this.datasetClient.listDatasetsByIDs({ids:e})).datasets.map(a=>({created:a.timeCreated?.toDate(),...a}))}async tabularDataCaptureUpload(e,n,a,o,i,r,c){if(r.length!==e.length)throw new Error("dataRequestTimes and data lengths must be equal.");const l=new vn({partId:n,componentType:a,componentName:o,methodName:i,type:Ha.TABULAR_SENSOR,tags:c}),d=[];for(const[I,R]of e.entries()){const E=new ti,w=r[I];w&&(E.timeRequested=S.fromDate(w[0]),E.timeReceived=S.fromDate(w[1])),d.push(new si({metadata:E,data:{case:"struct",value:p.fromJson(R)}}))}const g=new ni({metadata:l,sensorContents:d});return(await this.dataSyncClient.dataCaptureUpload(g)).fileId}async binaryDataCaptureUpload(e,n,a,o,i,r,c,l,d){const g=new vn({partId:n,componentType:a,componentName:o,methodName:i,type:Ha.BINARY_SENSOR,tags:l,fileExtension:r,datasetIds:d}),f=new si({metadata:{timeRequested:S.fromDate(c[0]),timeReceived:S.fromDate(c[1])},data:{case:"binary",value:e}}),I=new ni({metadata:g,sensorContents:[f]});return(await this.dataSyncClient.dataCaptureUpload(I)).binaryDataId}async fileUpload(e,n,a){const o=new vn({partId:n,type:Ha.FILE,...a});return(await this.dataSyncClient.fileUpload(zn.fileUploadRequests(o,e))).binaryDataId}static async*fileUploadRequests(e,n){yield new ai({uploadPacket:{case:"metadata",value:e}});for(let a=0;a<n.length;a+=zn.UPLOAD_CHUNK_SIZE){let o=a+zn.UPLOAD_CHUNK_SIZE;o>n.length&&(o=n.length),yield new ai({uploadPacket:{case:"fileContents",value:new Vh({data:n.slice(a,o)})}})}}static createFilter(e){const n=new Ye(e);if(e.startTime??e.endTime){const o=new Gn;e.startTime&&(o.start=S.fromDate(e.startTime)),e.endTime&&(o.end=S.fromDate(e.endTime)),n.interval=o}const a=new Oo;return e.tags&&(a.tags=e.tags,n.tagsFilter=a),n}async getLatestTabularData(e,n,a,o,i){let r;i&&(r=p.fromJson(i));const c=await this.dataClient.getLatestTabularData({partId:e,resourceName:n,resourceSubtype:a,methodName:o,additionalParameters:r});return!c.payload||!c.timeCaptured||!c.timeSynced?null:[c.timeCaptured.toDate(),c.timeSynced.toDate(),c.payload.toJson()]}async listDataPipelines(e){return(await this.dataPipelinesClient.listDataPipelines({organizationId:e})).dataPipelines}async getDataPipeline(e){return(await this.dataPipelinesClient.getDataPipeline({id:e})).dataPipeline??null}async createDataPipeline(e,n,a,o,i,r){const c=a[0]instanceof Uint8Array?a:a.map(g=>Jn.serialize(g)),l=r??en.STANDARD;return(await this.dataPipelinesClient.createDataPipeline({organizationId:e,name:n,mqlBinary:c,schedule:o,enableBackfill:i,dataSourceType:l})).id}async deleteDataPipeline(e){await this.dataPipelinesClient.deleteDataPipeline({id:e})}async listDataPipelineRuns(e,n){const a=await this.dataPipelinesClient.listDataPipelineRuns({id:e,pageSize:n});return new Ka(this.dataPipelinesClient,e,a.runs,n,a.nextPageToken)}async createIndex(e,n,a,o){await this.dataClient.createIndex({organizationId:e,collectionType:n,indexSpec:[Jn.serialize(a)],pipelineName:o})}async listIndexes(e,n,a){return(await this.dataClient.listIndexes({organizationId:e,collectionType:n,pipelineName:a})).indexes}async deleteIndex(e,n,a,o){await this.dataClient.deleteIndex({organizationId:e,collectionType:n,indexName:a,pipelineName:o})}}class Ka{constructor(e,n,a=[],o,i){this.dataPipelinesClient=e,this.pipelineId=n,this.runs=a,this.pageSize=o,this.nextPageToken=i}async nextPage(){if(this.nextPageToken===void 0||this.nextPageToken==="")return new Ka(this.dataPipelinesClient,this.pipelineId,[],this.pageSize,"");const e=await this.dataPipelinesClient.listDataPipelineRuns({id:this.pipelineId,pageSize:this.pageSize,pageToken:this.nextPageToken});return new Ka(this.dataPipelinesClient,this.pipelineId,e.runs,this.pageSize,e.nextPageToken)}}const fI={typeName:"viam.app.mltraining.v1.MLTrainingService",methods:{submitTrainingJob:{name:"SubmitTrainingJob",I:ng,O:ag,kind:m.Unary},submitCustomTrainingJob:{name:"SubmitCustomTrainingJob",I:tg,O:sg,kind:m.Unary},getTrainingJob:{name:"GetTrainingJob",I:og,O:ig,kind:m.Unary},listTrainingJobs:{name:"ListTrainingJobs",I:rg,O:mg,kind:m.Unary},cancelTrainingJob:{name:"CancelTrainingJob",I:cg,O:dg,kind:m.Unary},deleteCompletedTrainingJob:{name:"DeleteCompletedTrainingJob",I:lg,O:pg,kind:m.Unary},getTrainingJobLogs:{name:"GetTrainingJobLogs",I:gg,O:Tg,kind:m.Unary},listSupportedContainers:{name:"ListSupportedContainers",I:kg,O:yg,kind:m.Unary}}};class RI{client;constructor(e){this.client=W(fI,e)}async submitTrainingJob(e,n,a,o,i,r){return(await this.client.submitTrainingJob({organizationId:e,datasetId:n,modelName:a,modelVersion:o,modelType:i,tags:r})).id}async submitCustomTrainingJob(e,n,a,o,i,r){return(await this.client.submitCustomTrainingJob({organizationId:e,datasetId:n,registryItemId:a,registryItemVersion:o,modelName:i,modelVersion:r})).id}async getTrainingJob(e){return(await this.client.getTrainingJob({id:e})).metadata}async listTrainingJobs(e,n){return(await this.client.listTrainingJobs({organizationId:e,status:n})).jobs}async cancelTrainingJob(e){return await this.client.cancelTrainingJob({id:e}),null}async deleteCompletedTrainingJob(e){return await this.client.deleteCompletedTrainingJob({id:e}),null}}const $h=s.makeMessageType("viam.provisioning.v1.ExitProvisioningRequest",[]),Yh=s.makeMessageType("viam.provisioning.v1.ExitProvisioningResponse",[]),Wh=s.makeMessageType("viam.provisioning.v1.GetSmartMachineStatusRequest",[]),jh=s.makeMessageType("viam.provisioning.v1.GetSmartMachineStatusResponse",()=>[{no:1,name:"provisioning_info",kind:"message",T:nf},{no:2,name:"has_smart_machine_credentials",kind:"scalar",T:8},{no:3,name:"is_online",kind:"scalar",T:8},{no:4,name:"latest_connection_attempt",kind:"message",T:oi},{no:5,name:"errors",kind:"scalar",T:9,repeated:!0},{no:6,name:"agent_version",kind:"scalar",T:9}]),Hh=s.makeMessageType("viam.provisioning.v1.SetNetworkCredentialsRequest",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"ssid",kind:"scalar",T:9},{no:3,name:"psk",kind:"scalar",T:9}]),Kh=s.makeMessageType("viam.provisioning.v1.SetNetworkCredentialsResponse",[]),Xh=s.makeMessageType("viam.provisioning.v1.SetSmartMachineCredentialsRequest",()=>[{no:1,name:"cloud",kind:"message",T:ii}]),Qh=s.makeMessageType("viam.provisioning.v1.SetSmartMachineCredentialsResponse",[]),Zh=s.makeMessageType("viam.provisioning.v1.GetNetworkListRequest",[]),ef=s.makeMessageType("viam.provisioning.v1.GetNetworkListResponse",()=>[{no:1,name:"networks",kind:"message",T:oi,repeated:!0}]),nf=s.makeMessageType("viam.provisioning.v1.ProvisioningInfo",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"model",kind:"scalar",T:9},{no:3,name:"manufacturer",kind:"scalar",T:9}]),oi=s.makeMessageType("viam.provisioning.v1.NetworkInfo",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"ssid",kind:"scalar",T:9},{no:3,name:"security",kind:"scalar",T:9},{no:4,name:"signal",kind:"scalar",T:5},{no:5,name:"connected",kind:"scalar",T:8},{no:6,name:"last_error",kind:"scalar",T:9}]),ii=s.makeMessageType("viam.provisioning.v1.CloudConfig",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"secret",kind:"scalar",T:9},{no:3,name:"app_address",kind:"scalar",T:9},{no:4,name:"api_key",kind:"message",T:af}]),af=s.makeMessageType("viam.provisioning.v1.APIKey",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]),_I=Object.freeze(Object.defineProperty({__proto__:null,APIKey:af,CloudConfig:ii,ExitProvisioningRequest:$h,ExitProvisioningResponse:Yh,GetNetworkListRequest:Zh,GetNetworkListResponse:ef,GetSmartMachineStatusRequest:Wh,GetSmartMachineStatusResponse:jh,NetworkInfo:oi,ProvisioningInfo:nf,SetNetworkCredentialsRequest:Hh,SetNetworkCredentialsResponse:Kh,SetSmartMachineCredentialsRequest:Xh,SetSmartMachineCredentialsResponse:Qh},Symbol.toStringTag,{value:"Module"})),SI={typeName:"viam.provisioning.v1.ProvisioningService",methods:{getSmartMachineStatus:{name:"GetSmartMachineStatus",I:Wh,O:jh,kind:m.Unary},setNetworkCredentials:{name:"SetNetworkCredentials",I:Hh,O:Kh,kind:m.Unary},setSmartMachineCredentials:{name:"SetSmartMachineCredentials",I:Xh,O:Qh,kind:m.Unary},getNetworkList:{name:"GetNetworkList",I:Zh,O:ef,kind:m.Unary},exitProvisioning:{name:"ExitProvisioning",I:$h,O:Yh,kind:m.Unary}}};class II{client;constructor(e){this.client=W(SI,e)}async getSmartMachineStatus(){return this.client.getSmartMachineStatus({})}async setNetworkCredentials(e,n,a){await this.client.setNetworkCredentials({type:e,ssid:n,psk:a})}async setSmartMachineCredentials(e){await this.client.setSmartMachineCredentials({cloud:e})}async getNetworkList(){return(await this.client.getNetworkList({})).networks}}const EI=async({serviceHost:t="https://app.viam.com",credentials:e})=>{const n=await r_(t,e);return new MI(n,e)};class MI{transport;credentials;dataClient;appClient;mlTrainingClient;provisioningClient;billingClient;constructor(e,n){this.transport=e,this.credentials=n,this.dataClient=new zn(this.transport),this.appClient=new wS(this.transport),this.mlTrainingClient=new RI(this.transport),this.provisioningClient=new II(this.transport),this.billingClient=new PS(this.transport)}async getRobotSecretFromHost(e){const a=e.split(".viam.")[0]?.split(".");if(a!==void 0){const o=a.at(-1);if(o===void 0)return;const i=e.split(".").at(0);if(i!==void 0)return(await this.appClient.getRobotPartByNameAndLocation(i,o)).part?.secret}}async connectToMachine({host:e=void 0,id:n=void 0}){if(e===void 0&&n===void 0)throw new Error("Either a machine address or ID must be provided");let a=e,o;if(n!==void 0&&e===void 0){const c=(await this.appClient.getRobotParts(n)).find(l=>l.mainPart);if(!c)throw new Error(`Could not find a main part for the machine with UUID: ${n}`);a=c.fqdn,o=c.secret}if(a===void 0||a==="")throw new Error("Host was not provided and could not be obtained from the machine ID");let i=this.credentials;return Un(i)||(o===void 0&&(o=await this.getRobotSecretFromHost(a)),i=o===void 0?i:{type:"robot-secret",payload:o,authEntity:a}),eg({host:a,credentials:i,signalingAddress:"https://app.viam.com:443",reconnectMaxAttempts:1})}}const{JointPositions:bI}=am;class OI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(tm),this.name=n,this.options=a}async getEndPosition(e={},n=this.callOptions){const a=new Pt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const i=(await this.client.getEndPosition(a,n)).pose;if(!i)throw new Error("no pose");return i}async getGeometries(e={},n=this.callOptions){return $r(this.client.getGeometries,this.name,p.fromJson(e),n)}async getKinematics(e={},n=this.callOptions){return Vr(this.client.getKinematics,this.name,p.fromJson(e),n)}async get3DModels(e={},n=this.callOptions){const a=new bt({name:this.name,extra:p.fromJson(e)});return(await this.client.get3DModels(a,n)).models}async moveToPosition(e,n={},a=this.callOptions){const o=new At({name:this.name,to:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.moveToPosition(o,a)}async moveToJointPositions(e,n={},a=this.callOptions){const o=new pn({values:e}),i=new Ut({name:this.name,positions:o,extra:p.fromJson(n)});this.options.requestLogger?.(i),await this.client.moveToJointPositions(i,a)}async getJointPositions(e={},n=this.callOptions){const a=new Dt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const i=(await this.client.getJointPositions(a,n)).positions;if(!i)throw new Error("no pose");return i}async stop(e={},n=this.callOptions){const a=new qt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.stop(a,n)}async isMoving(e=this.callOptions){const n=new Lt({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const tf=s.makeMessageType("viam.component.audioin.v1.GetAudioRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"duration_seconds",kind:"scalar",T:2},{no:3,name:"codec",kind:"scalar",T:9},{no:4,name:"request_id",kind:"scalar",T:9},{no:5,name:"previous_timestamp_nanoseconds",kind:"scalar",T:3},{no:99,name:"extra",kind:"message",T:p}]),wI=s.makeMessageType("viam.component.audioin.v1.GetAudioResponse",()=>[{no:1,name:"audio",kind:"message",T:CI},{no:2,name:"request_id",kind:"scalar",T:9}]),CI=s.makeMessageType("viam.component.audioin.v1.AudioChunk",()=>[{no:1,name:"audio_data",kind:"scalar",T:12},{no:2,name:"audio_info",kind:"message",T:Ot},{no:3,name:"start_timestamp_nanoseconds",kind:"scalar",T:3},{no:4,name:"end_timestamp_nanoseconds",kind:"scalar",T:3},{no:5,name:"sequence",kind:"scalar",T:5}]),NI={typeName:"viam.component.audioin.v1.AudioInService",methods:{getAudio:{name:"GetAudio",I:tf,O:wI,kind:m.ServerStreaming},getProperties:{name:"GetProperties",I:Dn,O:wt,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}};class PI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(NI),this.name=n,this.options=a}async*getAudio(e,n,a=0n,o={},i=this.callOptions){const r=new tf({name:this.name,codec:e,durationSeconds:n,previousTimestampNanoseconds:a,extra:p.fromJson(o)});this.options.requestLogger?.(r);const c=this.client.getAudio(r,i);for await(const l of c)l.audio&&(yield{audioData:l.audio.audioData,audioInfo:l.audio.audioInfo,startTimeNs:l.audio.startTimestampNanoseconds,endTimeNs:l.audio.endTimestampNanoseconds,sequence:l.audio.sequence,requestID:l.requestId})}async getProperties(e=this.callOptions){const n=new Dn({name:this.name});this.options.requestLogger?.(n);const a=await this.client.getProperties(n,e);return{supportedCodecs:a.supportedCodecs,sampleRateHz:a.sampleRateHz,numChannels:a.numChannels}}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const DI={MP3:"mp3",PCM16:"pcm16",PCM32:"pcm32",PCM32_FLOAT:"pcm32_float",AAC:"aac",OPUS:"opus",FLAC:"flac",WAV:"wav"},sf=s.makeMessageType("viam.component.audioout.v1.PlayRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"audio_data",kind:"scalar",T:12},{no:3,name:"audio_info",kind:"message",T:Ot},{no:99,name:"extra",kind:"message",T:p}]),AI={typeName:"viam.component.audioout.v1.AudioOutService",methods:{play:{name:"Play",I:sf,O:s.makeMessageType("viam.component.audioout.v1.PlayResponse",[]),kind:m.Unary},getProperties:{name:"GetProperties",I:Dn,O:wt,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}};class UI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(AI),this.name=n,this.options=a}async play(e,n,a={},o=this.callOptions){const i=new sf({name:this.name,audioData:e,audioInfo:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.play(i,o)}async getProperties(e=this.callOptions){const n=new Dn({name:this.name});this.options.requestLogger?.(n);const a=await this.client.getProperties(n,e);return{supportedCodecs:a.supportedCodecs,sampleRateHz:a.sampleRateHz,numChannels:a.numChannels}}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const{GetPropertiesResponse:qI}=lm;class LI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(pm),this.name=n,this.options=a}async getGeometries(e={},n=this.callOptions){const a=new L({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(a,n)).geometries}async moveStraight(e,n,a={},o=this.callOptions){const i=new Gt({name:this.name,mmPerSec:n,distanceMm:e?BigInt(e):void 0,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.moveStraight(i,o)}async spin(e,n,a={},o=this.callOptions){const i=new Bt({name:this.name,angleDeg:e,degsPerSec:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.spin(i,o)}async setPower(e,n,a={},o=this.callOptions){const i=new xt({name:this.name,linear:e,angular:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.setPower(i,o)}async setVelocity(e,n,a={},o=this.callOptions){const i=new Jt({name:this.name,linear:e,angular:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.setVelocity(i,o)}async stop(e={},n=this.callOptions){const a=new Ft({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.stop(a,n)}async isMoving(e=this.callOptions){const n=new zt({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}async getProperties(e={},n=this.callOptions){const a=new Oa({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),this.client.getProperties(a,n)}}const{ReadAnalogReaderResponse:GI,PowerMode:BI}=Em;class FI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Mm),this.name=n,this.options=a}async setGPIO(e,n,a={},o=this.callOptions){const i=new Vt({name:this.name,pin:e,high:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.setGPIO(i,o)}async getGPIO(e,n={},a=this.callOptions){const o=new $t({name:this.name,pin:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.getGPIO(o,a)).high}async getPWM(e,n={},a=this.callOptions){const o=new Yt({name:this.name,pin:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.pWM(o,a)).dutyCyclePct}async setPWM(e,n,a={},o=this.callOptions){const i=new Wt({name:this.name,pin:e,dutyCyclePct:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.setPWM(i,o)}async getPWMFrequency(e,n={},a=this.callOptions){const o=new jt({name:this.name,pin:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.pWMFrequency(o,a);return Number(i.frequencyHz)}async setPWMFrequency(e,n,a={},o=this.callOptions){const i=new Ht({name:this.name,pin:e,frequencyHz:n?BigInt(n):void 0,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.setPWMFrequency(i,o)}async readAnalogReader(e,n={},a=this.callOptions){const o=new Kt({boardName:this.name,analogReaderName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),this.client.readAnalogReader(o,a)}async writeAnalog(e,n,a={},o=this.callOptions){const i=new Xt({name:this.name,pin:e,value:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.writeAnalog(i,o)}async getDigitalInterruptValue(e,n={},a=this.callOptions){const o=new Qt({boardName:this.name,digitalInterruptName:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getDigitalInterruptValue(o,a);return Number(i.value)}async streamTicks(e,n,a={},o=this.callOptions){const i=new Zt({name:this.name,pinNames:e,extra:p.fromJson(a)});this.options.requestLogger?.(i);const r=this.client.streamTicks(i,o);for await(const c of r)n.push({pinName:c.pinName,high:c.high,time:c.time?Number(c.time):0})}async setPowerMode(e,n,a={},o=this.callOptions){const i=new es({name:this.name,powerMode:e,duration:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.setPowerMode(i,o)}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const ri=s.makeMessageType("viam.component.button.v1.PushRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),of=s.makeMessageType("viam.component.button.v1.PushResponse",[]),xI=Object.freeze(Object.defineProperty({__proto__:null,PushRequest:ri,PushResponse:of},Symbol.toStringTag,{value:"Module"})),JI={typeName:"viam.component.button.v1.ButtonService",methods:{push:{name:"Push",I:ri,O:of,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}};class zI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(JI),this.name=n,this.options=a}async push(e={},n=this.callOptions){const a=new ri({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.push(a,n)}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const VI=s.makeMessageType("google.api.HttpBody",()=>[{no:1,name:"content_type",kind:"scalar",T:9},{no:2,name:"data",kind:"scalar",T:12},{no:3,name:"extensions",kind:"message",T:K,repeated:!0}]),$I={typeName:"viam.component.camera.v1.CameraService",methods:{getImage:{name:"GetImage",I:Ru,O:_u,kind:m.Unary},getImages:{name:"GetImages",I:Po,O:Su,kind:m.Unary},renderFrame:{name:"RenderFrame",I:Iu,O:VI,kind:m.Unary},getPointCloud:{name:"GetPointCloud",I:Ao,O:Eu,kind:m.Unary},getProperties:{name:"GetProperties",I:Mu,O:bu,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}},YI="pointcloud/pcd";class WI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient($I),this.name=n,this.options=a}async getGeometries(e={},n=this.callOptions){const a=new L({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(a,n)).geometries}async getImages(e=[],n={},a=this.callOptions){const o=new Po({name:this.name,filterSourceNames:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getImages(o,a),r=i.images.map(l=>({sourceName:l.sourceName,image:l.image,mimeType:l.mimeType})),c={capturedAt:i.responseMetadata?.capturedAt??new S};return{images:r,metadata:c}}async getPointCloud(e={},n=this.callOptions){const a=new Ao({name:this.name,mimeType:YI,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPointCloud(a,n)).pointCloud}async getProperties(e=this.callOptions){const n=new Oa({name:this.name});return this.options.requestLogger?.(n),this.client.getProperties(n,e)}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}class jI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(ll),this.name=n,this.options=a}async discoverResources(e={},n=this.callOptions){const a=new ao({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.discoverResources(a,n)).discoveries}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const{GetPropertiesResponse:HI,PositionType:rf}=Cm;class KI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Nm),this.name=n,this.options=a}async resetPosition(e={},n=this.callOptions){const a=new ts({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.resetPosition(a,n)}async getProperties(e={},n=this.callOptions){const a=new ss({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),this.client.getProperties(a,n)}async getPosition(e=rf.UNSPECIFIED,n={},a=this.callOptions){const o=new as({name:this.name,positionType:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getPosition(o,a);return[i.value,i.positionType]}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}class XI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Gm),this.name=n,this.options=a}async getGeometries(e={},n=this.callOptions){return $r(this.client.getGeometries,this.name,p.fromJson(e),n)}async getKinematics(e={},n=this.callOptions){return Vr(this.client.getKinematics,this.name,p.fromJson(e),n)}async getPosition(e={},n=this.callOptions){const a=new os({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPosition(a,n)).positionsMm}async moveToPosition(e,n,a={},o=this.callOptions){const i=new is({name:this.name,positionsMm:e,speedsMmPerSec:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.moveToPosition(i,o)}async home(e={},n=this.callOptions){const a=new rs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.home(a,n)).homed}async getLengths(e={},n=this.callOptions){const a=new ms({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getLengths(a,n)).lengthsMm}async stop(e={},n=this.callOptions){const a=new cs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.stop(a,n)}async isMoving(e=this.callOptions){const n=new ds({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const{Capsule:QI,GeoGeometry:ZI,GeoPoint:eE,GeometriesInFrame:nE,Geometry:aE,Orientation:tE,PointCloud:sE,Pose:oE,PoseInFrame:iE,RectangularPrism:rE,ResourceName:mE,Sphere:cE,Transform:dE,Vector3:lE,WorldState:pE}=Ct,mf=t=>{const{latitude:e,longitude:n}=t;return!(typeof e!="number"||typeof n!="number"||Number.isNaN(e)||Number.isNaN(n))};class uE{client;options;name;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient($u),this.name=n,this.options=a}async metadata(e={},n=this.callOptions){const a=new Ju({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),this.client.metadata(a,n)}async infer(e,n={},a=this.callOptions){const o=new xu({name:this.name,inputTensors:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),this.client.infer(o,a)}}class gE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(lc),this.name=n,this.options=a}async setPower(e,n={},a=this.callOptions){const o=new vs({name:this.name,powerPct:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setPower(o,a)}async goFor(e,n,a={},o=this.callOptions){const i=new hs({name:this.name,rpm:e,revolutions:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.goFor(i,o)}async goTo(e,n,a={},o=this.callOptions){const i=new fs({name:this.name,rpm:e,positionRevolutions:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.goTo(i,o)}async setRPM(e,n={},a=this.callOptions){const o=new Rs({name:this.name,rpm:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setRPM(o,a)}async resetZeroPosition(e,n={},a=this.callOptions){const o=new _s({name:this.name,offset:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.resetZeroPosition(o,a)}async stop(e={},n=this.callOptions){const a=new Is({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.stop(a,n)}async getProperties(e={},n=this.callOptions){const a=new Ms({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),{positionReporting:(await this.client.getProperties(a,n)).positionReporting}}async getPosition(e={},n=this.callOptions){const a=new Ss({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPosition(a,n)).position}async isPowered(e={},n=this.callOptions){const a=new Es({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.isPowered(a,n);return[o.isOn,o.powerPct]}async isMoving(e=this.callOptions){const n=new bs({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}class TE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Rc),this.name=n,this.options=a}async getLinearVelocity(e={},n=this.callOptions){const a=new Os({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const i=(await this.client.getLinearVelocity(a,n)).linearVelocity;if(!i)throw new Error("no linear velocity");return i}async getAngularVelocity(e={},n=this.callOptions){const a=new ws({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const i=(await this.client.getAngularVelocity(a,n)).angularVelocity;if(!i)throw new Error("no angular velocity");return i}async getCompassHeading(e={},n=this.callOptions){const a=new Cs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getCompassHeading(a,n)).value}async getOrientation(e={},n=this.callOptions){const a=new Ns({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const i=(await this.client.getOrientation(a,n)).orientation;if(!i)throw new Error("no orientation");return i}async getPosition(e={},n=this.callOptions){const a=new Ps({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),this.client.getPosition(a,n)}async getProperties(e={},n=this.callOptions){const a=new Ds({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),this.client.getProperties(a,n)}async getAccuracy(e={},n=this.callOptions){const a=new As({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),this.client.getAccuracy(a,n)}async getLinearAcceleration(e={},n=this.callOptions){const a=new Us({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const i=(await this.client.getLinearAcceleration(a,n)).linearAcceleration;if(!i)throw new Error("no linear acceleration");return i}async getReadings(e={},n=this.callOptions){const a=new Ze({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getReadings(a,n),i={};for(const r of Object.keys(o.readings)){const c=o.readings[r];c&&(i[r]=c.toJson())}return i}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const{GetAccuracyResponse:kE,GetPositionResponse:yE,GetPropertiesResponse:vE}=fc;class hE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Ec),this.name=n,this.options=a}async getVoltage(e={},n=this.callOptions){const a=new qs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getVoltage(a,n);return[o.volts,o.isAc]}async getCurrent(e={},n=this.callOptions){const a=new Ls({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getCurrent(a,n);return[o.amperes,o.isAc]}async getPower(e={},n=this.callOptions){const a=new Gs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPower(a,n)).watts}async getReadings(e={},n=this.callOptions){const a=new Ze({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getReadings(a,n),i={};for(const r of Object.keys(o.readings)){const c=o.readings[r];c&&(i[r]=c.toJson())}return i}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const cf={typeName:"viam.component.sensor.v1.SensorService",methods:{getReadings:{name:"GetReadings",I:Ze,O:ba,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}},fE=Object.freeze(Object.defineProperty({__proto__:null,SensorService:cf},Symbol.toStringTag,{value:"Module"}));class RE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(cf),this.name=n,this.options=a}async getReadings(e={},n=this.callOptions){const a=new Ze({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getReadings(a,n),i={};for(const r of Object.keys(o.readings)){const c=o.readings[r];c&&(i[r]=c.toJson())}return i}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const df=s.makeMessageType("proto.stream.v1.ListStreamsRequest",[]),lf=s.makeMessageType("proto.stream.v1.ListStreamsResponse",()=>[{no:1,name:"names",kind:"scalar",T:9,repeated:!0}]),mi=s.makeMessageType("proto.stream.v1.AddStreamRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),pf=s.makeMessageType("proto.stream.v1.AddStreamResponse",[]),ci=s.makeMessageType("proto.stream.v1.RemoveStreamRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),uf=s.makeMessageType("proto.stream.v1.RemoveStreamResponse",[]),di=s.makeMessageType("proto.stream.v1.Resolution",()=>[{no:1,name:"width",kind:"scalar",T:5},{no:2,name:"height",kind:"scalar",T:5}]),li=s.makeMessageType("proto.stream.v1.GetStreamOptionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),gf=s.makeMessageType("proto.stream.v1.GetStreamOptionsResponse",()=>[{no:1,name:"resolutions",kind:"message",T:di,repeated:!0}]),Xa=s.makeMessageType("proto.stream.v1.SetStreamOptionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"resolution",kind:"message",T:di}]),Tf=s.makeMessageType("proto.stream.v1.SetStreamOptionsResponse",[]),_E=Object.freeze(Object.defineProperty({__proto__:null,AddStreamRequest:mi,AddStreamResponse:pf,GetStreamOptionsRequest:li,GetStreamOptionsResponse:gf,ListStreamsRequest:df,ListStreamsResponse:lf,RemoveStreamRequest:ci,RemoveStreamResponse:uf,Resolution:di,SetStreamOptionsRequest:Xa,SetStreamOptionsResponse:Tf},Symbol.toStringTag,{value:"Module"})),SE={typeName:"proto.stream.v1.StreamService",methods:{listStreams:{name:"ListStreams",I:df,O:lf,kind:m.Unary},addStream:{name:"AddStream",I:mi,O:pf,kind:m.Unary},getStreamOptions:{name:"GetStreamOptions",I:li,O:gf,kind:m.Unary},setStreamOptions:{name:"SetStreamOptions",I:Xa,O:Tf,kind:m.Unary},removeStream:{name:"RemoveStream",I:ci,O:uf,kind:m.Unary}}},Vn=t=>t.replaceAll(":","+");class IE extends Yr{client;options;streams;constructor(e,n={}){super(),this.client=e.createServiceClient(SE),this.options=n,this.streams=new Set,e.on("track",a=>{this.emit("track",a)}),e.on(H.CONNECTED,()=>{for(const a of this.streams.values())this.add(a)})}async add(e){const n=new mi({name:Vn(e)});this.options.requestLogger?.(n);try{await this.client.addStream(n),this.streams.add(e)}catch{n.name=e,this.options.requestLogger?.(n),await this.client.addStream(n),this.streams.add(e)}}async remove(e){const n=new ci({name:Vn(e)});this.options.requestLogger?.(n);try{await this.client.removeStream(n),this.streams.delete(e)}catch{n.name=e,this.options.requestLogger?.(n),await this.client.removeStream(n),this.streams.delete(e)}}async getOptions(e){const n=async i=>{const r=new li({name:i});this.options.requestLogger?.(r);try{return(await this.client.getStreamOptions(r)).resolutions}catch{return[]}},a=Vn(e);let o=await n(a);return o.length>0||(o=await n(e)),o}async setOptions(e,n,a){const o=new Xa({name:Vn(e),resolution:{width:n,height:a}});this.options.requestLogger?.(o);try{await this.client.setStreamOptions(o)}catch{o.name=e,this.options.requestLogger?.(o),await this.client.setStreamOptions(o)}}async resetOptions(e){const n=new Xa({name:Vn(e)});this.options.requestLogger?.(n);try{await this.client.setStreamOptions(n)}catch{n.name=e,this.options.requestLogger?.(n),await this.client.setStreamOptions(n)}}STREAM_TIMEOUT=5e3;getStream=async e=>{const n=new Promise((a,o)=>{const i=r=>{const[c]=r.streams;c?c.id===e&&(this.off("track",i),a(c)):(this.off("track",i),o(new Error("Received track event with no streams")))};this.on("track",i),setTimeout(()=>{this.off("track",i),o(new Error(`Did not receive a stream after ${this.STREAM_TIMEOUT} ms`))},this.STREAM_TIMEOUT)});return await this.add(e),n}}const pi=s.makeMessageType("viam.component.switch.v1.SetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"position",kind:"scalar",T:13},{no:99,name:"extra",kind:"message",T:p}]),kf=s.makeMessageType("viam.component.switch.v1.SetPositionResponse",[]),ui=s.makeMessageType("viam.component.switch.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),yf=s.makeMessageType("viam.component.switch.v1.GetPositionResponse",()=>[{no:1,name:"position",kind:"scalar",T:13}]),gi=s.makeMessageType("viam.component.switch.v1.GetNumberOfPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),vf=s.makeMessageType("viam.component.switch.v1.GetNumberOfPositionsResponse",()=>[{no:1,name:"number_of_positions",kind:"scalar",T:13},{no:2,name:"labels",kind:"scalar",T:9,repeated:!0}]),EE=Object.freeze(Object.defineProperty({__proto__:null,GetNumberOfPositionsRequest:gi,GetNumberOfPositionsResponse:vf,GetPositionRequest:ui,GetPositionResponse:yf,SetPositionRequest:pi,SetPositionResponse:kf},Symbol.toStringTag,{value:"Module"})),ME={typeName:"viam.component.switch.v1.SwitchService",methods:{setPosition:{name:"SetPosition",I:pi,O:kf,kind:m.Unary},getPosition:{name:"GetPosition",I:ui,O:yf,kind:m.Unary},getNumberOfPositions:{name:"GetNumberOfPositions",I:gi,O:vf,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}};class bE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(ME),this.name=n,this.options=a}async setPosition(e,n={},a=this.callOptions){const o=new pi({name:this.name,position:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setPosition(o,a)}async getPosition(e={},n=this.callOptions){const a=new ui({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPosition(a,n)).position}async getNumberOfPositions(e={},n=this.callOptions){const a=new gi({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getNumberOfPositions(a,n);if(o.labels.length>0&&o.labels.length!==o.numberOfPositions)throw new Error("the number of labels does not match the number of positions");return[o.numberOfPositions,o.labels]}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}let OE=class{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(ls),this.name=n,this.options=a}async getGeometries(e={},n=this.callOptions){const a=new L({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(a,n)).geometries}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}};const wE={typeName:"viam.component.posetracker.v1.PoseTrackerService",methods:{getPoses:{name:"GetPoses",I:s.makeMessageType("viam.component.posetracker.v1.GetPosesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"body_names",kind:"scalar",T:9,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),O:s.makeMessageType("viam.component.posetracker.v1.GetPosesResponse",()=>[{no:1,name:"body_poses",kind:"map",K:9,V:{kind:"message",T:Ve}}]),kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}};class CE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(wE),this.name=n,this.options=a}async getGeometries(e={},n=this.callOptions){const a=new L({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(a,n)).geometries}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}class NE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient($m),this.name=n,this.options=a}async getGeometries(e={},n=this.callOptions){const a=new L({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(a,n)).geometries}async open(e={},n=this.callOptions){const a=new ps({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.open(a,n)}async grab(e={},n=this.callOptions){const a=new us({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.grab(a,n)}async stop(e={},n=this.callOptions){const a=new gs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.stop(a,n)}async isMoving(e=this.callOptions){const n=new Ts({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}class PE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(ec),this.name=n,this.options=a}async getEvents(e={},n=this.callOptions){const a=new ks({controller:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getEvents(a,n)).events}async triggerEvent(e,n={},a=this.callOptions){const o=new ys({controller:this.name,event:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.triggerEvent(o,a)}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const{Event:DE}=Zm,{CollisionSpecification:AE,Constraints:UE,GetPlanResponse:uM,LinearConstraint:qE,PseudolinearConstraint:gM,ListPlanStatusesResponse:LE,MotionConfiguration:GE,ObstacleDetector:BE,OrientationConstraint:FE,PlanState:TM}=Nl;class xE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Pl),this.name=n,this.options=a}async move(e,n,a,o,i={},r=this.callOptions){const c=new to({name:this.name,destination:e,componentName:n,worldState:a,constraints:o,extra:p.fromJson(i)});return this.options.requestLogger?.(c),(await this.client.move(c,r)).success}async moveOnMap(e,n,a,o,i,r={},c=this.callOptions){const l=new so({name:this.name,destination:e,componentName:n,slamServiceName:a,motionConfiguration:o,obstacles:i,extra:p.fromJson(r)});return this.options.requestLogger?.(l),(await this.client.moveOnMap(l,c)).executionId}async moveOnGlobe(e,n,a,o,i,r,c,l={},d=this.callOptions){const g=new io({name:this.name,destination:e,componentName:n,movementSensorName:a,heading:o,obstacles:i,boundingRegions:c,motionConfiguration:r,extra:p.fromJson(l)});return this.options.requestLogger?.(g),(await this.client.moveOnGlobe(g,d)).executionId}async stopPlan(e,n={},a=this.callOptions){const o=new mo({name:this.name,componentName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),await this.client.stopPlan(o,a),null}async getPlan(e,n,a,o={},i=this.callOptions){const r=new lo({name:this.name,componentName:e,lastPlanOnly:n,executionId:a,extra:p.fromJson(o)});return this.options.requestLogger?.(r),this.client.getPlan(r,i)}async listPlanStatuses(e,n={},a=this.callOptions){const o=new co({name:this.name,onlyActivePlans:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),this.client.listPlanStatuses(o,a)}async getPose(e,n,a,o={},i=this.callOptions){const r=new ro({name:this.name,componentName:e,destinationFrame:n,supplementalTransforms:a,extra:p.fromJson(o)});this.options.requestLogger?.(r);const l=(await this.client.getPose(r,i)).pose;if(!l)throw new Error("no pose");return l}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const Ti=s.makeMessageType("viam.service.datamanager.v1.SyncRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),hf=s.makeMessageType("viam.service.datamanager.v1.SyncResponse",[]),ki=s.makeMessageType("viam.service.datamanager.v1.UploadBinaryDataToDatasetsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"binary_data",kind:"scalar",T:12},{no:3,name:"tags",kind:"scalar",T:9,repeated:!0},{no:4,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:5,name:"mime_type",kind:"enum",T:s.getEnumType(zh)},{no:99,name:"extra",kind:"message",T:p}]),ff=s.makeMessageType("viam.service.datamanager.v1.UploadBinaryDataToDatasetsResponse",[]),JE=Object.freeze(Object.defineProperty({__proto__:null,SyncRequest:Ti,SyncResponse:hf,UploadBinaryDataToDatasetsRequest:ki,UploadBinaryDataToDatasetsResponse:ff},Symbol.toStringTag,{value:"Module"})),zE={typeName:"viam.service.datamanager.v1.DataManagerService",methods:{sync:{name:"Sync",I:Ti,O:hf,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},uploadBinaryDataToDatasets:{name:"UploadBinaryDataToDatasets",I:ki,O:ff,kind:m.Unary}}};class VE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(zE),this.name=n,this.options=a}async sync(e={},n=this.callOptions){const a=new Ti({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.sync(a,n)}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}async uploadBinaryDataToDatasets(e,n,a,o,i={},r=this.callOptions){const c=new ki({name:this.name,binaryData:e,tags:n,datasetIds:a,mimeType:o,extra:p.fromJson(i)});this.options.requestLogger?.(c),await this.client.uploadBinaryDataToDatasets(c,r)}}class $E{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Yl),this.name=n,this.options=a}async getMode(e={},n=this.callOptions){const a=new go({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getMode(a,n)).mode}async setMode(e,n={},a=this.callOptions){const o=new To({name:this.name,mode:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setMode(o,a)}async getLocation(e={},n=this.callOptions){const a=new ko({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getLocation(a,n);if(!o.location)throw new Error("no location");if(!mf(o.location))throw new Error("invalid location");return o}async getWayPoints(e={},n=this.callOptions){const a=new yo({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getWaypoints(a,n)).waypoints}async addWayPoint(e,n={},a=this.callOptions){const o=new vo({name:this.name,location:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.addWaypoint(o,a)}async removeWayPoint(e,n={},a=this.callOptions){const o=new ho({name:this.name,id:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.removeWaypoint(o,a)}async getObstacles(e={},n=this.callOptions){const a=new fo({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getObstacles(a,n)).obstacles}async getPaths(e={},n=this.callOptions){const a=new Ro({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPaths(a,n)).paths}async getProperties(e=this.callOptions){const n=new _o({name:this.name});return this.options.requestLogger?.(n),this.client.getProperties(n,e)}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const{GetLocationResponse:YE,GetPropertiesResponse:WE,Mode:kM,Path:jE,Waypoint:HE}=$l;class KE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Cc),this.name=n,this.options=a}async move(e,n={},a=this.callOptions){const o=new Bs({name:this.name,angleDeg:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.move(o,a)}async getPosition(e={},n=this.callOptions){const a=new Fs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPosition(a,n)).positionDeg}async stop(e={},n=this.callOptions){const a=new xs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.stop(a,n)}async isMoving(e=this.callOptions){const n=new Js({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}class XE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(np),this.name=n,this.options=a}async getPosition(e=this.callOptions){const n=new So({name:this.name});return this.options.requestLogger?.(n),this.client.getPosition(n,e)}async getPointCloudMap(e,n=this.callOptions){const a=new Io({name:this.name,returnEditedMap:e});this.options.requestLogger?.(a);const o=[],i=this.client.getPointCloudMap(a,n);for await(const r of i)o.push(r.pointCloudPcdChunk);return Rf(o)}async getInternalState(e=this.callOptions){const n=new Eo({name:this.name});this.options.requestLogger?.(n);const a=[],o=this.client.getInternalState(n,e);for await(const i of o)a.push(i.internalStateChunk);return Rf(a)}async getProperties(e=this.callOptions){const n=new Mo({name:this.name});return this.options.requestLogger?.(n),this.client.getProperties(n,e)}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const Rf=t=>{const e=t.reduce((o,i)=>o+i.length,0),n=new Uint8Array(e);let a=0;for(const o of t)n.set(o,a),a+=o.length;return n},{GetPositionResponse:QE,GetPropertiesResponse:ZE}=ep;class eM{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Fu),this.name=n,this.options=a}async getDetectionsFromCamera(e,n={},a=this.callOptions){const o=new qo({name:this.name,cameraName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.getDetectionsFromCamera(o,a)).detections}async getDetections(e,n,a,o,i={},r=this.callOptions){const c=new Uo({name:this.name,image:e,width:n?BigInt(n):void 0,height:a?BigInt(a):void 0,mimeType:o,extra:p.fromJson(i)});return this.options.requestLogger?.(c),(await this.client.getDetections(c,r)).detections}async getClassificationsFromCamera(e,n,a={},o=this.callOptions){const i=new Go({name:this.name,cameraName:e,n,extra:p.fromJson(a)});return this.options.requestLogger?.(i),(await this.client.getClassificationsFromCamera(i,o)).classifications}async getClassifications(e,n,a,o,i,r={},c=this.callOptions){const l=new Lo({name:this.name,image:e,width:n,height:a,mimeType:o,n:i,extra:p.fromJson(r)});return this.options.requestLogger?.(l),(await this.client.getClassifications(l,c)).classifications}async getObjectPointClouds(e,n={},a=this.callOptions){const o=new Bo({name:this.name,cameraName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.getObjectPointClouds(o,a)).objects}async getProperties(e={},n=this.callOptions){const a=new Fo({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getProperties(a,n);return{classificationsSupported:o.classificationsSupported,detectionsSupported:o.detectionsSupported,objectPointCloudsSupported:o.objectPointCloudsSupported}}async captureAllFromCamera(e,{returnImage:n,returnClassifications:a,returnDetections:o,returnObjectPointClouds:i},r={},c=this.callOptions){const l=new xo({name:this.name,cameraName:e,returnImage:n,returnClassifications:a,returnDetections:o,returnObjectPointClouds:i,extra:p.fromJson(r)});this.options.requestLogger?.(l);const d=await this.client.captureAllFromCamera(l,c);return{image:d.image,classifications:d.classifications,detections:d.detections,objectPointClouds:d.objects,extra:d.extra}}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const{Classification:nM,Detection:aM}=Bu,{PointCloudObject:tM}=Ct,_f=t=>Ra.UuidTool.toString([...t]),sM=t=>new Uint8Array(Ra.UuidTool.toBytes(t)),yi=t=>({...t,uuidString:_f(t.uuid)});class oM{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Ku),this.name=n,this.options=a}async listUUIDs(e={},n=this.callOptions){const a=new Wu({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.listUUIDs(a,n)).uuids.map(i=>_f(i))}async getTransform(e,n={},a=this.callOptions){const o=new ju({name:this.name,uuid:sM(e),extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getTransform(o,a);if(!i.transform)throw new Error("No transform returned from server");return yi(i.transform)}async*streamTransformChanges(e={},n=this.callOptions){const a=new Hu({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=this.client.streamTransformChanges(a,n);for await(const i of o)i.transform&&(yield{...i,transform:yi(i.transform)})}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const Sf={typeName:"viam.service.generic.v1.GenericService",methods:{doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}},iM=Object.freeze(Object.defineProperty({__proto__:null,GenericService:Sf},Symbol.toStringTag,{value:"Module"}));class rM{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Sf),this.name=n,this.options=a}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const mM="0.63.0";u.AnalogValue=GI,u.ArmClient=OI,u.ArmJointPositions=bI,u.AudioCodec=DI,u.AudioInClient=PI,u.AudioOutClient=UI,u.BaseClient=LI,u.BaseProperties=qI,u.BoardClient=FI,u.ButtonClient=zI,u.CameraClient=WI,u.Capsule=QI,u.Classification=nM,u.Client=We,u.CloudConfig=ii,u.CollisionSpecification=AE,u.ConnectError=C,u.ConnectionClosedError=ce,u.Constraints=UE,u.DataManagerClient=VE,u.Detection=aM,u.DiscoveryClient=jI,u.Duration=B,u.EncoderClient=KI,u.EncoderPositionType=rf,u.EncoderProperties=HI,u.GantryClient=XI,u.GenericComponentClient=OE,u.GenericServiceClient=rM,u.GeoGeometry=ZI,u.GeoPoint=eE,u.GeometriesInFrame=nE,u.Geometry=aE,u.GripperClient=NE,u.InputControllerClient=PE,u.InputControllerEvent=DE,u.LinearConstraint=qE,u.ListPlanStatusesResponse=LE,u.MLModelClient=uE,u.MachineConnectionEvent=H,u.ModelType=je,u.MotionClient=xE,u.MotionConfiguration=GE,u.MotorClient=gE,u.MovementSensorAccuracy=kE,u.MovementSensorClient=TE,u.MovementSensorPosition=yE,u.MovementSensorProperties=vE,u.NavigationClient=$E,u.NavigationPosition=YE,u.NavigationProperties=WE,u.ObstacleDetector=BE,u.Orientation=tE,u.OrientationConstraint=FE,u.Path=jE,u.PointCloud=sE,u.PointCloudObject=tM,u.Pose=oE,u.PoseInFrame=iE,u.PoseTrackerClient=CE,u.PowerMode=BI,u.PowerSensorClient=hE,u.RectangularPrism=rE,u.ResourceName=mE,u.RobotClient=We,u.SensorClient=RE,u.ServoClient=KE,u.SlamClient=XE,u.SlamPosition=QE,u.SlamProperties=ZE,u.Sphere=cE,u.StreamClient=IE,u.Struct=p,u.SwitchClient=bE,u.Timestamp=S,u.TrainingStatus=Ba,u.Transform=dE,u.TransformChangeType=Yu,u.Vector3=lE,u.VisionClient=eM,u.Waypoint=HE,u.WorldState=pE,u.WorldStateStoreClient=oM,u.addMetadata=o_,u.appApi=bS,u.appRobotApi=x_,u.armApi=am,u.baseApi=lm,u.billingApi=CS,u.boardApi=Em,u.buttonApi=xI,u.cameraApi=$_,u.commonApi=Ct,u.createRobotClient=eg,u.createViamClient=EI,u.dataApi=z_,u.dataManagerApi=JE,u.deleteMetadata=i_,u.disableDebugLogging=s_,u.discoveryApi=J_,u.doCommandFromClient=A,u.enableDebugLogging=t_,u.encoderApi=Cm,u.gantryApi=l_,u.genericComponentApi=p_,u.genericServiceApi=iM,u.gripperApi=u_,u.inputControllerApi=Zm,u.isValidGeoPoint=mf,u.mlTrainingApi=MS,u.motionApi=Nl,u.motorApi=T_,u.movementSensorApi=fc,u.navigationApi=$l,u.powerSensorApi=k_,u.provisioningApi=_I,u.robotApi=P_,u.sensorApi=fE,u.servoApi=v_,u.slamApi=ep,u.streamApi=_E,u.switchApi=EE,u.transformWithUUID=yi,u.version=mM,u.visionApi=Bu,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
|
|
8
|
+
};`],{type:"text/javascript"});class nn{constructor(e,n){this.deferredTransport=n,this.host=e??"",this.transport=new aS(this.deferredTransport,this)}static heartbeatMonitoredMethods={};transport;currentSessionID="";sessionsSupported;heartbeatIntervalMs;host="";starting;get client(){const e=this.deferredTransport();return W(Qs,e)}get sessionID(){return this.currentSessionID}setHost(e){this.host=e}getSessionMetadataInner(){const e=new Headers;return this.sessionsSupported&&this.currentSessionID!==""&&e.set("viam-sid",this.currentSessionID),e}reset(){this.starting||(this.sessionsSupported=void 0)}backgroundHeartbeat=!0;async heartbeat(){if(!this.sessionsSupported||this.currentSessionID==="")return;for(;this.starting;)await this.starting;let e;const n=async()=>{const a=new js({id:this.currentSessionID});try{await this.client.sendSessionHeartbeat(a)}catch(o){if(o instanceof C&&o.code===u.Code.Unimplemented){console.error("sessions unsupported; will not try again"),this.sessionsSupported=!1;return}if(o instanceof ce||o instanceof C&&o.rawMessage==="closed"){this.reset();return}}e?e.postMessage(this.heartbeatIntervalMs):setTimeout(()=>{n().catch(console.error)},this.heartbeatIntervalMs)};if(this.backgroundHeartbeat&&globalThis.Worker!==void 0){const a=window.URL.createObjectURL(tS);e=new Worker(a),URL.revokeObjectURL(a),e.addEventListener("message",()=>{n().catch(console.error)})}n().catch(console.error)}async getSessionMetadata(){for(;this.starting;)await this.starting;return this.sessionsSupported!==void 0?this.getSessionMetadataInner():(this.starting=new Promise((e,n)=>{(async()=>{const a=new Ws;this.currentSessionID!==""&&(a.resume=this.currentSessionID);let o;try{o=await this.client.startSession(a)}catch(r){if(r instanceof C&&r.code===u.Code.Unimplemented){console.error("sessions unsupported; will not try again"),this.sessionsSupported=!1;return}throw r}const{heartbeatWindow:i}=o;if(!i)throw new Error("expected heartbeat window in response to start session");this.sessionsSupported=!0,this.currentSessionID=o.id,this.heartbeatIntervalMs=(Number(i.seconds)*1e3+i.nanos/1e6)/5,await this.applyHeartbeatMonitoredMethods(),e(),this.heartbeat().catch(console.error)})().then(e).catch(n).finally(()=>{this.starting=void 0})}),await this.starting,this.getSessionMetadataInner())}async applyHeartbeatMonitoredMethods(){try{const e=W(nS,this.transport),n=new La({host:this.host,messageRequest:{case:"listServices",value:""}}),a=e.serverReflectionInfo(st([n]),{timeoutMs:1e4});for await(const o of a){const i=o.messageResponse.value.service.map(c=>new La({messageRequest:{case:"fileContainingSymbol",value:c.name}})),r=e.serverReflectionInfo(st(i),{timeoutMs:1e4});for await(const c of r)for(const l of c.messageResponse.value.fileDescriptorProto){const d=te.fromBinary(l);for(const g of d.service)for(const f of g.method)nn.heartbeatMonitoredMethods[`/${d.package}.${g.name}/${f.name}`]=nn.hasHeartbeatOption(f.options)}}}catch{nn.heartbeatMonitoredMethods={"/viam.component.arm.v1.ArmService/MoveToPosition":!0,"/viam.component.arm.v1.ArmService/MoveToJointPositions":!0,"/viam.component.arm.v1.ArmService/MoveThroughJointPositions":!0,"/viam.component.base.v1.BaseService/MoveStraight":!0,"/viam.component.base.v1.BaseService/Spin":!0,"/viam.component.base.v1.BaseService/SetPower":!0,"/viam.component.base.v1.BaseService/SetVelocity":!0,"/viam.component.gantry.v1.GantryService/MoveToPosition":!0,"/viam.component.gripper.v1.GripperService/Open":!0,"/viam.component.gripper.v1.GripperService/Grab":!0,"/viam.component.motor.v1.MotorService/SetPower":!0,"/viam.component.motor.v1.MotorService/GoFor":!0,"/viam.component.motor.v1.MotorService/GoTo":!0,"/viam.component.motor.v1.MotorService/SetRPM":!0,"/viam.component.servo.v1.ServoService/Move":!0}}}static hasHeartbeatOption(e){if(!e)return!1;const n=new Ni(e.toBinary());for(;n.pos<n.len;){const a=n.tag(),[o]=a;if(o===zr.field.no)return!0;n.string()}return!1}}const sS=s.makeEnum("viam.service.mlmodel.v1.LabelType",[{no:0,name:"LABEL_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"LABEL_TYPE_TENSOR_VALUE",localName:"TENSOR_VALUE"},{no:2,name:"LABEL_TYPE_TENSOR_AXIS",localName:"TENSOR_AXIS"}]),xu=s.makeMessageType("viam.service.mlmodel.v1.InferRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:3,name:"input_tensors",kind:"message",T:Vu},{no:99,name:"extra",kind:"message",T:p}]),oS=s.makeMessageType("viam.service.mlmodel.v1.InferResponse",()=>[{no:3,name:"output_tensors",kind:"message",T:Vu}]),Ju=s.makeMessageType("viam.service.mlmodel.v1.MetadataRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),iS=s.makeMessageType("viam.service.mlmodel.v1.MetadataResponse",()=>[{no:1,name:"metadata",kind:"message",T:rS}]),rS=s.makeMessageType("viam.service.mlmodel.v1.Metadata",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"description",kind:"scalar",T:9},{no:4,name:"input_info",kind:"message",T:zu,repeated:!0},{no:5,name:"output_info",kind:"message",T:zu,repeated:!0}]),zu=s.makeMessageType("viam.service.mlmodel.v1.TensorInfo",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:3,name:"data_type",kind:"scalar",T:9},{no:4,name:"shape",kind:"scalar",T:5,repeated:!0},{no:5,name:"associated_files",kind:"message",T:mS,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),mS=s.makeMessageType("viam.service.mlmodel.v1.File",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:3,name:"label_type",kind:"enum",T:s.getEnumType(sS)}]),cS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt8",()=>[{no:1,name:"data",kind:"scalar",T:12}]),dS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt8",()=>[{no:1,name:"data",kind:"scalar",T:12}]),lS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt16",()=>[{no:1,name:"data",kind:"scalar",T:7,repeated:!0}]),pS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt16",()=>[{no:1,name:"data",kind:"scalar",T:7,repeated:!0}]),uS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt32",()=>[{no:1,name:"data",kind:"scalar",T:15,repeated:!0}]),gS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt32",()=>[{no:1,name:"data",kind:"scalar",T:7,repeated:!0}]),TS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt64",()=>[{no:1,name:"data",kind:"scalar",T:16,repeated:!0}]),kS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt64",()=>[{no:1,name:"data",kind:"scalar",T:6,repeated:!0}]),yS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataFloat",()=>[{no:1,name:"data",kind:"scalar",T:2,repeated:!0}]),vS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataDouble",()=>[{no:1,name:"data",kind:"scalar",T:1,repeated:!0}]),hS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensor",()=>[{no:1,name:"shape",kind:"scalar",T:6,repeated:!0},{no:2,name:"int8_tensor",kind:"message",T:cS,oneof:"tensor"},{no:3,name:"uint8_tensor",kind:"message",T:dS,oneof:"tensor"},{no:4,name:"int16_tensor",kind:"message",T:lS,oneof:"tensor"},{no:5,name:"uint16_tensor",kind:"message",T:pS,oneof:"tensor"},{no:6,name:"int32_tensor",kind:"message",T:uS,oneof:"tensor"},{no:7,name:"uint32_tensor",kind:"message",T:gS,oneof:"tensor"},{no:8,name:"int64_tensor",kind:"message",T:TS,oneof:"tensor"},{no:9,name:"uint64_tensor",kind:"message",T:kS,oneof:"tensor"},{no:10,name:"float_tensor",kind:"message",T:yS,oneof:"tensor"},{no:11,name:"double_tensor",kind:"message",T:vS,oneof:"tensor"}]),Vu=s.makeMessageType("viam.service.mlmodel.v1.FlatTensors",()=>[{no:1,name:"tensors",kind:"map",K:9,V:{kind:"message",T:hS}}]),$u={typeName:"viam.service.mlmodel.v1.MLModelService",methods:{infer:{name:"Infer",I:xu,O:oS,kind:m.Unary},metadata:{name:"Metadata",I:Ju,O:iS,kind:m.Unary}}},Yu=s.makeEnum("viam.service.worldstatestore.v1.TransformChangeType",[{no:0,name:"TRANSFORM_CHANGE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TRANSFORM_CHANGE_TYPE_ADDED",localName:"ADDED"},{no:2,name:"TRANSFORM_CHANGE_TYPE_REMOVED",localName:"REMOVED"},{no:3,name:"TRANSFORM_CHANGE_TYPE_UPDATED",localName:"UPDATED"}]),Wu=s.makeMessageType("viam.service.worldstatestore.v1.ListUUIDsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),fS=s.makeMessageType("viam.service.worldstatestore.v1.ListUUIDsResponse",()=>[{no:1,name:"uuids",kind:"scalar",T:12,repeated:!0}]),ju=s.makeMessageType("viam.service.worldstatestore.v1.GetTransformRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"uuid",kind:"scalar",T:12},{no:99,name:"extra",kind:"message",T:p}]),RS=s.makeMessageType("viam.service.worldstatestore.v1.GetTransformResponse",()=>[{no:2,name:"transform",kind:"message",T:Le}]),Hu=s.makeMessageType("viam.service.worldstatestore.v1.StreamTransformChangesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),_S=s.makeMessageType("viam.service.worldstatestore.v1.StreamTransformChangesResponse",()=>[{no:1,name:"change_type",kind:"enum",T:s.getEnumType(Yu)},{no:2,name:"transform",kind:"message",T:Le},{no:3,name:"updated_fields",kind:"message",T:Ae}]),Ku={typeName:"viam.service.worldstatestore.v1.WorldStateStoreService",methods:{listUUIDs:{name:"ListUUIDs",I:Wu,O:fS,kind:m.Unary},getTransform:{name:"GetTransform",I:ju,O:RS,kind:m.Unary},streamTransformChanges:{name:"StreamTransformChanges",I:Hu,O:_S,kind:m.ServerStreaming},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}},SS=(t,e)=>{if(t==null)throw new Error(e)},gn="Dial operation aborted",IS=t=>{const e=t;return typeof e.signalingAddress!="string"?!1:!e.iceServers||Array.isArray(e.iceServers)},Xu=t=>t>0&&Number.isInteger(t),Qu=t=>{if(t instanceof C&&[u.Code.Canceled,u.Code.InvalidArgument,u.Code.NotFound,u.Code.AlreadyExists,u.Code.PermissionDenied,u.Code.FailedPrecondition,u.Code.OutOfRange,u.Code.Unimplemented,u.Code.Unauthenticated].includes(t.code))return!1;if(t instanceof Error){const e=t.message.toLowerCase();if(e.includes("invalid")||e.includes("configuration")||e.includes("cannot dial"))return!1}return!0},ES=t=>{if(t.credentials&&Un(t.credentials))try{t.credentials.authEntity=new URL(t.credentials.authEntity).host}catch(e){if(!(e instanceof TypeError))throw e}if(t.reconnectMaxAttempts!==void 0&&!Xu(t.reconnectMaxAttempts))throw new Error(`Value of max reconnect attempts (${t.reconnectMaxAttempts}) should be a positive integer`);if(t.reconnectMaxWait!==void 0&&!Xu(t.reconnectMaxWait))throw new Error(`Value of max reconnect wait (${t.reconnectMaxWait}) should be a positive integer`)},Zu=t=>{if(t instanceof Error&&t.message===gn)throw t};class We extends Yr{serviceHost="";webrtcOptions={enabled:!1,host:"",signalingAddress:"",rtcConfig:{}};directOptions={};sessionOptions={disabled:!1};gRPCConnectionManager;sessionManager;peerConn;dataChannel;transport;connecting;connectResolve;dialing;currentDialAbortSignal;savedCreds;closed;robotServiceClient;armServiceClient;baseServiceClient;boardServiceClient;encoderServiceClient;gantryServiceClient;genericServiceClient;gripperServiceClient;mlModelServiceClient;movementSensorServiceClient;powerSensorServiceClient;inputControllerServiceClient;motorServiceClient;navigationServiceClient;discoveryServiceClient;motionServiceClient;visionServiceClient;servoServiceClient;slamServiceClient;worldStateStoreServiceClient;currentRetryAttempt=0;onICEConnectionStateChange;onDataChannelClose;onTrack;constructor(e,n,a,o){super(),e!==void 0&&(this.serviceHost=e),n&&(this.webrtcOptions=n),o&&(this.directOptions=o),a&&(this.sessionOptions=a),this.gRPCConnectionManager=new W_(()=>{if(!this.transport)throw new Error(We.notConnectedYetStr);return this.transport},()=>{this.onDisconnect()}),this.sessionManager=new nn(this.serviceHost,()=>{if(!this.transport)throw new Error(We.notConnectedYetStr);return this.transport});for(const i of Object.values(H))this.on(i,()=>{this.emit("connectionstatechange",{eventType:i})});this.closed=!1}cleanupEventListeners(){this.peerConn&&this.onICEConnectionStateChange&&(this.peerConn.removeEventListener("iceconnectionstatechange",this.onICEConnectionStateChange),this.onICEConnectionStateChange=void 0),this.peerConn&&this.onTrack&&(this.peerConn.removeEventListener("track",this.onTrack),this.onTrack=void 0),this.dataChannel&&this.onDataChannelClose&&(this.dataChannel.removeEventListener("close",this.onDataChannelClose),this.onDataChannelClose=void 0)}onDisconnect(e){if(this.emit(H.DISCONNECTED,e??{}),this.noReconnect!==void 0&&this.noReconnect||this.closed)return;console.debug("Connection closed, will try to reconnect");const n={retry:(a,o)=>(console.debug(`Failed to connect, attempt ${o} with backoff`,a),this.currentRetryAttempt=o,this.closed?!1:Qu(a)?!0:(console.debug("Non-retryable error encountered, stopping reconnection attempts",a),!1))};this.reconnectMaxWait!==void 0&&(n.maxDelay=this.reconnectMaxWait),this.reconnectMaxAttempts!==void 0&&(n.numOfAttempts=this.reconnectMaxAttempts),this.currentRetryAttempt=0,kt(async()=>this.connect(),n).then(()=>{console.debug("Reconnected successfully!")}).catch(a=>{if(this.reconnectMaxAttempts!==void 0&&this.currentRetryAttempt>=this.reconnectMaxAttempts){console.debug(`Reached max attempts: ${this.reconnectMaxAttempts}`);return}console.error(a)})}get noReconnect(){return this.webrtcOptions.noReconnect??this.directOptions.noReconnect}get reconnectMaxAttempts(){return this.webrtcOptions.reconnectMaxAttempts??this.directOptions.reconnectMaxAttempts}get reconnectMaxWait(){return this.webrtcOptions.reconnectMaxWait??this.directOptions.reconnectMaxWait}get sessionId(){return this.sessionManager.sessionID}static notConnectedYetStr="not connected yet";get robotService(){if(!this.robotServiceClient)throw new Error(We.notConnectedYetStr);return this.robotServiceClient}get armService(){return this.armServiceClient??=this.createServiceClient(tm),this.armServiceClient}get baseService(){return this.baseServiceClient??=this.createServiceClient(pm),this.baseServiceClient}get boardService(){return this.boardServiceClient??=this.createServiceClient(Mm),this.boardServiceClient}get encoderService(){return this.encoderServiceClient??=this.createServiceClient(Nm),this.encoderServiceClient}get gantryService(){return this.gantryServiceClient??=this.createServiceClient(Gm),this.gantryServiceClient}get genericService(){return this.genericServiceClient??=this.createServiceClient(ls),this.genericServiceClient}get gripperService(){return this.gripperServiceClient??=this.createServiceClient($m),this.gripperServiceClient}get mlModelService(){return this.mlModelServiceClient??=this.createServiceClient($u),this.mlModelServiceClient}get movementSensorService(){return this.movementSensorServiceClient??=this.createServiceClient(Rc),this.movementSensorServiceClient}get powerSensorService(){return this.powerSensorServiceClient??=this.createServiceClient(Ec),this.powerSensorServiceClient}get inputControllerService(){return this.inputControllerServiceClient??=this.createServiceClient(ec),this.inputControllerServiceClient}get motorService(){return this.motorServiceClient??=this.createServiceClient(lc),this.motorServiceClient}get navigationService(){return this.navigationServiceClient??=this.createServiceClient(Yl),this.navigationServiceClient}get discoveryService(){return this.discoveryServiceClient??=this.createServiceClient(ll),this.discoveryServiceClient}get motionService(){return this.motionServiceClient??=this.createServiceClient(Pl),this.motionServiceClient}get visionService(){return this.visionServiceClient??=this.createServiceClient(Fu),this.visionServiceClient}get servoService(){return this.servoServiceClient??=this.createServiceClient(Cc),this.servoServiceClient}get slamService(){return this.slamServiceClient??=this.createServiceClient(np),this.slamServiceClient}get worldStateStoreService(){return this.worldStateStoreServiceClient??=this.createServiceClient(Ku),this.worldStateStoreServiceClient}createServiceClient(e){return SS(this.clientTransport,We.notConnectedYetStr),W(e,this.clientTransport)}get peerConnection(){return this.peerConn}get clientTransport(){return this.sessionOptions.disabled?this.transport:this.sessionManager.transport}async dialWebRTC(e,n){if(n?.abort===!0)throw new Error(gn);return this.emit(H.DIALING,{method:"webrtc",attempt:this.currentRetryAttempt}),this.serviceHost=e.serviceHost??e.host,this.sessionManager.setHost(this.serviceHost),this.webrtcOptions.enabled=!0,this.webrtcOptions.host=e.host,this.webrtcOptions.signalingAddress=e.signalingAddress,this.webrtcOptions.rtcConfig.iceServers=e.iceServers??[],this.webrtcOptions.noReconnect=e.noReconnect,this.webrtcOptions.reconnectMaxWait=e.reconnectMaxWait,this.webrtcOptions.reconnectMaxAttempts=e.reconnectMaxAttempts,this.sessionOptions.disabled=e.disableSessions??!1,await this.connect({priority:e.priority,dialTimeout:e.dialTimeout??Nt,creds:e.credentials}),this}async dialDirect(e,n){if(n?.abort===!0)throw new Error(gn);if(this.emit(H.DIALING,{method:"grpc",attempt:this.currentRetryAttempt}),!e.host.includes("local"))throw new Error(`cannot dial "${e.host}" directly, please use a local url instead.`);return this.serviceHost=e.host,this.sessionManager.setHost(this.serviceHost),this.webrtcOptions.enabled=!1,this.directOptions.noReconnect=e.noReconnect,this.directOptions.reconnectMaxWait=e.reconnectMaxWait,this.directOptions.reconnectMaxAttempts=e.reconnectMaxAttempts,this.sessionOptions.disabled=e.disableSessions??!1,await this.connect({creds:e.credentials,dialTimeout:e.dialTimeout??Nt}),this}resetDialing(e){this.dialing===e&&(this.dialing=void 0,this.currentDialAbortSignal=void 0)}async dial(e){ES(e),this.dialing&&this.currentDialAbortSignal&&(console.debug("Aborting previous dial attempt due to new dial call"),this.currentDialAbortSignal.abort=!0,this.dialing.catch(()=>{console.debug("Ignored abort error from previous dial")})),this.currentDialAbortSignal={abort:!1};const n=this.performDial(e,this.currentDialAbortSignal,e.reconnectAbortSignal??{abort:!1});this.dialing=n;try{const a=await n;return this.resetDialing(n),a}catch(a){if(this.resetDialing(n),a instanceof Error&&a.message===gn)return console.debug(gn),this;throw a}}createBackOffOpts({abort:e},{abort:n}){return{retry:(a,o)=>{if(e||n)throw new Error(gn);return console.debug(`Failed to connect, attempt ${o} with backoff`,a),this.currentRetryAttempt=o,this.closed?!1:Qu(a)?!0:(console.debug("Non-retryable error encountered, stopping connection attempts",a),!1)}}}async tryWebRTCDial(e,n,a){try{return{dialer:await kt(async()=>this.dialWebRTC(e,n),a)}}catch(o){Zu(o);const i=o instanceof Error?o:new Error(String(o));return console.debug("Failed to connect via WebRTC",i),this.emit(H.DISCONNECTED,{error:i}),{dialer:this,error:i}}}async tryDirectDial(e,n,a){try{return{dialer:await kt(async()=>this.dialDirect(e,n),a)}}catch(o){Zu(o);const i=o instanceof Error?o:new Error(String(o));return console.debug("Failed to connect via gRPC",i),this.emit(H.DISCONNECTED,{error:i}),{dialer:this,error:i}}}async performDial(e,n,a){const o=this.createBackOffOpts(n,a??{abort:!1});e.reconnectMaxWait!==void 0&&(o.maxDelay=e.reconnectMaxWait),o.numOfAttempts=e.noReconnect?1:e.reconnectMaxAttempts,this.currentRetryAttempt=0;const i=[],r=IS(e),c=r?2:1,l=n.abort||a?.abort===!0;if(r&&!l){const{dialer:g,error:f}=await this.tryWebRTCDial(e,n,o);if(!f)return g;i.push(f)}if(this.currentRetryAttempt=0,!(n.abort||a?.abort===!0)){const{dialer:g,error:f}=await this.tryDirectDial(e,n,o);if(!f)return g;i.push(f)}if(i.length===c)throw new Error("Failed to connect via all methods",{cause:i});return this}async disconnect(){for(this.emit(H.DISCONNECTING,{}),this.currentDialAbortSignal&&this.dialing&&(this.currentDialAbortSignal.abort=!0,this.dialing.catch(()=>{console.debug("Ignored abort error from previous dial")}),this.resetDialing(this.dialing));this.connecting;)await this.connecting;this.cleanupEventListeners(),this.peerConn&&(this.peerConn.close(),this.peerConn=void 0),this.dataChannel&&(this.dataChannel.close(),this.dataChannel=void 0),this.sessionManager.reset(),this.closed=!0,this.emit(H.DISCONNECTED,{})}isConnected(){return this.peerConn?.iceConnectionState==="connected"}async connect({creds:e=this.savedCreds,priority:n,dialTimeout:a}={}){if(this.emit(H.CONNECTING,{}),this.closed=!1,this.connecting){for(;this.connecting!==void 0;)await this.connecting;return}this.connecting=new Promise(o=>{this.connectResolve=o}),this.peerConn&&(this.peerConn.close(),this.peerConn=void 0),this.dataChannel&&(this.dataChannel.close(),this.dataChannel=void 0),(!e||e!==this.savedCreds||this.sessionOptions.disabled)&&this.sessionManager.reset();try{const o={webrtcOptions:{disableTrickleICE:!1,rtcConfig:this.webrtcOptions.rtcConfig},dialTimeout:a??Nt,extraHeaders:An};if(e&&(Un(e)?o.credentials=e:o.accessToken=e.payload),n!==void 0&&o.webrtcOptions&&(o.webrtcOptions.additionalSdpFields={"x-priority":n}),this.savedCreds=e,this.webrtcOptions.enabled){o.webrtcOptions&&(o.webrtcOptions.signalingCredentials=o.credentials);const r=this.webrtcOptions.signalingAddress||this.serviceHost,c=await Q1(r,this.webrtcOptions.host,o,this.serviceHost!==""&&r!==this.serviceHost);this.peerConn=c.peerConnection,this.dataChannel=c.dataChannel,this.cleanupEventListeners(),this.onICEConnectionStateChange=()=>{this.peerConn?.iceConnectionState==="connected"?this.emit(H.CONNECTED,{}):this.peerConn?.iceConnectionState==="closed"&&this.onDisconnect()},this.peerConn.addEventListener("iceconnectionstatechange",this.onICEConnectionStateChange),this.onDataChannelClose=l=>this.onDisconnect(l),this.dataChannel.addEventListener("close",this.onDataChannelClose),this.transport=c.transport,this.onTrack=l=>{const[d]=l.streams;if(!d)throw this.emit("track",l),new Error("expected event stream to exist");const g=d.id.replaceAll("+",":");Object.defineProperty(d,"id",{value:g}),this.emit("track",l)},this.peerConn.addEventListener("track",this.onTrack)}else this.transport=await Sa(this.serviceHost,o),await this.gRPCConnectionManager.start();const i=this.sessionOptions.disabled?this.transport:this.sessionManager.transport;this.robotServiceClient=W(Qs,i),this.emit(H.CONNECTED,{})}catch(o){throw this.emit(H.DISCONNECTED,{}),o}finally{this.connectResolve?.(),this.connectResolve=void 0,this.connecting=void 0}}async getSessions(){return(await this.robotService.getSessions({})).sessions}async getOperations(){return(await this.robotService.getOperations({})).operations}async cancelOperation(e){await this.robotService.cancelOperation({id:e})}async blockForOperation(e){await this.robotService.blockForOperation({id:e})}async stopAll(){await this.robotService.stopAll({})}async frameSystemConfig(e){return(await this.robotService.frameSystemConfig({supplementalTransforms:e})).frameSystemConfigs}async transformPose(e,n,a){const o=new zs({source:e,destination:n,supplementalTransforms:a}),r=(await this.robotService.transformPose(o)).pose;if(!r)throw new Error("no pose");return r}async transformPCD(e,n,a){const o=new Vs({pointCloudPcd:e,source:n,destination:a});return(await this.robotService.transformPCD(o)).pointCloudPcd}async getModelsFromModules(){const e=new $s({});return(await this.robotService.getModelsFromModules(e)).models}async getCloudMetadata(){return this.robotService.getCloudMetadata({})}async resourceNames(){return(await this.robotService.resourceNames({})).resources}async resourceRPCSubtypes(){return(await this.robotService.resourceRPCSubtypes({})).resourceRpcSubtypes}async getMachineStatus(){return this.robotService.getMachineStatus({})}async getVersion(){return this.robotService.getVersion({})}async restartModule(e,n){const a=new Ks;e!==void 0&&(a.idOrName.case="moduleId",a.idOrName.value=e),n!==void 0&&(a.idOrName.case="moduleName",a.idOrName.value=n),await this.robotService.restartModule(a)}async getPose(e,n,a){const o=new Xs({componentName:e,destinationFrame:n,supplementalTransforms:a}),r=(await this.robotService.getPose(o)).pose;if(!r)throw new Error("no pose");return r}}const eg=async t=>{const e=await new We().dial(t);if(e.isConnected())return e;throw new Error("Failed to connect to robot")},Ga=s.makeEnum("viam.app.packages.v1.PackageType",[{no:0,name:"PACKAGE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PACKAGE_TYPE_ARCHIVE",localName:"ARCHIVE"},{no:2,name:"PACKAGE_TYPE_ML_MODEL",localName:"ML_MODEL"},{no:3,name:"PACKAGE_TYPE_MODULE",localName:"MODULE"},{no:4,name:"PACKAGE_TYPE_SLAM_MAP",localName:"SLAM_MAP"},{no:5,name:"PACKAGE_TYPE_ML_TRAINING",localName:"ML_TRAINING"}]),je=s.makeEnum("viam.app.mltraining.v1.ModelType",[{no:0,name:"MODEL_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODEL_TYPE_SINGLE_LABEL_CLASSIFICATION",localName:"SINGLE_LABEL_CLASSIFICATION"},{no:2,name:"MODEL_TYPE_MULTI_LABEL_CLASSIFICATION",localName:"MULTI_LABEL_CLASSIFICATION"},{no:3,name:"MODEL_TYPE_OBJECT_DETECTION",localName:"OBJECT_DETECTION"}]),an=s.makeEnum("viam.app.mltraining.v1.ModelFramework",[{no:0,name:"MODEL_FRAMEWORK_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODEL_FRAMEWORK_TFLITE",localName:"TFLITE"},{no:2,name:"MODEL_FRAMEWORK_TENSORFLOW",localName:"TENSORFLOW"},{no:3,name:"MODEL_FRAMEWORK_PYTORCH",localName:"PYTORCH"},{no:4,name:"MODEL_FRAMEWORK_ONNX",localName:"ONNX"}]),Ba=s.makeEnum("viam.app.mltraining.v1.TrainingStatus",[{no:0,name:"TRAINING_STATUS_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TRAINING_STATUS_PENDING",localName:"PENDING"},{no:2,name:"TRAINING_STATUS_IN_PROGRESS",localName:"IN_PROGRESS"},{no:3,name:"TRAINING_STATUS_COMPLETED",localName:"COMPLETED"},{no:4,name:"TRAINING_STATUS_FAILED",localName:"FAILED"},{no:5,name:"TRAINING_STATUS_CANCELED",localName:"CANCELED"},{no:6,name:"TRAINING_STATUS_CANCELING",localName:"CANCELING"}]),ng=s.makeMessageType("viam.app.mltraining.v1.SubmitTrainingJobRequest",()=>[{no:7,name:"dataset_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"model_name",kind:"scalar",T:9},{no:4,name:"model_version",kind:"scalar",T:9},{no:5,name:"model_type",kind:"enum",T:s.getEnumType(je)},{no:8,name:"model_framework",kind:"enum",T:s.getEnumType(an)},{no:6,name:"tags",kind:"scalar",T:9,repeated:!0}]),ag=s.makeMessageType("viam.app.mltraining.v1.SubmitTrainingJobResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),tg=s.makeMessageType("viam.app.mltraining.v1.SubmitCustomTrainingJobRequest",()=>[{no:1,name:"dataset_id",kind:"scalar",T:9},{no:2,name:"registry_item_id",kind:"scalar",T:9},{no:6,name:"registry_item_version",kind:"scalar",T:9},{no:3,name:"organization_id",kind:"scalar",T:9},{no:4,name:"model_name",kind:"scalar",T:9},{no:5,name:"model_version",kind:"scalar",T:9},{no:7,name:"arguments",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:8,name:"container_version",kind:"scalar",T:9}]),sg=s.makeMessageType("viam.app.mltraining.v1.SubmitCustomTrainingJobResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),og=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ig=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobResponse",()=>[{no:1,name:"metadata",kind:"message",T:Jo}]),rg=s.makeMessageType("viam.app.mltraining.v1.ListTrainingJobsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:s.getEnumType(Ba)}]),mg=s.makeMessageType("viam.app.mltraining.v1.ListTrainingJobsResponse",()=>[{no:1,name:"jobs",kind:"message",T:Jo,repeated:!0}]),Jo=s.makeMessageType("viam.app.mltraining.v1.TrainingJobMetadata",()=>[{no:7,name:"id",kind:"scalar",T:9},{no:11,name:"dataset_id",kind:"scalar",T:9},{no:12,name:"organization_id",kind:"scalar",T:9},{no:13,name:"model_name",kind:"scalar",T:9},{no:14,name:"model_version",kind:"scalar",T:9},{no:15,name:"model_type",kind:"enum",T:s.getEnumType(je)},{no:17,name:"model_framework",kind:"enum",T:s.getEnumType(an)},{no:18,name:"is_custom_job",kind:"scalar",T:8},{no:19,name:"registry_item_id",kind:"scalar",T:9},{no:20,name:"registry_item_version",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:s.getEnumType(Ba)},{no:8,name:"error_status",kind:"message",T:ln},{no:3,name:"created_on",kind:"message",T:S},{no:4,name:"last_modified",kind:"message",T:S},{no:9,name:"training_started",kind:"message",T:S},{no:10,name:"training_ended",kind:"message",T:S},{no:5,name:"synced_model_id",kind:"scalar",T:9},{no:16,name:"tags",kind:"scalar",T:9,repeated:!0},{no:21,name:"arguments",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:22,name:"container_version",kind:"scalar",T:9}]),cg=s.makeMessageType("viam.app.mltraining.v1.CancelTrainingJobRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),dg=s.makeMessageType("viam.app.mltraining.v1.CancelTrainingJobResponse",[]),lg=s.makeMessageType("viam.app.mltraining.v1.DeleteCompletedTrainingJobRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),pg=s.makeMessageType("viam.app.mltraining.v1.DeleteCompletedTrainingJobResponse",[]),ug=s.makeMessageType("viam.app.mltraining.v1.TrainingJobLogEntry",()=>[{no:1,name:"level",kind:"scalar",T:9},{no:2,name:"time",kind:"message",T:S},{no:3,name:"message",kind:"scalar",T:9}]),gg=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobLogsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9,opt:!0}]),Tg=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobLogsResponse",()=>[{no:1,name:"logs",kind:"message",T:ug,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),kg=s.makeMessageType("viam.app.mltraining.v1.ListSupportedContainersRequest",[]),yg=s.makeMessageType("viam.app.mltraining.v1.ListSupportedContainersResponse",()=>[{no:1,name:"container_map",kind:"map",K:9,V:{kind:"message",T:vg}}]),vg=s.makeMessageType("viam.app.mltraining.v1.Container",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"uri",kind:"scalar",T:9},{no:3,name:"framework",kind:"scalar",T:9},{no:4,name:"description",kind:"scalar",T:9},{no:5,name:"eol",kind:"message",T:S}]),MS=Object.freeze(Object.defineProperty({__proto__:null,CancelTrainingJobRequest:cg,CancelTrainingJobResponse:dg,Container:vg,DeleteCompletedTrainingJobRequest:lg,DeleteCompletedTrainingJobResponse:pg,GetTrainingJobLogsRequest:gg,GetTrainingJobLogsResponse:Tg,GetTrainingJobRequest:og,GetTrainingJobResponse:ig,ListSupportedContainersRequest:kg,ListSupportedContainersResponse:yg,ListTrainingJobsRequest:rg,ListTrainingJobsResponse:mg,ModelFramework:an,ModelType:je,SubmitCustomTrainingJobRequest:tg,SubmitCustomTrainingJobResponse:sg,SubmitTrainingJobRequest:ng,SubmitTrainingJobResponse:ag,TrainingJobLogEntry:ug,TrainingJobMetadata:Jo,TrainingStatus:Ba},Symbol.toStringTag,{value:"Module"})),Fa=s.makeEnum("viam.app.v1.OnlineState",[{no:0,name:"ONLINE_STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"ONLINE_STATE_ONLINE",localName:"ONLINE"},{no:2,name:"ONLINE_STATE_OFFLINE",localName:"OFFLINE"},{no:3,name:"ONLINE_STATE_AWAITING_SETUP",localName:"AWAITING_SETUP"}]),hg=s.makeEnum("viam.app.v1.AuthenticationType",[{no:0,name:"AUTHENTICATION_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"AUTHENTICATION_TYPE_WEB_OAUTH",localName:"WEB_OAUTH"},{no:2,name:"AUTHENTICATION_TYPE_API_KEY",localName:"API_KEY"},{no:3,name:"AUTHENTICATION_TYPE_ROBOT_PART_SECRET",localName:"ROBOT_PART_SECRET"},{no:4,name:"AUTHENTICATION_TYPE_LOCATION_SECRET",localName:"LOCATION_SECRET"}]),Bn=s.makeEnum("viam.app.v1.FragmentVisibility",[{no:0,name:"FRAGMENT_VISIBILITY_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"FRAGMENT_VISIBILITY_PRIVATE",localName:"PRIVATE"},{no:2,name:"FRAGMENT_VISIBILITY_PUBLIC",localName:"PUBLIC"},{no:3,name:"FRAGMENT_VISIBILITY_PUBLIC_UNLISTED",localName:"PUBLIC_UNLISTED"}]),fg=s.makeEnum("viam.app.v1.FragmentErrorType",[{no:0,name:"FRAGMENT_ERROR_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"FRAGMENT_ERROR_TYPE_NO_ACCESS",localName:"NO_ACCESS"},{no:2,name:"FRAGMENT_ERROR_TYPE_NESTING_LIMIT_EXCEEDED",localName:"NESTING_LIMIT_EXCEEDED"},{no:3,name:"FRAGMENT_ERROR_TYPE_CHILD_ID_INVALID",localName:"CHILD_ID_INVALID"},{no:4,name:"FRAGMENT_ERROR_TYPE_CYCLE_DETECTED",localName:"CYCLE_DETECTED"}]),xa=s.makeEnum("viam.app.v1.ModuleSourceType",[{no:0,name:"MODULE_SOURCE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODULE_SOURCE_TYPE_EXTERNAL",localName:"EXTERNAL"},{no:2,name:"MODULE_SOURCE_TYPE_VIAM_HOSTED",localName:"VIAM_HOSTED"}]),Ja=s.makeEnum("viam.app.v1.ModuleLanguage",[{no:0,name:"MODULE_LANGUAGE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODULE_LANGUAGE_GOLANG",localName:"GOLANG"},{no:2,name:"MODULE_LANGUAGE_PYTHON",localName:"PYTHON"},{no:3,name:"MODULE_LANGUAGE_CPP",localName:"CPP"}]),Rg=s.makeEnum("viam.app.v1.RegistryItemStatus",[{no:0,name:"REGISTRY_ITEM_STATUS_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"REGISTRY_ITEM_STATUS_PUBLISHED",localName:"PUBLISHED"},{no:2,name:"REGISTRY_ITEM_STATUS_IN_DEVELOPMENT",localName:"IN_DEVELOPMENT"}]),Tn=s.makeEnum("viam.app.v1.Visibility",[{no:0,name:"VISIBILITY_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"VISIBILITY_PRIVATE",localName:"PRIVATE"},{no:2,name:"VISIBILITY_PUBLIC",localName:"PUBLIC"},{no:3,name:"VISIBILITY_PUBLIC_UNLISTED",localName:"PUBLIC_UNLISTED"}]),_g=s.makeEnum("viam.app.v1.AppType",[{no:0,name:"APP_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"APP_TYPE_SINGLE_MACHINE",localName:"SINGLE_MACHINE"},{no:2,name:"APP_TYPE_MULTI_MACHINE",localName:"MULTI_MACHINE"}]),Sg=s.makeEnum("viam.app.v1.ClientAuthentication",[{no:0,name:"CLIENT_AUTHENTICATION_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"CLIENT_AUTHENTICATION_REQUIRED",localName:"REQUIRED"},{no:2,name:"CLIENT_AUTHENTICATION_NOT_REQUIRED",localName:"NOT_REQUIRED"},{no:3,name:"CLIENT_AUTHENTICATION_NOT_REQUIRED_WHEN_USING_PKCE",localName:"NOT_REQUIRED_WHEN_USING_PKCE"}]),Ig=s.makeEnum("viam.app.v1.PKCE",[{no:0,name:"PKCE_UNSPECIFIED"},{no:1,name:"PKCE_REQUIRED"},{no:2,name:"PKCE_NOT_REQUIRED"},{no:3,name:"PKCE_NOT_REQUIRED_WHEN_USING_CLIENT_AUTHENTICATION"}]),Eg=s.makeEnum("viam.app.v1.URLValidation",[{no:0,name:"URL_VALIDATION_UNSPECIFIED"},{no:1,name:"URL_VALIDATION_EXACT_MATCH"},{no:2,name:"URL_VALIDATION_ALLOW_WILDCARDS"}]),Mg=s.makeEnum("viam.app.v1.EnabledGrant",[{no:0,name:"ENABLED_GRANT_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"ENABLED_GRANT_AUTHORIZATION_CODE",localName:"AUTHORIZATION_CODE"},{no:2,name:"ENABLED_GRANT_IMPLICIT",localName:"IMPLICIT"},{no:3,name:"ENABLED_GRANT_PASSWORD",localName:"PASSWORD"},{no:4,name:"ENABLED_GRANT_REFRESH_TOKEN",localName:"REFRESH_TOKEN"},{no:5,name:"ENABLED_GRANT_DEVICE_CODE",localName:"DEVICE_CODE"}]),kn=s.makeMessageType("viam.app.v1.Robot",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"location",kind:"scalar",T:9},{no:4,name:"last_access",kind:"message",T:S},{no:5,name:"created_on",kind:"message",T:S},{no:6,name:"online_state",kind:"enum",T:s.getEnumType(Fa)},{no:7,name:"seconds_since_online",kind:"scalar",T:3}]),tn=s.makeMessageType("viam.app.v1.RobotPart",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:10,name:"dns_name",kind:"scalar",T:9},{no:3,name:"secret",kind:"scalar",T:9},{no:4,name:"robot",kind:"scalar",T:9},{no:12,name:"location_id",kind:"scalar",T:9},{no:5,name:"robot_config",kind:"message",T:p},{no:6,name:"last_access",kind:"message",T:S},{no:7,name:"user_supplied_info",kind:"message",T:p},{no:8,name:"main_part",kind:"scalar",T:8},{no:9,name:"fqdn",kind:"scalar",T:9},{no:11,name:"local_fqdn",kind:"scalar",T:9},{no:13,name:"created_on",kind:"message",T:S},{no:14,name:"secrets",kind:"message",T:Yo,repeated:!0},{no:15,name:"last_updated",kind:"message",T:S},{no:16,name:"online_state",kind:"enum",T:s.getEnumType(Fa)},{no:17,name:"seconds_since_online",kind:"scalar",T:3}]),bg=s.makeMessageType("viam.app.v1.RobotPartHistoryEntry",()=>[{no:1,name:"part",kind:"scalar",T:9},{no:2,name:"robot",kind:"scalar",T:9},{no:3,name:"when",kind:"message",T:S},{no:4,name:"old",kind:"message",T:tn},{no:5,name:"edited_by",kind:"message",T:zo}]),zo=s.makeMessageType("viam.app.v1.AuthenticatorInfo",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(hg)},{no:2,name:"value",kind:"scalar",T:9},{no:3,name:"is_deactivated",kind:"scalar",T:8}]),Og=s.makeMessageType("viam.app.v1.ListOrganizationsRequest",[]),yn=s.makeMessageType("viam.app.v1.Organization",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"created_on",kind:"message",T:S},{no:4,name:"public_namespace",kind:"scalar",T:9},{no:5,name:"default_region",kind:"scalar",T:9},{no:6,name:"cid",kind:"scalar",T:9,opt:!0},{no:7,name:"default_fragments",kind:"message",T:Vo,opt:!0}]),wg=s.makeMessageType("viam.app.v1.OrganizationMember",()=>[{no:1,name:"user_id",kind:"scalar",T:9},{no:2,name:"emails",kind:"scalar",T:9,repeated:!0},{no:3,name:"date_added",kind:"message",T:S},{no:4,name:"last_login",kind:"message",T:S,opt:!0},{no:5,name:"last_access",kind:"message",T:S,opt:!0}]),Cg=s.makeMessageType("viam.app.v1.ListOrganizationsResponse",()=>[{no:1,name:"organizations",kind:"message",T:yn,repeated:!0}]),Fn=s.makeMessageType("viam.app.v1.OrganizationInvite",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"created_on",kind:"message",T:S},{no:4,name:"authorizations",kind:"message",T:Q,repeated:!0}]),Ng=s.makeMessageType("viam.app.v1.CreateOrganizationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Pg=s.makeMessageType("viam.app.v1.CreateOrganizationResponse",()=>[{no:1,name:"organization",kind:"message",T:yn}]),Dg=s.makeMessageType("viam.app.v1.GetOrganizationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),Ag=s.makeMessageType("viam.app.v1.GetOrganizationResponse",()=>[{no:1,name:"organization",kind:"message",T:yn}]),Ug=s.makeMessageType("viam.app.v1.GetOrganizationNamespaceAvailabilityRequest",()=>[{no:1,name:"public_namespace",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),qg=s.makeMessageType("viam.app.v1.GetOrganizationNamespaceAvailabilityResponse",()=>[{no:1,name:"available",kind:"scalar",T:8}]),Vo=s.makeMessageType("viam.app.v1.FragmentImportList",()=>[{no:1,name:"fragments",kind:"message",T:Ek,repeated:!0}]),Lg=s.makeMessageType("viam.app.v1.UpdateOrganizationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"public_namespace",kind:"scalar",T:9,opt:!0},{no:4,name:"region",kind:"scalar",T:9,opt:!0},{no:5,name:"cid",kind:"scalar",T:9,opt:!0},{no:6,name:"default_fragments",kind:"message",T:Vo,opt:!0}]),Gg=s.makeMessageType("viam.app.v1.UpdateOrganizationResponse",()=>[{no:1,name:"organization",kind:"message",T:yn}]),Bg=s.makeMessageType("viam.app.v1.UpdateOrganizationNamespaceRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"new_public_namespace",kind:"scalar",T:9}]),Fg=s.makeMessageType("viam.app.v1.UpdateOrganizationNamespaceResponse",()=>[{no:1,name:"organization",kind:"message",T:yn}]),xg=s.makeMessageType("viam.app.v1.DeleteOrganizationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),Jg=s.makeMessageType("viam.app.v1.DeleteOrganizationResponse",[]),zg=s.makeMessageType("viam.app.v1.GetOrganizationMetadataRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),Vg=s.makeMessageType("viam.app.v1.GetOrganizationMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),$g=s.makeMessageType("viam.app.v1.UpdateOrganizationMetadataRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),Yg=s.makeMessageType("viam.app.v1.UpdateOrganizationMetadataResponse",[]),Wg=s.makeMessageType("viam.app.v1.ListOrganizationMembersRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),jg=s.makeMessageType("viam.app.v1.ListOrganizationMembersResponse",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"members",kind:"message",T:wg,repeated:!0},{no:3,name:"invites",kind:"message",T:Fn,repeated:!0}]),Hg=s.makeMessageType("viam.app.v1.CreateOrganizationInviteRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"authorizations",kind:"message",T:Q,repeated:!0},{no:4,name:"send_email_invite",kind:"scalar",T:8,opt:!0}]),Kg=s.makeMessageType("viam.app.v1.CreateOrganizationInviteResponse",()=>[{no:1,name:"invite",kind:"message",T:Fn}]),Xg=s.makeMessageType("viam.app.v1.UpdateOrganizationInviteAuthorizationsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"add_authorizations",kind:"message",T:Q,repeated:!0},{no:4,name:"remove_authorizations",kind:"message",T:Q,repeated:!0}]),Qg=s.makeMessageType("viam.app.v1.UpdateOrganizationInviteAuthorizationsResponse",()=>[{no:1,name:"invite",kind:"message",T:Fn}]),Zg=s.makeMessageType("viam.app.v1.DeleteOrganizationInviteRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9}]),eT=s.makeMessageType("viam.app.v1.DeleteOrganizationInviteResponse",[]),nT=s.makeMessageType("viam.app.v1.ResendOrganizationInviteRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"send_email_invite",kind:"scalar",T:8,opt:!0}]),aT=s.makeMessageType("viam.app.v1.ResendOrganizationInviteResponse",()=>[{no:1,name:"invite",kind:"message",T:Fn}]),tT=s.makeMessageType("viam.app.v1.DeleteOrganizationMemberRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9}]),sT=s.makeMessageType("viam.app.v1.DeleteOrganizationMemberResponse",[]),za=s.makeMessageType("viam.app.v1.BillingAddress",()=>[{no:1,name:"address_line_1",kind:"scalar",T:9},{no:2,name:"address_line_2",kind:"scalar",T:9,opt:!0},{no:3,name:"city",kind:"scalar",T:9},{no:4,name:"state",kind:"scalar",T:9},{no:5,name:"zipcode",kind:"scalar",T:9},{no:6,name:"country",kind:"scalar",T:9}]),oT=s.makeMessageType("viam.app.v1.EnableBillingServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"billing_address",kind:"message",T:za}]),iT=s.makeMessageType("viam.app.v1.EnableBillingServiceResponse",[]),rT=s.makeMessageType("viam.app.v1.UpdateBillingServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"billing_address",kind:"message",T:za}]),mT=s.makeMessageType("viam.app.v1.UpdateBillingServiceResponse",[]),cT=s.makeMessageType("viam.app.v1.GetBillingServiceConfigRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),dT=s.makeMessageType("viam.app.v1.GetBillingServiceConfigResponse",()=>[{no:1,name:"billing_address",kind:"message",T:za},{no:2,name:"support_email",kind:"scalar",T:9},{no:3,name:"logo_url",kind:"scalar",T:9},{no:4,name:"billing_dashboard_url",kind:"scalar",T:9}]),lT=s.makeMessageType("viam.app.v1.DisableBillingServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),pT=s.makeMessageType("viam.app.v1.DisableBillingServiceResponse",[]),uT=s.makeMessageType("viam.app.v1.OrganizationSetSupportEmailRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9}]),gT=s.makeMessageType("viam.app.v1.OrganizationSetSupportEmailResponse",[]),TT=s.makeMessageType("viam.app.v1.OrganizationGetSupportEmailRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),kT=s.makeMessageType("viam.app.v1.OrganizationGetSupportEmailResponse",()=>[{no:1,name:"email",kind:"scalar",T:9}]),$o=s.makeMessageType("viam.app.v1.OrganizationIdentity",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),yT=s.makeMessageType("viam.app.v1.LocationOrganization",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"primary",kind:"scalar",T:8}]),Va=s.makeMessageType("viam.app.v1.LocationAuth",()=>[{no:1,name:"secret",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9},{no:3,name:"secrets",kind:"message",T:Yo,repeated:!0}]),vT=s.makeMessageType("viam.app.v1.StorageConfig",()=>[{no:1,name:"region",kind:"scalar",T:9}]),xn=s.makeMessageType("viam.app.v1.Location",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:4,name:"parent_location_id",kind:"scalar",T:9},{no:5,name:"auth",kind:"message",T:Va},{no:6,name:"organizations",kind:"message",T:yT,repeated:!0},{no:3,name:"created_on",kind:"message",T:S},{no:7,name:"robot_count",kind:"scalar",T:5},{no:8,name:"config",kind:"message",T:vT},{no:9,name:"primary_org_identity",kind:"message",T:$o,opt:!0}]),Yo=s.makeMessageType("viam.app.v1.SharedSecret",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"secret",kind:"scalar",T:9},{no:3,name:"created_on",kind:"message",T:S},{no:4,name:"state",kind:"enum",T:s.getEnumType(hT)}]),hT=s.makeEnum("viam.app.v1.SharedSecret.State",[{no:0,name:"STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"STATE_ENABLED",localName:"ENABLED"},{no:2,name:"STATE_DISABLED",localName:"DISABLED"}]),fT=s.makeMessageType("viam.app.v1.CreateLocationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"parent_location_id",kind:"scalar",T:9,opt:!0}]),RT=s.makeMessageType("viam.app.v1.CreateLocationResponse",()=>[{no:1,name:"location",kind:"message",T:xn}]),_T=s.makeMessageType("viam.app.v1.GetLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),ST=s.makeMessageType("viam.app.v1.GetLocationResponse",()=>[{no:1,name:"location",kind:"message",T:xn}]),IT=s.makeMessageType("viam.app.v1.UpdateLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"parent_location_id",kind:"scalar",T:9,opt:!0},{no:4,name:"region",kind:"scalar",T:9,opt:!0}]),ET=s.makeMessageType("viam.app.v1.UpdateLocationResponse",()=>[{no:1,name:"location",kind:"message",T:xn}]),MT=s.makeMessageType("viam.app.v1.DeleteLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),bT=s.makeMessageType("viam.app.v1.DeleteLocationResponse",[]),OT=s.makeMessageType("viam.app.v1.GetLocationMetadataRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),wT=s.makeMessageType("viam.app.v1.GetLocationMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),CT=s.makeMessageType("viam.app.v1.UpdateLocationMetadataRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),NT=s.makeMessageType("viam.app.v1.UpdateLocationMetadataResponse",[]),PT=s.makeMessageType("viam.app.v1.GetOrganizationsWithAccessToLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),DT=s.makeMessageType("viam.app.v1.GetOrganizationsWithAccessToLocationResponse",()=>[{no:1,name:"organization_identities",kind:"message",T:$o,repeated:!0}]),AT=s.makeMessageType("viam.app.v1.ListLocationsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),UT=s.makeMessageType("viam.app.v1.ShareLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),qT=s.makeMessageType("viam.app.v1.ShareLocationResponse",[]),LT=s.makeMessageType("viam.app.v1.UnshareLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),GT=s.makeMessageType("viam.app.v1.UnshareLocationResponse",[]),BT=s.makeMessageType("viam.app.v1.ListLocationsResponse",()=>[{no:1,name:"locations",kind:"message",T:xn,repeated:!0}]),FT=s.makeMessageType("viam.app.v1.CreateLocationSecretRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),xT=s.makeMessageType("viam.app.v1.CreateLocationSecretResponse",()=>[{no:1,name:"auth",kind:"message",T:Va}]),JT=s.makeMessageType("viam.app.v1.DeleteLocationSecretRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"secret_id",kind:"scalar",T:9}]),zT=s.makeMessageType("viam.app.v1.DeleteLocationSecretResponse",[]),VT=s.makeMessageType("viam.app.v1.LocationAuthRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),$T=s.makeMessageType("viam.app.v1.LocationAuthResponse",()=>[{no:1,name:"auth",kind:"message",T:Va}]),YT=s.makeMessageType("viam.app.v1.GetRobotRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),WT=s.makeMessageType("viam.app.v1.GetRoverRentalRobotsRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),jT=s.makeMessageType("viam.app.v1.RoverRentalRobot",()=>[{no:1,name:"robot_id",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9},{no:3,name:"robot_name",kind:"scalar",T:9},{no:4,name:"robot_main_part_id",kind:"scalar",T:9}]),HT=s.makeMessageType("viam.app.v1.GetRoverRentalRobotsResponse",()=>[{no:1,name:"robots",kind:"message",T:jT,repeated:!0}]),KT=s.makeMessageType("viam.app.v1.GetRobotResponse",()=>[{no:1,name:"robot",kind:"message",T:kn}]),XT=s.makeMessageType("viam.app.v1.GetRobotPartsRequest",()=>[{no:1,name:"robot_id",kind:"scalar",T:9}]),QT=s.makeMessageType("viam.app.v1.GetRobotPartsResponse",()=>[{no:1,name:"parts",kind:"message",T:tn,repeated:!0}]),ZT=s.makeMessageType("viam.app.v1.GetRobotPartRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ek=s.makeMessageType("viam.app.v1.GetRobotPartResponse",()=>[{no:1,name:"part",kind:"message",T:tn},{no:2,name:"config_json",kind:"scalar",T:9}]),nk=s.makeMessageType("viam.app.v1.GetRobotPartByNameAndLocationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9}]),ak=s.makeMessageType("viam.app.v1.GetRobotPartByNameAndLocationResponse",()=>[{no:1,name:"part",kind:"message",T:tn}]),tk=s.makeMessageType("viam.app.v1.GetRobotPartLogsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"errors_only",kind:"scalar",T:8},{no:3,name:"filter",kind:"scalar",T:9,opt:!0},{no:4,name:"page_token",kind:"scalar",T:9,opt:!0},{no:5,name:"levels",kind:"scalar",T:9,repeated:!0},{no:6,name:"start",kind:"message",T:S,opt:!0},{no:7,name:"end",kind:"message",T:S,opt:!0},{no:8,name:"limit",kind:"scalar",T:3,opt:!0},{no:9,name:"source",kind:"scalar",T:9,opt:!0},{no:10,name:"user_facing_only",kind:"scalar",T:8,opt:!0}]),sk=s.makeMessageType("viam.app.v1.GetRobotPartLogsResponse",()=>[{no:1,name:"logs",kind:"message",T:Pn,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),ok=s.makeMessageType("viam.app.v1.TailRobotPartLogsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"errors_only",kind:"scalar",T:8},{no:3,name:"filter",kind:"scalar",T:9,opt:!0}]),ik=s.makeMessageType("viam.app.v1.TailRobotPartLogsResponse",()=>[{no:1,name:"logs",kind:"message",T:Pn,repeated:!0}]),rk=s.makeMessageType("viam.app.v1.GetRobotPartHistoryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),mk=s.makeMessageType("viam.app.v1.GetRobotPartHistoryResponse",()=>[{no:1,name:"history",kind:"message",T:bg,repeated:!0}]),ck=s.makeMessageType("viam.app.v1.UpdateRobotPartRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"robot_config",kind:"message",T:p},{no:4,name:"last_known_update",kind:"message",T:S,opt:!0}]),dk=s.makeMessageType("viam.app.v1.UpdateRobotPartResponse",()=>[{no:1,name:"part",kind:"message",T:tn}]),lk=s.makeMessageType("viam.app.v1.NewRobotPartRequest",()=>[{no:1,name:"robot_id",kind:"scalar",T:9},{no:2,name:"part_name",kind:"scalar",T:9}]),pk=s.makeMessageType("viam.app.v1.NewRobotPartResponse",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),uk=s.makeMessageType("viam.app.v1.DeleteRobotPartRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),gk=s.makeMessageType("viam.app.v1.GetRobotPartMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Tk=s.makeMessageType("viam.app.v1.GetRobotPartMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),kk=s.makeMessageType("viam.app.v1.UpdateRobotPartMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),yk=s.makeMessageType("viam.app.v1.UpdateRobotPartMetadataResponse",[]),vk=s.makeMessageType("viam.app.v1.GetRobotAPIKeysRequest",()=>[{no:1,name:"robot_id",kind:"scalar",T:9}]),hk=s.makeMessageType("viam.app.v1.APIKey",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"created_on",kind:"message",T:S}]),fk=s.makeMessageType("viam.app.v1.GetRobotAPIKeysResponse",()=>[{no:1,name:"api_keys",kind:"message",T:ei,repeated:!0}]),Rk=s.makeMessageType("viam.app.v1.DeleteRobotPartResponse",[]),He=s.makeMessageType("viam.app.v1.Fragment",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"fragment",kind:"message",T:p},{no:4,name:"organization_owner",kind:"scalar",T:9},{no:5,name:"public",kind:"scalar",T:8},{no:6,name:"created_on",kind:"message",T:S},{no:7,name:"organization_name",kind:"scalar",T:9},{no:9,name:"robot_part_count",kind:"scalar",T:5},{no:10,name:"organization_count",kind:"scalar",T:5},{no:11,name:"only_used_by_owner",kind:"scalar",T:8},{no:12,name:"visibility",kind:"enum",T:s.getEnumType(Bn)},{no:13,name:"last_updated",kind:"message",T:S},{no:14,name:"revision",kind:"scalar",T:9}]),_k=s.makeMessageType("viam.app.v1.FragmentHistoryEntry",()=>[{no:1,name:"fragment",kind:"scalar",T:9},{no:2,name:"edited_on",kind:"message",T:S},{no:3,name:"old",kind:"message",T:He},{no:4,name:"edited_by",kind:"message",T:zo},{no:5,name:"revision",kind:"scalar",T:9},{no:6,name:"config",kind:"message",T:p}]),Sk=s.makeMessageType("viam.app.v1.FragmentRevision",()=>[{no:1,name:"revision",kind:"scalar",T:9},{no:2,name:"created_at",kind:"message",T:S}]),$a=s.makeMessageType("viam.app.v1.FragmentTag",()=>[{no:1,name:"tag",kind:"scalar",T:9},{no:2,name:"revision",kind:"scalar",T:9}]),Ik=s.makeMessageType("viam.app.v1.FragmentError",()=>[{no:1,name:"error_type",kind:"enum",T:s.getEnumType(fg)},{no:2,name:"fragment_id",kind:"scalar",T:9},{no:3,name:"detail",kind:"scalar",T:9}]),Ya=s.makeMessageType("viam.app.v1.FragmentUsage",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"organizations",kind:"scalar",T:5},{no:3,name:"machines",kind:"scalar",T:5},{no:4,name:"machines_in_current_org",kind:"scalar",T:5},{no:5,name:"version",kind:"scalar",T:9,opt:!0}]),Ek=s.makeMessageType("viam.app.v1.FragmentImport",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"prefix",kind:"scalar",T:9,opt:!0},{no:4,name:"variables",kind:"map",K:9,V:{kind:"scalar",T:9}}]),Wo=s.makeMessageType("viam.app.v1.ResolvedFragment",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"resolved_config",kind:"message",T:p},{no:3,name:"error",kind:"message",T:Ik},{no:4,name:"revision",kind:"scalar",T:9}]),Mk=s.makeMessageType("viam.app.v1.ListFragmentsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"show_public",kind:"scalar",T:8},{no:3,name:"fragment_visibility",kind:"enum",T:s.getEnumType(Bn),repeated:!0}]),bk=s.makeMessageType("viam.app.v1.ListFragmentsResponse",()=>[{no:1,name:"fragments",kind:"message",T:He,repeated:!0},{no:2,name:"fragment_usages",kind:"message",T:Ya,repeated:!0}]),Ok=s.makeMessageType("viam.app.v1.GetFragmentRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"current_organization_id",kind:"scalar",T:9},{no:3,name:"version",kind:"scalar",T:9,opt:!0}]),wk=s.makeMessageType("viam.app.v1.GetFragmentResponse",()=>[{no:1,name:"fragment",kind:"message",T:He},{no:2,name:"fragment_usage",kind:"message",T:Ya},{no:3,name:"revisions",kind:"message",T:Sk,repeated:!0},{no:4,name:"tags",kind:"message",T:$a,repeated:!0}]),Ck=s.makeMessageType("viam.app.v1.CreateFragmentRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"config",kind:"message",T:p},{no:3,name:"organization_id",kind:"scalar",T:9},{no:4,name:"visibility",kind:"enum",T:s.getEnumType(Bn),opt:!0}]),Nk=s.makeMessageType("viam.app.v1.CreateFragmentResponse",()=>[{no:1,name:"fragment",kind:"message",T:He}]),Pk=s.makeMessageType("viam.app.v1.UpdateFragmentRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"config",kind:"message",T:p},{no:4,name:"public",kind:"scalar",T:8,opt:!0},{no:5,name:"visibility",kind:"enum",T:s.getEnumType(Bn),opt:!0},{no:6,name:"last_known_update",kind:"message",T:S,opt:!0}]),Dk=s.makeMessageType("viam.app.v1.UpdateFragmentResponse",()=>[{no:1,name:"fragment",kind:"message",T:He}]),Ak=s.makeMessageType("viam.app.v1.DeleteFragmentRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Uk=s.makeMessageType("viam.app.v1.DeleteFragmentResponse",[]),qk=s.makeMessageType("viam.app.v1.GetFragmentHistoryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9,opt:!0},{no:3,name:"page_limit",kind:"scalar",T:3,opt:!0}]),Lk=s.makeMessageType("viam.app.v1.GetFragmentHistoryResponse",()=>[{no:1,name:"history",kind:"message",T:_k,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),Gk=s.makeMessageType("viam.app.v1.GetFragmentUsageRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9}]),Bk=s.makeMessageType("viam.app.v1.GetFragmentUsageResponse",()=>[{no:1,name:"version_usages",kind:"message",T:Ya,repeated:!0}]),Fk=s.makeMessageType("viam.app.v1.SetFragmentTagRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"tag",kind:"scalar",T:9},{no:3,name:"revision",kind:"scalar",T:9}]),xk=s.makeMessageType("viam.app.v1.SetFragmentTagResponse",()=>[{no:1,name:"tags",kind:"message",T:$a,repeated:!0}]),Jk=s.makeMessageType("viam.app.v1.DeleteFragmentTagRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"tag",kind:"scalar",T:9}]),zk=s.makeMessageType("viam.app.v1.DeleteFragmentTagResponse",()=>[{no:1,name:"tags",kind:"message",T:$a,repeated:!0}]),Vk=s.makeMessageType("viam.app.v1.ListRobotsRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),$k=s.makeMessageType("viam.app.v1.ListRobotsForLocationsRequest",()=>[{no:1,name:"location_ids",kind:"scalar",T:9,repeated:!0}]),Yk=s.makeMessageType("viam.app.v1.ListRobotsForOrgRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),jo=s.makeMessageType("viam.app.v1.AdditionalFragment",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9,opt:!0}]),Wk=s.makeMessageType("viam.app.v1.ListNestedFragmentsRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9,opt:!0},{no:2,name:"additional_fragments",kind:"message",T:jo,repeated:!0}]),jk=s.makeMessageType("viam.app.v1.ListNestedFragmentsResponse",()=>[{no:1,name:"fragments",kind:"message",T:He,repeated:!0},{no:2,name:"resolved_fragments",kind:"message",T:Wo,repeated:!0}]),Hk=s.makeMessageType("viam.app.v1.ListMachineFragmentsRequest",()=>[{no:1,name:"machine_id",kind:"scalar",T:9},{no:2,name:"additional_fragment_ids",kind:"scalar",T:9,repeated:!0},{no:3,name:"additional_fragments",kind:"message",T:jo,repeated:!0}]),Kk=s.makeMessageType("viam.app.v1.ListMachineFragmentsResponse",()=>[{no:1,name:"fragments",kind:"message",T:He,repeated:!0},{no:2,name:"resolved_fragments",kind:"message",T:Wo,repeated:!0}]),Ho=s.makeMessageType("viam.app.v1.ListMachineSummariesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"fragment_ids",kind:"scalar",T:9,repeated:!0},{no:3,name:"location_ids",kind:"scalar",T:9,repeated:!0},{no:4,name:"limit",kind:"scalar",T:5,opt:!0}]),Xk=s.makeMessageType("viam.app.v1.ListMachineSummariesResponse",()=>[{no:1,name:"location_summaries",kind:"message",T:Qk,repeated:!0}]),Qk=s.makeMessageType("viam.app.v1.LocationSummary",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"location_name",kind:"scalar",T:9},{no:3,name:"machine_summaries",kind:"message",T:Zk,repeated:!0}]),Zk=s.makeMessageType("viam.app.v1.MachineSummary",()=>[{no:1,name:"machine_id",kind:"scalar",T:9},{no:2,name:"machine_name",kind:"scalar",T:9},{no:3,name:"part_summaries",kind:"message",T:ty,repeated:!0}]),ey=s.makeMessageType("viam.app.v1.FragmentSummary",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9}]),ny=s.makeMessageType("viam.app.v1.ViamServerVersion",()=>[{no:1,name:"major",kind:"scalar",T:9,oneof:"version"},{no:2,name:"minor",kind:"scalar",T:9,oneof:"version"}]),ay=s.makeMessageType("viam.app.v1.ViamAgentVersion",()=>[{no:1,name:"major",kind:"scalar",T:9,oneof:"version"},{no:2,name:"minor",kind:"scalar",T:9,oneof:"version"}]),ty=s.makeMessageType("viam.app.v1.PartSummary",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"part_name",kind:"scalar",T:9},{no:11,name:"is_main_part",kind:"scalar",T:8},{no:12,name:"online_state",kind:"enum",T:s.getEnumType(Fa)},{no:13,name:"seconds_since_online",kind:"scalar",T:3},{no:14,name:"last_access",kind:"message",T:S,opt:!0},{no:3,name:"last_online",kind:"message",T:S,opt:!0},{no:4,name:"viam_server_version",kind:"message",T:ny,opt:!0},{no:5,name:"viam_agent_version",kind:"message",T:ay,opt:!0},{no:6,name:"os",kind:"scalar",T:9,opt:!0},{no:7,name:"platform",kind:"scalar",T:9,opt:!0},{no:8,name:"public_ip_address",kind:"scalar",T:9,opt:!0},{no:10,name:"dns_name",kind:"scalar",T:9,opt:!0},{no:9,name:"fragments",kind:"message",T:ey,repeated:!0}]),sy=s.makeMessageType("viam.app.v1.ListRobotsResponse",()=>[{no:1,name:"robots",kind:"message",T:kn,repeated:!0}]),oy=s.makeMessageType("viam.app.v1.ListRobotsForLocationsResponse",()=>[{no:1,name:"robots",kind:"message",T:kn,repeated:!0}]),iy=s.makeMessageType("viam.app.v1.ListRobotsForOrgResponse",()=>[{no:1,name:"robots",kind:"message",T:kn,repeated:!0}]),ry=s.makeMessageType("viam.app.v1.NewRobotRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"location",kind:"scalar",T:9}]),my=s.makeMessageType("viam.app.v1.NewRobotResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),cy=s.makeMessageType("viam.app.v1.UpdateRobotRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"location",kind:"scalar",T:9}]),dy=s.makeMessageType("viam.app.v1.UpdateRobotResponse",()=>[{no:1,name:"robot",kind:"message",T:kn}]),ly=s.makeMessageType("viam.app.v1.DeleteRobotRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),py=s.makeMessageType("viam.app.v1.DeleteRobotResponse",[]),uy=s.makeMessageType("viam.app.v1.GetRobotMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),gy=s.makeMessageType("viam.app.v1.GetRobotMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),Ty=s.makeMessageType("viam.app.v1.UpdateRobotMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),ky=s.makeMessageType("viam.app.v1.UpdateRobotMetadataResponse",[]),yy=s.makeMessageType("viam.app.v1.MarkPartAsMainRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),vy=s.makeMessageType("viam.app.v1.MarkPartAsMainResponse",[]),hy=s.makeMessageType("viam.app.v1.MarkPartForRestartRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),fy=s.makeMessageType("viam.app.v1.MarkPartForRestartResponse",[]),Ry=s.makeMessageType("viam.app.v1.CreateRobotPartSecretRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),_y=s.makeMessageType("viam.app.v1.CreateRobotPartSecretResponse",()=>[{no:1,name:"part",kind:"message",T:tn}]),Sy=s.makeMessageType("viam.app.v1.DeleteRobotPartSecretRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"secret_id",kind:"scalar",T:9}]),Iy=s.makeMessageType("viam.app.v1.DeleteRobotPartSecretResponse",[]),Q=s.makeMessageType("viam.app.v1.Authorization",()=>[{no:1,name:"authorization_type",kind:"scalar",T:9},{no:2,name:"authorization_id",kind:"scalar",T:9},{no:3,name:"resource_type",kind:"scalar",T:9},{no:4,name:"resource_id",kind:"scalar",T:9},{no:5,name:"identity_id",kind:"scalar",T:9},{no:6,name:"organization_id",kind:"scalar",T:9},{no:7,name:"identity_type",kind:"scalar",T:9}]),Ey=s.makeMessageType("viam.app.v1.AddRoleRequest",()=>[{no:1,name:"authorization",kind:"message",T:Q}]),My=s.makeMessageType("viam.app.v1.AddRoleResponse",[]),by=s.makeMessageType("viam.app.v1.RemoveRoleRequest",()=>[{no:1,name:"authorization",kind:"message",T:Q}]),Oy=s.makeMessageType("viam.app.v1.RemoveRoleResponse",[]),wy=s.makeMessageType("viam.app.v1.ChangeRoleRequest",()=>[{no:1,name:"old_authorization",kind:"message",T:Q},{no:2,name:"new_authorization",kind:"message",T:Q}]),Cy=s.makeMessageType("viam.app.v1.ChangeRoleResponse",[]),Ny=s.makeMessageType("viam.app.v1.ListAuthorizationsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"resource_ids",kind:"scalar",T:9,repeated:!0}]),Py=s.makeMessageType("viam.app.v1.ListAuthorizationsResponse",()=>[{no:1,name:"authorizations",kind:"message",T:Q,repeated:!0}]),Dy=s.makeMessageType("viam.app.v1.CheckPermissionsRequest",()=>[{no:1,name:"permissions",kind:"message",T:Ko,repeated:!0}]),Ko=s.makeMessageType("viam.app.v1.AuthorizedPermissions",()=>[{no:1,name:"resource_type",kind:"scalar",T:9},{no:2,name:"resource_id",kind:"scalar",T:9},{no:3,name:"permissions",kind:"scalar",T:9,repeated:!0}]),Ay=s.makeMessageType("viam.app.v1.CheckPermissionsResponse",()=>[{no:1,name:"authorized_permissions",kind:"message",T:Ko,repeated:!0}]),Uy=s.makeMessageType("viam.app.v1.ModuleVersion",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"files",kind:"message",T:Qo,repeated:!0},{no:3,name:"models",kind:"message",T:on,repeated:!0},{no:4,name:"entrypoint",kind:"scalar",T:9},{no:5,name:"first_run",kind:"scalar",T:9,opt:!0},{no:6,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:7,name:"apps",kind:"message",T:sn,repeated:!0}]),qy=s.makeMessageType("viam.app.v1.ModuleMetadata",()=>[{no:1,name:"models",kind:"message",T:on,repeated:!0},{no:2,name:"versions",kind:"message",T:Uy,repeated:!0},{no:3,name:"entrypoint",kind:"scalar",T:9},{no:4,name:"first_run",kind:"scalar",T:9,opt:!0},{no:5,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:6,name:"apps",kind:"message",T:sn,repeated:!0},{no:7,name:"source_type",kind:"enum",T:s.getEnumType(xa),opt:!0},{no:8,name:"language",kind:"enum",T:s.getEnumType(Ja),opt:!0}]),Ly=s.makeMessageType("viam.app.v1.MLModelVersion",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"created_on",kind:"message",T:S}]),Gy=s.makeMessageType("viam.app.v1.MLModelMetadata",()=>[{no:1,name:"versions",kind:"scalar",T:9,repeated:!0},{no:2,name:"model_type",kind:"enum",T:s.getEnumType(je)},{no:3,name:"model_framework",kind:"enum",T:s.getEnumType(an)},{no:4,name:"detailed_versions",kind:"message",T:Ly,repeated:!0}]),By=s.makeMessageType("viam.app.v1.MLTrainingVersion",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"created_on",kind:"message",T:S}]),Fy=s.makeMessageType("viam.app.v1.MLTrainingMetadata",()=>[{no:5,name:"versions",kind:"message",T:By,repeated:!0},{no:2,name:"model_type",kind:"enum",T:s.getEnumType(je)},{no:3,name:"model_framework",kind:"enum",T:s.getEnumType(an)},{no:4,name:"draft",kind:"scalar",T:8}]),Wa=s.makeMessageType("viam.app.v1.RegistryItem",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"public_namespace",kind:"scalar",T:9},{no:4,name:"name",kind:"scalar",T:9},{no:5,name:"type",kind:"enum",T:s.getEnumType(Ga)},{no:6,name:"visibility",kind:"enum",T:s.getEnumType(Tn)},{no:7,name:"url",kind:"scalar",T:9},{no:8,name:"description",kind:"scalar",T:9},{no:9,name:"total_robot_usage",kind:"scalar",T:3},{no:13,name:"total_external_robot_usage",kind:"scalar",T:3},{no:10,name:"total_organization_usage",kind:"scalar",T:3},{no:14,name:"total_external_organization_usage",kind:"scalar",T:3},{no:11,name:"module_metadata",kind:"message",T:qy,oneof:"metadata"},{no:12,name:"ml_model_metadata",kind:"message",T:Gy,oneof:"metadata"},{no:18,name:"ml_training_metadata",kind:"message",T:Fy,oneof:"metadata"},{no:15,name:"created_at",kind:"message",T:S},{no:16,name:"updated_at",kind:"message",T:S}]),xy=s.makeMessageType("viam.app.v1.GetRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0}]),Jy=s.makeMessageType("viam.app.v1.GetRegistryItemResponse",()=>[{no:1,name:"item",kind:"message",T:Wa}]),zy=s.makeMessageType("viam.app.v1.CreateRegistryItemRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"type",kind:"enum",T:s.getEnumType(Ga)}]),Vy=s.makeMessageType("viam.app.v1.CreateRegistryItemResponse",[]),$y=s.makeMessageType("viam.app.v1.UpdateRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:s.getEnumType(Ga)},{no:3,name:"description",kind:"scalar",T:9},{no:4,name:"visibility",kind:"enum",T:s.getEnumType(Tn)},{no:5,name:"url",kind:"scalar",T:9,opt:!0},{no:6,name:"update_module_metadata",kind:"message",T:ov,oneof:"metadata"},{no:7,name:"update_ml_model_metadata",kind:"message",T:iv,oneof:"metadata"},{no:8,name:"update_ml_training_metadata",kind:"message",T:rv,oneof:"metadata"},{no:9,name:"markdown_description",kind:"scalar",T:9,opt:!0}]),Yy=s.makeMessageType("viam.app.v1.UpdateRegistryItemResponse",[]),Wy=s.makeMessageType("viam.app.v1.ListRegistryItemsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9,opt:!0},{no:2,name:"types",kind:"enum",T:s.getEnumType(Ga),repeated:!0},{no:3,name:"visibilities",kind:"enum",T:s.getEnumType(Tn),repeated:!0},{no:4,name:"platforms",kind:"scalar",T:9,repeated:!0},{no:5,name:"statuses",kind:"enum",T:s.getEnumType(Rg),repeated:!0},{no:6,name:"search_term",kind:"scalar",T:9,opt:!0},{no:7,name:"page_token",kind:"scalar",T:9,opt:!0},{no:8,name:"public_namespaces",kind:"scalar",T:9,repeated:!0},{no:9,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0},{no:10,name:"module_source_types",kind:"enum",T:s.getEnumType(xa),repeated:!0},{no:11,name:"module_languages",kind:"enum",T:s.getEnumType(Ja),repeated:!0}]),jy=s.makeMessageType("viam.app.v1.ListRegistryItemsResponse",()=>[{no:1,name:"items",kind:"message",T:Wa,repeated:!0}]),Hy=s.makeMessageType("viam.app.v1.DeleteRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9}]),Ky=s.makeMessageType("viam.app.v1.DeleteRegistryItemResponse",[]),Xy=s.makeMessageType("viam.app.v1.RenameRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"new_name",kind:"scalar",T:9}]),Qy=s.makeMessageType("viam.app.v1.RenameRegistryItemResponse",()=>[{no:1,name:"item",kind:"message",T:Wa}]),Zy=s.makeMessageType("viam.app.v1.TransferRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"new_public_namespace",kind:"scalar",T:9}]),ev=s.makeMessageType("viam.app.v1.TransferRegistryItemResponse",[]),nv=s.makeMessageType("viam.app.v1.CreateModuleRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),av=s.makeMessageType("viam.app.v1.CreateModuleResponse",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9}]),tv=s.makeMessageType("viam.app.v1.UpdateModuleRequest",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"visibility",kind:"enum",T:s.getEnumType(Tn)},{no:3,name:"url",kind:"scalar",T:9},{no:4,name:"description",kind:"scalar",T:9},{no:5,name:"models",kind:"message",T:on,repeated:!0},{no:6,name:"entrypoint",kind:"scalar",T:9},{no:7,name:"first_run",kind:"scalar",T:9,opt:!0},{no:8,name:"apps",kind:"message",T:sn,repeated:!0},{no:9,name:"markdown_description",kind:"scalar",T:9,opt:!0}]),sn=s.makeMessageType("viam.app.v1.App",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"entrypoint",kind:"scalar",T:9},{no:4,name:"fragment_ids",kind:"scalar",T:9,repeated:!0},{no:5,name:"logo_path",kind:"scalar",T:9,opt:!0},{no:6,name:"customizations",kind:"message",T:sh}]),sv=s.makeMessageType("viam.app.v1.UpdateModuleResponse",()=>[{no:1,name:"url",kind:"scalar",T:9}]),ov=s.makeMessageType("viam.app.v1.UpdateModuleMetadata",()=>[{no:1,name:"models",kind:"message",T:on,repeated:!0},{no:2,name:"entrypoint",kind:"scalar",T:9},{no:3,name:"apps",kind:"message",T:sn,repeated:!0},{no:4,name:"source_type",kind:"enum",T:s.getEnumType(xa),opt:!0},{no:5,name:"language",kind:"enum",T:s.getEnumType(Ja),opt:!0}]),iv=s.makeMessageType("viam.app.v1.UpdateMLModelMetadata",()=>[{no:1,name:"model_type",kind:"enum",T:s.getEnumType(je)},{no:2,name:"model_framework",kind:"enum",T:s.getEnumType(an)}]),rv=s.makeMessageType("viam.app.v1.UpdateMLTrainingMetadata",()=>[{no:1,name:"model_type",kind:"enum",T:s.getEnumType(je)},{no:2,name:"model_framework",kind:"enum",T:s.getEnumType(an)},{no:3,name:"draft",kind:"scalar",T:8}]),on=s.makeMessageType("viam.app.v1.Model",()=>[{no:1,name:"api",kind:"scalar",T:9},{no:2,name:"model",kind:"scalar",T:9},{no:3,name:"markdown_documentation",kind:"scalar",T:9,opt:!0},{no:4,name:"description",kind:"scalar",T:9,opt:!0},{no:5,name:"supported_hardware",kind:"scalar",T:9,repeated:!0}]),mv=s.makeMessageType("viam.app.v1.ModuleFileInfo",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"platform",kind:"scalar",T:9},{no:5,name:"platform_tags",kind:"scalar",T:9,repeated:!0}]),cv=s.makeMessageType("viam.app.v1.UploadModuleFileRequest",()=>[{no:1,name:"module_file_info",kind:"message",T:mv,oneof:"module_file"},{no:2,name:"file",kind:"scalar",T:12,oneof:"module_file"}]),dv=s.makeMessageType("viam.app.v1.UploadModuleFileResponse",()=>[{no:1,name:"url",kind:"scalar",T:9}]),lv=s.makeMessageType("viam.app.v1.GetModuleRequest",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0}]),pv=s.makeMessageType("viam.app.v1.GetModuleResponse",()=>[{no:1,name:"module",kind:"message",T:Xo}]),Xo=s.makeMessageType("viam.app.v1.Module",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"visibility",kind:"enum",T:s.getEnumType(Tn)},{no:4,name:"versions",kind:"message",T:uv,repeated:!0},{no:5,name:"url",kind:"scalar",T:9},{no:6,name:"description",kind:"scalar",T:9},{no:7,name:"models",kind:"message",T:on,repeated:!0},{no:8,name:"total_robot_usage",kind:"scalar",T:3},{no:9,name:"total_organization_usage",kind:"scalar",T:3},{no:10,name:"organization_id",kind:"scalar",T:9},{no:11,name:"entrypoint",kind:"scalar",T:9},{no:12,name:"public_namespace",kind:"scalar",T:9},{no:13,name:"first_run",kind:"scalar",T:9,opt:!0},{no:14,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:15,name:"apps",kind:"message",T:sn,repeated:!0}]),uv=s.makeMessageType("viam.app.v1.VersionHistory",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"files",kind:"message",T:Qo,repeated:!0},{no:3,name:"models",kind:"message",T:on,repeated:!0},{no:4,name:"entrypoint",kind:"scalar",T:9},{no:5,name:"first_run",kind:"scalar",T:9,opt:!0},{no:6,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:7,name:"apps",kind:"message",T:sn,repeated:!0}]),Qo=s.makeMessageType("viam.app.v1.Uploads",()=>[{no:1,name:"platform",kind:"scalar",T:9},{no:2,name:"uploaded_at",kind:"message",T:S}]),gv=s.makeMessageType("viam.app.v1.ListModulesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9,opt:!0},{no:2,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0}]),Tv=s.makeMessageType("viam.app.v1.ListModulesResponse",()=>[{no:1,name:"modules",kind:"message",T:Xo,repeated:!0}]),kv=s.makeMessageType("viam.app.v1.GetUserIDByEmailRequest",()=>[{no:1,name:"email",kind:"scalar",T:9}]),yv=s.makeMessageType("viam.app.v1.GetUserIDByEmailResponse",()=>[{no:1,name:"user_id",kind:"scalar",T:9}]),vv=s.makeMessageType("viam.app.v1.ListOrganizationsByUserRequest",()=>[{no:1,name:"user_id",kind:"scalar",T:9}]),Zo=s.makeMessageType("viam.app.v1.OrgDetails",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"org_name",kind:"scalar",T:9},{no:3,name:"org_cid",kind:"scalar",T:9,opt:!0},{no:4,name:"public_namespace",kind:"scalar",T:9,opt:!0},{no:5,name:"billing_tier",kind:"scalar",T:9,opt:!0}]),hv=s.makeMessageType("viam.app.v1.ListOrganizationsByUserResponse",()=>[{no:1,name:"orgs",kind:"message",T:Zo,repeated:!0}]),fv=s.makeMessageType("viam.app.v1.SearchOrganizationsRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9,opt:!0},{no:2,name:"org_name",kind:"scalar",T:9,opt:!0},{no:3,name:"cid",kind:"scalar",T:9,opt:!0},{no:4,name:"public_namespace",kind:"scalar",T:9,opt:!0}]),Rv=s.makeMessageType("viam.app.v1.SearchOrganizationsResponse",()=>[{no:1,name:"organizations",kind:"message",T:Zo,repeated:!0}]),_v=s.makeMessageType("viam.app.v1.CreateKeyRequest",()=>[{no:1,name:"authorizations",kind:"message",T:Q,repeated:!0},{no:2,name:"name",kind:"scalar",T:9}]),Sv=s.makeMessageType("viam.app.v1.CreateKeyResponse",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"id",kind:"scalar",T:9}]),Iv=s.makeMessageType("viam.app.v1.DeleteKeyRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ev=s.makeMessageType("viam.app.v1.DeleteKeyResponse",[]),Mv=s.makeMessageType("viam.app.v1.RenameKeyRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),bv=s.makeMessageType("viam.app.v1.RenameKeyResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Ov=s.makeMessageType("viam.app.v1.AuthorizationDetails",()=>[{no:1,name:"authorization_type",kind:"scalar",T:9},{no:2,name:"authorization_id",kind:"scalar",T:9},{no:3,name:"resource_type",kind:"scalar",T:9},{no:4,name:"resource_id",kind:"scalar",T:9},{no:5,name:"org_id",kind:"scalar",T:9}]),ei=s.makeMessageType("viam.app.v1.APIKeyWithAuthorizations",()=>[{no:1,name:"api_key",kind:"message",T:hk},{no:2,name:"authorizations",kind:"message",T:Ov,repeated:!0}]),wv=s.makeMessageType("viam.app.v1.ListKeysRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Cv=s.makeMessageType("viam.app.v1.ListKeysResponse",()=>[{no:1,name:"api_keys",kind:"message",T:ei,repeated:!0}]),Nv=s.makeMessageType("viam.app.v1.RotateKeyRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Pv=s.makeMessageType("viam.app.v1.RotateKeyResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]),Dv=s.makeMessageType("viam.app.v1.CreateKeyFromExistingKeyAuthorizationsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Av=s.makeMessageType("viam.app.v1.CreateKeyFromExistingKeyAuthorizationsResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]),Uv=s.makeMessageType("viam.app.v1.GetAppContentRequest",()=>[{no:1,name:"public_namespace",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),qv=s.makeMessageType("viam.app.v1.GetAppContentResponse",()=>[{no:1,name:"blob_path",kind:"scalar",T:9},{no:2,name:"entrypoint",kind:"scalar",T:9},{no:3,name:"app_type",kind:"enum",T:s.getEnumType(_g)},{no:4,name:"public",kind:"scalar",T:8}]),Lv=s.makeMessageType("viam.app.v1.OrganizationSetLogoRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"logo",kind:"scalar",T:12}]),Gv=s.makeMessageType("viam.app.v1.OrganizationSetLogoResponse",[]),Bv=s.makeMessageType("viam.app.v1.OrganizationGetLogoRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Fv=s.makeMessageType("viam.app.v1.OrganizationGetLogoResponse",()=>[{no:1,name:"url",kind:"scalar",T:9}]),xv=s.makeMessageType("viam.app.v1.EnableAuthServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Jv=s.makeMessageType("viam.app.v1.EnableAuthServiceResponse",[]),zv=s.makeMessageType("viam.app.v1.DisableAuthServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Vv=s.makeMessageType("viam.app.v1.DisableAuthServiceResponse",[]),$v=s.makeMessageType("viam.app.v1.CreateOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_name",kind:"scalar",T:9},{no:3,name:"oauth_config",kind:"message",T:ja}]),Yv=s.makeMessageType("viam.app.v1.CreateOAuthAppResponse",()=>[{no:1,name:"client_id",kind:"scalar",T:9},{no:2,name:"client_secret",kind:"scalar",T:9}]),Wv=s.makeMessageType("viam.app.v1.ReadOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_id",kind:"scalar",T:9}]),jv=s.makeMessageType("viam.app.v1.ReadOAuthAppResponse",()=>[{no:1,name:"client_name",kind:"scalar",T:9},{no:2,name:"client_secret",kind:"scalar",T:9},{no:3,name:"oauth_config",kind:"message",T:ja}]),Hv=s.makeMessageType("viam.app.v1.UpdateOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_id",kind:"scalar",T:9},{no:3,name:"client_name",kind:"scalar",T:9},{no:4,name:"oauth_config",kind:"message",T:ja}]),Kv=s.makeMessageType("viam.app.v1.UpdateOAuthAppResponse",[]),Xv=s.makeMessageType("viam.app.v1.DeleteOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_id",kind:"scalar",T:9}]),Qv=s.makeMessageType("viam.app.v1.DeleteOAuthAppResponse",[]),Zv=s.makeMessageType("viam.app.v1.ListOAuthAppsRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),eh=s.makeMessageType("viam.app.v1.ListOAuthAppsResponse",()=>[{no:1,name:"client_ids",kind:"scalar",T:9,repeated:!0}]),ja=s.makeMessageType("viam.app.v1.OAuthConfig",()=>[{no:1,name:"client_authentication",kind:"enum",T:s.getEnumType(Sg)},{no:2,name:"pkce",kind:"enum",T:s.getEnumType(Ig)},{no:3,name:"url_validation",kind:"enum",T:s.getEnumType(Eg)},{no:4,name:"origin_uris",kind:"scalar",T:9,repeated:!0},{no:5,name:"redirect_uris",kind:"scalar",T:9,repeated:!0},{no:6,name:"logout_uri",kind:"scalar",T:9},{no:7,name:"enabled_grants",kind:"enum",T:s.getEnumType(Mg),repeated:!0}]),nh=s.makeMessageType("viam.app.v1.GetAppBrandingRequest",()=>[{no:1,name:"public_namespace",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),ah=s.makeMessageType("viam.app.v1.TextOverrides",()=>[{no:1,name:"fields",kind:"map",K:9,V:{kind:"scalar",T:9}}]),th=s.makeMessageType("viam.app.v1.GetAppBrandingResponse",()=>[{no:1,name:"logo_path",kind:"scalar",T:9,opt:!0},{no:2,name:"text_customizations",kind:"map",K:9,V:{kind:"message",T:ah}},{no:3,name:"fragment_ids",kind:"scalar",T:9,repeated:!0}]),sh=s.makeMessageType("viam.app.v1.AppCustomizations",()=>[{no:1,name:"machine_picker",kind:"message",T:oh}]),oh=s.makeMessageType("viam.app.v1.MachinePickerCustomizations",()=>[{no:1,name:"heading",kind:"scalar",T:9,opt:!0},{no:2,name:"subheading",kind:"scalar",T:9,opt:!0}]),bS=Object.freeze(Object.defineProperty({__proto__:null,APIKey:hk,APIKeyWithAuthorizations:ei,AddRoleRequest:Ey,AddRoleResponse:My,AdditionalFragment:jo,App:sn,AppCustomizations:sh,AppType:_g,AuthenticationType:hg,AuthenticatorInfo:zo,Authorization:Q,AuthorizationDetails:Ov,AuthorizedPermissions:Ko,BillingAddress:za,ChangeRoleRequest:wy,ChangeRoleResponse:Cy,CheckPermissionsRequest:Dy,CheckPermissionsResponse:Ay,ClientAuthentication:Sg,CreateFragmentRequest:Ck,CreateFragmentResponse:Nk,CreateKeyFromExistingKeyAuthorizationsRequest:Dv,CreateKeyFromExistingKeyAuthorizationsResponse:Av,CreateKeyRequest:_v,CreateKeyResponse:Sv,CreateLocationRequest:fT,CreateLocationResponse:RT,CreateLocationSecretRequest:FT,CreateLocationSecretResponse:xT,CreateModuleRequest:nv,CreateModuleResponse:av,CreateOAuthAppRequest:$v,CreateOAuthAppResponse:Yv,CreateOrganizationInviteRequest:Hg,CreateOrganizationInviteResponse:Kg,CreateOrganizationRequest:Ng,CreateOrganizationResponse:Pg,CreateRegistryItemRequest:zy,CreateRegistryItemResponse:Vy,CreateRobotPartSecretRequest:Ry,CreateRobotPartSecretResponse:_y,DeleteFragmentRequest:Ak,DeleteFragmentResponse:Uk,DeleteFragmentTagRequest:Jk,DeleteFragmentTagResponse:zk,DeleteKeyRequest:Iv,DeleteKeyResponse:Ev,DeleteLocationRequest:MT,DeleteLocationResponse:bT,DeleteLocationSecretRequest:JT,DeleteLocationSecretResponse:zT,DeleteOAuthAppRequest:Xv,DeleteOAuthAppResponse:Qv,DeleteOrganizationInviteRequest:Zg,DeleteOrganizationInviteResponse:eT,DeleteOrganizationMemberRequest:tT,DeleteOrganizationMemberResponse:sT,DeleteOrganizationRequest:xg,DeleteOrganizationResponse:Jg,DeleteRegistryItemRequest:Hy,DeleteRegistryItemResponse:Ky,DeleteRobotPartRequest:uk,DeleteRobotPartResponse:Rk,DeleteRobotPartSecretRequest:Sy,DeleteRobotPartSecretResponse:Iy,DeleteRobotRequest:ly,DeleteRobotResponse:py,DisableAuthServiceRequest:zv,DisableAuthServiceResponse:Vv,DisableBillingServiceRequest:lT,DisableBillingServiceResponse:pT,EnableAuthServiceRequest:xv,EnableAuthServiceResponse:Jv,EnableBillingServiceRequest:oT,EnableBillingServiceResponse:iT,EnabledGrant:Mg,Fragment:He,FragmentError:Ik,FragmentErrorType:fg,FragmentHistoryEntry:_k,FragmentImport:Ek,FragmentImportList:Vo,FragmentRevision:Sk,FragmentSummary:ey,FragmentTag:$a,FragmentUsage:Ya,FragmentVisibility:Bn,GetAppBrandingRequest:nh,GetAppBrandingResponse:th,GetAppContentRequest:Uv,GetAppContentResponse:qv,GetBillingServiceConfigRequest:cT,GetBillingServiceConfigResponse:dT,GetFragmentHistoryRequest:qk,GetFragmentHistoryResponse:Lk,GetFragmentRequest:Ok,GetFragmentResponse:wk,GetFragmentUsageRequest:Gk,GetFragmentUsageResponse:Bk,GetLocationMetadataRequest:OT,GetLocationMetadataResponse:wT,GetLocationRequest:_T,GetLocationResponse:ST,GetModuleRequest:lv,GetModuleResponse:pv,GetOrganizationMetadataRequest:zg,GetOrganizationMetadataResponse:Vg,GetOrganizationNamespaceAvailabilityRequest:Ug,GetOrganizationNamespaceAvailabilityResponse:qg,GetOrganizationRequest:Dg,GetOrganizationResponse:Ag,GetOrganizationsWithAccessToLocationRequest:PT,GetOrganizationsWithAccessToLocationResponse:DT,GetRegistryItemRequest:xy,GetRegistryItemResponse:Jy,GetRobotAPIKeysRequest:vk,GetRobotAPIKeysResponse:fk,GetRobotMetadataRequest:uy,GetRobotMetadataResponse:gy,GetRobotPartByNameAndLocationRequest:nk,GetRobotPartByNameAndLocationResponse:ak,GetRobotPartHistoryRequest:rk,GetRobotPartHistoryResponse:mk,GetRobotPartLogsRequest:tk,GetRobotPartLogsResponse:sk,GetRobotPartMetadataRequest:gk,GetRobotPartMetadataResponse:Tk,GetRobotPartRequest:ZT,GetRobotPartResponse:ek,GetRobotPartsRequest:XT,GetRobotPartsResponse:QT,GetRobotRequest:YT,GetRobotResponse:KT,GetRoverRentalRobotsRequest:WT,GetRoverRentalRobotsResponse:HT,GetUserIDByEmailRequest:kv,GetUserIDByEmailResponse:yv,ListAuthorizationsRequest:Ny,ListAuthorizationsResponse:Py,ListFragmentsRequest:Mk,ListFragmentsResponse:bk,ListKeysRequest:wv,ListKeysResponse:Cv,ListLocationsRequest:AT,ListLocationsResponse:BT,ListMachineFragmentsRequest:Hk,ListMachineFragmentsResponse:Kk,ListMachineSummariesRequest:Ho,ListMachineSummariesResponse:Xk,ListModulesRequest:gv,ListModulesResponse:Tv,ListNestedFragmentsRequest:Wk,ListNestedFragmentsResponse:jk,ListOAuthAppsRequest:Zv,ListOAuthAppsResponse:eh,ListOrganizationMembersRequest:Wg,ListOrganizationMembersResponse:jg,ListOrganizationsByUserRequest:vv,ListOrganizationsByUserResponse:hv,ListOrganizationsRequest:Og,ListOrganizationsResponse:Cg,ListRegistryItemsRequest:Wy,ListRegistryItemsResponse:jy,ListRobotsForLocationsRequest:$k,ListRobotsForLocationsResponse:oy,ListRobotsForOrgRequest:Yk,ListRobotsForOrgResponse:iy,ListRobotsRequest:Vk,ListRobotsResponse:sy,Location:xn,LocationAuth:Va,LocationAuthRequest:VT,LocationAuthResponse:$T,LocationOrganization:yT,LocationSummary:Qk,MLModelMetadata:Gy,MLModelVersion:Ly,MLTrainingMetadata:Fy,MLTrainingVersion:By,MachinePickerCustomizations:oh,MachineSummary:Zk,MarkPartAsMainRequest:yy,MarkPartAsMainResponse:vy,MarkPartForRestartRequest:hy,MarkPartForRestartResponse:fy,Model:on,Module:Xo,ModuleFileInfo:mv,ModuleLanguage:Ja,ModuleMetadata:qy,ModuleSourceType:xa,ModuleVersion:Uy,NewRobotPartRequest:lk,NewRobotPartResponse:pk,NewRobotRequest:ry,NewRobotResponse:my,OAuthConfig:ja,OnlineState:Fa,OrgDetails:Zo,Organization:yn,OrganizationGetLogoRequest:Bv,OrganizationGetLogoResponse:Fv,OrganizationGetSupportEmailRequest:TT,OrganizationGetSupportEmailResponse:kT,OrganizationIdentity:$o,OrganizationInvite:Fn,OrganizationMember:wg,OrganizationSetLogoRequest:Lv,OrganizationSetLogoResponse:Gv,OrganizationSetSupportEmailRequest:uT,OrganizationSetSupportEmailResponse:gT,PKCE:Ig,PartSummary:ty,ReadOAuthAppRequest:Wv,ReadOAuthAppResponse:jv,RegistryItem:Wa,RegistryItemStatus:Rg,RemoveRoleRequest:by,RemoveRoleResponse:Oy,RenameKeyRequest:Mv,RenameKeyResponse:bv,RenameRegistryItemRequest:Xy,RenameRegistryItemResponse:Qy,ResendOrganizationInviteRequest:nT,ResendOrganizationInviteResponse:aT,ResolvedFragment:Wo,Robot:kn,RobotPart:tn,RobotPartHistoryEntry:bg,RotateKeyRequest:Nv,RotateKeyResponse:Pv,RoverRentalRobot:jT,SearchOrganizationsRequest:fv,SearchOrganizationsResponse:Rv,SetFragmentTagRequest:Fk,SetFragmentTagResponse:xk,ShareLocationRequest:UT,ShareLocationResponse:qT,SharedSecret:Yo,SharedSecret_State:hT,StorageConfig:vT,TailRobotPartLogsRequest:ok,TailRobotPartLogsResponse:ik,TextOverrides:ah,TransferRegistryItemRequest:Zy,TransferRegistryItemResponse:ev,URLValidation:Eg,UnshareLocationRequest:LT,UnshareLocationResponse:GT,UpdateBillingServiceRequest:rT,UpdateBillingServiceResponse:mT,UpdateFragmentRequest:Pk,UpdateFragmentResponse:Dk,UpdateLocationMetadataRequest:CT,UpdateLocationMetadataResponse:NT,UpdateLocationRequest:IT,UpdateLocationResponse:ET,UpdateMLModelMetadata:iv,UpdateMLTrainingMetadata:rv,UpdateModuleMetadata:ov,UpdateModuleRequest:tv,UpdateModuleResponse:sv,UpdateOAuthAppRequest:Hv,UpdateOAuthAppResponse:Kv,UpdateOrganizationInviteAuthorizationsRequest:Xg,UpdateOrganizationInviteAuthorizationsResponse:Qg,UpdateOrganizationMetadataRequest:$g,UpdateOrganizationMetadataResponse:Yg,UpdateOrganizationNamespaceRequest:Bg,UpdateOrganizationNamespaceResponse:Fg,UpdateOrganizationRequest:Lg,UpdateOrganizationResponse:Gg,UpdateRegistryItemRequest:$y,UpdateRegistryItemResponse:Yy,UpdateRobotMetadataRequest:Ty,UpdateRobotMetadataResponse:ky,UpdateRobotPartMetadataRequest:kk,UpdateRobotPartMetadataResponse:yk,UpdateRobotPartRequest:ck,UpdateRobotPartResponse:dk,UpdateRobotRequest:cy,UpdateRobotResponse:dy,UploadModuleFileRequest:cv,UploadModuleFileResponse:dv,Uploads:Qo,VersionHistory:uv,ViamAgentVersion:ay,ViamServerVersion:ny,Visibility:Tn},Symbol.toStringTag,{value:"Module"})),OS={typeName:"viam.app.v1.AppService",methods:{getUserIDByEmail:{name:"GetUserIDByEmail",I:kv,O:yv,kind:m.Unary},createOrganization:{name:"CreateOrganization",I:Ng,O:Pg,kind:m.Unary},listOrganizations:{name:"ListOrganizations",I:Og,O:Cg,kind:m.Unary},getOrganizationsWithAccessToLocation:{name:"GetOrganizationsWithAccessToLocation",I:PT,O:DT,kind:m.Unary},listOrganizationsByUser:{name:"ListOrganizationsByUser",I:vv,O:hv,kind:m.Unary},searchOrganizations:{name:"SearchOrganizations",I:fv,O:Rv,kind:m.Unary},getOrganization:{name:"GetOrganization",I:Dg,O:Ag,kind:m.Unary},getOrganizationNamespaceAvailability:{name:"GetOrganizationNamespaceAvailability",I:Ug,O:qg,kind:m.Unary},updateOrganization:{name:"UpdateOrganization",I:Lg,O:Gg,kind:m.Unary},updateOrganizationNamespace:{name:"UpdateOrganizationNamespace",I:Bg,O:Fg,kind:m.Unary},deleteOrganization:{name:"DeleteOrganization",I:xg,O:Jg,kind:m.Unary},getOrganizationMetadata:{name:"GetOrganizationMetadata",I:zg,O:Vg,kind:m.Unary},updateOrganizationMetadata:{name:"UpdateOrganizationMetadata",I:$g,O:Yg,kind:m.Unary},listOrganizationMembers:{name:"ListOrganizationMembers",I:Wg,O:jg,kind:m.Unary},createOrganizationInvite:{name:"CreateOrganizationInvite",I:Hg,O:Kg,kind:m.Unary},updateOrganizationInviteAuthorizations:{name:"UpdateOrganizationInviteAuthorizations",I:Xg,O:Qg,kind:m.Unary},deleteOrganizationMember:{name:"DeleteOrganizationMember",I:tT,O:sT,kind:m.Unary},deleteOrganizationInvite:{name:"DeleteOrganizationInvite",I:Zg,O:eT,kind:m.Unary},resendOrganizationInvite:{name:"ResendOrganizationInvite",I:nT,O:aT,kind:m.Unary},enableBillingService:{name:"EnableBillingService",I:oT,O:iT,kind:m.Unary},disableBillingService:{name:"DisableBillingService",I:lT,O:pT,kind:m.Unary},updateBillingService:{name:"UpdateBillingService",I:rT,O:mT,kind:m.Unary},getBillingServiceConfig:{name:"GetBillingServiceConfig",I:cT,O:dT,kind:m.Unary},organizationSetSupportEmail:{name:"OrganizationSetSupportEmail",I:uT,O:gT,kind:m.Unary},organizationGetSupportEmail:{name:"OrganizationGetSupportEmail",I:TT,O:kT,kind:m.Unary},organizationSetLogo:{name:"OrganizationSetLogo",I:Lv,O:Gv,kind:m.Unary},organizationGetLogo:{name:"OrganizationGetLogo",I:Bv,O:Fv,kind:m.Unary},enableAuthService:{name:"EnableAuthService",I:xv,O:Jv,kind:m.Unary},disableAuthService:{name:"DisableAuthService",I:zv,O:Vv,kind:m.Unary},createOAuthApp:{name:"CreateOAuthApp",I:$v,O:Yv,kind:m.Unary},readOAuthApp:{name:"ReadOAuthApp",I:Wv,O:jv,kind:m.Unary},updateOAuthApp:{name:"UpdateOAuthApp",I:Hv,O:Kv,kind:m.Unary},deleteOAuthApp:{name:"DeleteOAuthApp",I:Xv,O:Qv,kind:m.Unary},listOAuthApps:{name:"ListOAuthApps",I:Zv,O:eh,kind:m.Unary},createLocation:{name:"CreateLocation",I:fT,O:RT,kind:m.Unary},getLocation:{name:"GetLocation",I:_T,O:ST,kind:m.Unary},updateLocation:{name:"UpdateLocation",I:IT,O:ET,kind:m.Unary},deleteLocation:{name:"DeleteLocation",I:MT,O:bT,kind:m.Unary},getLocationMetadata:{name:"GetLocationMetadata",I:OT,O:wT,kind:m.Unary},updateLocationMetadata:{name:"UpdateLocationMetadata",I:CT,O:NT,kind:m.Unary},listLocations:{name:"ListLocations",I:AT,O:BT,kind:m.Unary},shareLocation:{name:"ShareLocation",I:UT,O:qT,kind:m.Unary},unshareLocation:{name:"UnshareLocation",I:LT,O:GT,kind:m.Unary},locationAuth:{name:"LocationAuth",I:VT,O:$T,kind:m.Unary},createLocationSecret:{name:"CreateLocationSecret",I:FT,O:xT,kind:m.Unary},deleteLocationSecret:{name:"DeleteLocationSecret",I:JT,O:zT,kind:m.Unary},getRobot:{name:"GetRobot",I:YT,O:KT,kind:m.Unary},getRobotMetadata:{name:"GetRobotMetadata",I:uy,O:gy,kind:m.Unary},updateRobotMetadata:{name:"UpdateRobotMetadata",I:Ty,O:ky,kind:m.Unary},getRoverRentalRobots:{name:"GetRoverRentalRobots",I:WT,O:HT,kind:m.Unary},getRobotParts:{name:"GetRobotParts",I:XT,O:QT,kind:m.Unary},getRobotPart:{name:"GetRobotPart",I:ZT,O:ek,kind:m.Unary},getRobotPartByNameAndLocation:{name:"GetRobotPartByNameAndLocation",I:nk,O:ak,kind:m.Unary},getRobotPartLogs:{name:"GetRobotPartLogs",I:tk,O:sk,kind:m.Unary},tailRobotPartLogs:{name:"TailRobotPartLogs",I:ok,O:ik,kind:m.ServerStreaming},getRobotPartHistory:{name:"GetRobotPartHistory",I:rk,O:mk,kind:m.Unary},updateRobotPart:{name:"UpdateRobotPart",I:ck,O:dk,kind:m.Unary},newRobotPart:{name:"NewRobotPart",I:lk,O:pk,kind:m.Unary},deleteRobotPart:{name:"DeleteRobotPart",I:uk,O:Rk,kind:m.Unary},getRobotPartMetadata:{name:"GetRobotPartMetadata",I:gk,O:Tk,kind:m.Unary},updateRobotPartMetadata:{name:"UpdateRobotPartMetadata",I:kk,O:yk,kind:m.Unary},getRobotAPIKeys:{name:"GetRobotAPIKeys",I:vk,O:fk,kind:m.Unary},markPartAsMain:{name:"MarkPartAsMain",I:yy,O:vy,kind:m.Unary},markPartForRestart:{name:"MarkPartForRestart",I:hy,O:fy,kind:m.Unary},createRobotPartSecret:{name:"CreateRobotPartSecret",I:Ry,O:_y,kind:m.Unary},deleteRobotPartSecret:{name:"DeleteRobotPartSecret",I:Sy,O:Iy,kind:m.Unary},listRobots:{name:"ListRobots",I:Vk,O:sy,kind:m.Unary},listRobotsForLocations:{name:"ListRobotsForLocations",I:$k,O:oy,kind:m.Unary},listRobotsForOrg:{name:"ListRobotsForOrg",I:Yk,O:iy,kind:m.Unary},newRobot:{name:"NewRobot",I:ry,O:my,kind:m.Unary},updateRobot:{name:"UpdateRobot",I:cy,O:dy,kind:m.Unary},deleteRobot:{name:"DeleteRobot",I:ly,O:py,kind:m.Unary},listFragments:{name:"ListFragments",I:Mk,O:bk,kind:m.Unary},getFragment:{name:"GetFragment",I:Ok,O:wk,kind:m.Unary},createFragment:{name:"CreateFragment",I:Ck,O:Nk,kind:m.Unary},updateFragment:{name:"UpdateFragment",I:Pk,O:Dk,kind:m.Unary},deleteFragment:{name:"DeleteFragment",I:Ak,O:Uk,kind:m.Unary},listNestedFragments:{name:"ListNestedFragments",I:Wk,O:jk,kind:m.Unary},listMachineFragments:{name:"ListMachineFragments",I:Hk,O:Kk,kind:m.Unary},listMachineSummaries:{name:"ListMachineSummaries",I:Ho,O:Xk,kind:m.Unary},getFragmentHistory:{name:"GetFragmentHistory",I:qk,O:Lk,kind:m.Unary},getFragmentUsage:{name:"GetFragmentUsage",I:Gk,O:Bk,kind:m.Unary},setFragmentTag:{name:"SetFragmentTag",I:Fk,O:xk,kind:m.Unary},deleteFragmentTag:{name:"DeleteFragmentTag",I:Jk,O:zk,kind:m.Unary},addRole:{name:"AddRole",I:Ey,O:My,kind:m.Unary},removeRole:{name:"RemoveRole",I:by,O:Oy,kind:m.Unary},changeRole:{name:"ChangeRole",I:wy,O:Cy,kind:m.Unary},listAuthorizations:{name:"ListAuthorizations",I:Ny,O:Py,kind:m.Unary},checkPermissions:{name:"CheckPermissions",I:Dy,O:Ay,kind:m.Unary},getRegistryItem:{name:"GetRegistryItem",I:xy,O:Jy,kind:m.Unary},createRegistryItem:{name:"CreateRegistryItem",I:zy,O:Vy,kind:m.Unary},updateRegistryItem:{name:"UpdateRegistryItem",I:$y,O:Yy,kind:m.Unary},listRegistryItems:{name:"ListRegistryItems",I:Wy,O:jy,kind:m.Unary},deleteRegistryItem:{name:"DeleteRegistryItem",I:Hy,O:Ky,kind:m.Unary},renameRegistryItem:{name:"RenameRegistryItem",I:Xy,O:Qy,kind:m.Unary},transferRegistryItem:{name:"TransferRegistryItem",I:Zy,O:ev,kind:m.Unary},createModule:{name:"CreateModule",I:nv,O:av,kind:m.Unary},updateModule:{name:"UpdateModule",I:tv,O:sv,kind:m.Unary},uploadModuleFile:{name:"UploadModuleFile",I:cv,O:dv,kind:m.ClientStreaming},getModule:{name:"GetModule",I:lv,O:pv,kind:m.Unary},listModules:{name:"ListModules",I:gv,O:Tv,kind:m.Unary},createKey:{name:"CreateKey",I:_v,O:Sv,kind:m.Unary},deleteKey:{name:"DeleteKey",I:Iv,O:Ev,kind:m.Unary},listKeys:{name:"ListKeys",I:wv,O:Cv,kind:m.Unary},renameKey:{name:"RenameKey",I:Mv,O:bv,kind:m.Unary},rotateKey:{name:"RotateKey",I:Nv,O:Pv,kind:m.Unary},createKeyFromExistingKeyAuthorizations:{name:"CreateKeyFromExistingKeyAuthorizations",I:Dv,O:Av,kind:m.Unary},getAppContent:{name:"GetAppContent",I:Uv,O:qv,kind:m.Unary},getAppBranding:{name:"GetAppBranding",I:nh,O:th,kind:m.Unary}}},ih=(t,e,n,a,o,i)=>new Q({authorizationType:"role",identityId:e,identityType:o,authorizationId:`${a}_${n}`,resourceType:a,organizationId:t,resourceId:i});class wS{client;constructor(e){this.client=W(OS,e)}async getUserIDByEmail(e){return(await this.client.getUserIDByEmail({email:e})).userId}async createOrganization(e){return(await this.client.createOrganization({name:e})).organization}async listOrganizations(){return(await this.client.listOrganizations({})).organizations}async getOrganizationsWithAccessToLocation(e){return(await this.client.getOrganizationsWithAccessToLocation({locationId:e})).organizationIdentities}async listOrganizationsByUser(e){return(await this.client.listOrganizationsByUser({userId:e})).orgs}async getOrganization(e){return(await this.client.getOrganization({organizationId:e})).organization}async getOrganizationNamespaceAvailability(e){return(await this.client.getOrganizationNamespaceAvailability({publicNamespace:e})).available}async updateOrganization(e,n,a,o,i,r){return(await this.client.updateOrganization({organizationId:e,name:n,publicNamespace:a,region:o,cid:i,defaultFragments:r})).organization}async deleteOrganization(e){await this.client.deleteOrganization({organizationId:e})}async listOrganizationMembers(e){return this.client.listOrganizationMembers({organizationId:e})}async createOrganizationInvite(e,n,a,o=!0){return(await this.client.createOrganizationInvite({organizationId:e,email:n,authorizations:a,sendEmailInvite:o})).invite}async updateOrganizationInviteAuthorizations(e,n,a,o){return(await this.client.updateOrganizationInviteAuthorizations({organizationId:e,email:n,addAuthorizations:a,removeAuthorizations:o})).invite}async deleteOrganizationMember(e,n){await this.client.deleteOrganizationMember({organizationId:e,userId:n})}async deleteOrganizationInvite(e,n){await this.client.deleteOrganizationInvite({organizationId:e,email:n})}async resendOrganizationInvite(e,n){return(await this.client.resendOrganizationInvite({organizationId:e,email:n})).invite}async createLocation(e,n,a){return(await this.client.createLocation({organizationId:e,name:n,parentLocationId:a})).location}async getLocation(e){return(await this.client.getLocation({locationId:e})).location}async updateLocation(e,n,a,o){return(await this.client.updateLocation({locationId:e,name:n,parentLocationId:a,region:o})).location}async deleteLocation(e){await this.client.deleteLocation({locationId:e})}async listLocations(e){return(await this.client.listLocations({organizationId:e})).locations}async shareLocation(e,n){await this.client.shareLocation({organizationId:e,locationId:n})}async unshareLocation(e,n){await this.client.unshareLocation({organizationId:e,locationId:n})}async locationAuth(e){return(await this.client.locationAuth({locationId:e})).auth}async createLocationSecret(e){return(await this.client.createLocationSecret({locationId:e})).auth}async deleteLocationSecret(e,n){await this.client.deleteLocationSecret({locationId:e,secretId:n})}async getRobot(e){return(await this.client.getRobot({id:e})).robot}async getRoverRentalRobots(e){return(await this.client.getRoverRentalRobots({orgId:e})).robots}async getRobotParts(e){return(await this.client.getRobotParts({robotId:e})).parts}async getRobotPart(e){return this.client.getRobotPart({id:e})}async getRobotPartByNameAndLocation(e,n){return this.client.getRobotPartByNameAndLocation({name:e,locationId:n})}async getRobotPartLogs(e,n,a,o,i,r=""){return this.client.getRobotPartLogs({id:e,filter:n,levels:a,pageToken:r,start:o?S.fromDate(o):void 0,end:i?S.fromDate(i):void 0})}async tailRobotPartLogs(e,n,a,o=!0){const i=this.client.tailRobotPartLogs({id:e,errorsOnly:o,filter:a});for await(const r of i)for(const c of r.logs)n.push(c)}async getRobotPartHistory(e){return(await this.client.getRobotPartHistory({id:e})).history}async updateRobotPart(e,n,a){return(await this.client.updateRobotPart({id:e,name:n,robotConfig:a})).part}async newRobotPart(e,n){return(await this.client.newRobotPart({robotId:e,partName:n})).partId}async deleteRobotPart(e){await this.client.deleteRobotPart({partId:e})}async getRobotAPIKeys(e){return(await this.client.getRobotAPIKeys({robotId:e})).apiKeys}async markPartAsMain(e){await this.client.markPartAsMain({partId:e})}async markPartForRestart(e){await this.client.markPartForRestart({partId:e})}async createRobotPartSecret(e){return(await this.client.createRobotPartSecret({partId:e})).part}async deleteRobotPartSecret(e,n){await this.client.deleteRobotPartSecret({partId:e,secretId:n})}async listRobots(e){return(await this.client.listRobots({locationId:e})).robots}async newRobot(e,n){return(await this.client.newRobot({name:n,location:e})).id}async updateRobot(e,n,a){return(await this.client.updateRobot({id:e,location:n,name:a})).robot}async deleteRobot(e){await this.client.deleteRobot({id:e})}async listFragments(e,n=!0,a=[]){return(await this.client.listFragments({organizationId:e,showPublic:n,fragmentVisibility:a})).fragments}async getFragment(e){return(await this.client.getFragment({id:e})).fragment}async createFragment(e,n,a){return(await this.client.createFragment({organizationId:e,name:n,config:a})).fragment}async updateFragment(e,n,a,o,i){return(await this.client.updateFragment({id:e,name:n,config:a,public:o,visibility:i})).fragment}async deleteFragment(e){await this.client.deleteFragment({id:e})}async listMachineFragments(e,n){return(await this.client.listMachineFragments({machineId:e,additionalFragmentIds:n})).fragments}async addRole(e,n,a,o,i){await this.client.addRole({authorization:ih(e,n,a,o,"",i)})}async removeRole(e,n,a,o,i){await this.client.removeRole({authorization:ih(e,n,a,o,"",i)})}async changeRole(e,n){await this.client.changeRole({oldAuthorization:e,newAuthorization:n})}async listAuthorizations(e,n){return(await this.client.listAuthorizations({organizationId:e,resourceIds:n})).authorizations}async checkPermissions(e){return(await this.client.checkPermissions({permissions:e})).authorizedPermissions}async getRegistryItem(e){return(await this.client.getRegistryItem({itemId:e})).item}async createRegistryItem(e,n,a){await this.client.createRegistryItem({organizationId:e,name:n,type:a})}async updateRegistryItem(e,n,a,o){await this.client.updateRegistryItem({itemId:e,type:n,description:a,visibility:o})}async listRegistryItems(e,n,a,o,i,r,c){const l={organizationId:e,types:n,visibilities:a,platforms:o,statuses:i,searchTerm:r,pageToken:c};return(await this.client.listRegistryItems(l)).items}async deleteRegistryItem(e){await this.client.deleteRegistryItem({itemId:e})}async createModule(e,n){return this.client.createModule({organizationId:e,name:n})}async updateModule(e,n,a,o,i,r){return(await this.client.updateModule({moduleId:e,visibility:n,url:a,description:o,models:i,entrypoint:r})).url}async getModule(e){return(await this.client.getModule({moduleId:e})).module}async listModules(e){return(await this.client.listModules({organizationId:e})).modules}async createKey(e,n){return this.client.createKey({name:n,authorizations:e})}async deleteKey(e){return this.client.deleteKey({id:e})}async listKeys(e){return(await this.client.listKeys({orgId:e})).apiKeys}async rotateKey(e){return this.client.rotateKey({id:e})}async createKeyFromExistingKeyAuthorizations(e){return this.client.createKeyFromExistingKeyAuthorizations({id:e})}async getAppContent(e,n){return this.client.getAppContent({publicNamespace:e,name:n})}async getOrganizationMetadata(e){return(await this.client.getOrganizationMetadata({organizationId:e})).toJson().data??{}}async updateOrganizationMetadata(e,n){await this.client.updateOrganizationMetadata({organizationId:e,data:p.fromJson(n)})}async getLocationMetadata(e){return(await this.client.getLocationMetadata({locationId:e})).toJson().data??{}}async updateLocationMetadata(e,n){await this.client.updateLocationMetadata({locationId:e,data:p.fromJson(n)})}async getRobotMetadata(e){return(await this.client.getRobotMetadata({id:e})).toJson().data??{}}async updateRobotMetadata(e,n){await this.client.updateRobotMetadata({id:e,data:p.fromJson(n)})}async getRobotPartMetadata(e){return(await this.client.getRobotPartMetadata({id:e})).toJson().data??{}}async updateRobotPartMetadata(e,n){await this.client.updateRobotPartMetadata({id:e,data:p.fromJson(n)})}async getAppBranding(e,n){return this.client.getAppBranding({publicNamespace:e,name:n})}async listMachineSummaries(e,n,a,o){const i=new Ho({organizationId:e,fragmentIds:n,locationIds:a,limit:o});return(await this.client.listMachineSummaries(i)).locationSummaries}}const rh=s.makeEnum("viam.app.v1.PaymentMethodType",[{no:0,name:"PAYMENT_METHOD_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PAYMENT_METHOD_TYPE_CARD",localName:"CARD"},{no:2,name:"PAYMENT_METHOD_TYPE_USBANKACCOUNT",localName:"USBANKACCOUNT"}]),mh=s.makeEnum("viam.app.v1.UsageCostType",[{no:0,name:"USAGE_COST_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"USAGE_COST_TYPE_DATA_UPLOAD",localName:"DATA_UPLOAD"},{no:2,name:"USAGE_COST_TYPE_DATA_EGRESS",localName:"DATA_EGRESS"},{no:3,name:"USAGE_COST_TYPE_REMOTE_CONTROL",localName:"REMOTE_CONTROL"},{no:4,name:"USAGE_COST_TYPE_STANDARD_COMPUTE",localName:"STANDARD_COMPUTE"},{no:5,name:"USAGE_COST_TYPE_CLOUD_STORAGE",localName:"CLOUD_STORAGE"},{no:6,name:"USAGE_COST_TYPE_BINARY_DATA_CLOUD_STORAGE",localName:"BINARY_DATA_CLOUD_STORAGE"},{no:7,name:"USAGE_COST_TYPE_OTHER_CLOUD_STORAGE",localName:"OTHER_CLOUD_STORAGE"},{no:8,name:"USAGE_COST_TYPE_PER_MACHINE",localName:"PER_MACHINE"},{no:9,name:"USAGE_COST_TYPE_TRIGGER_NOTIFICATION",localName:"TRIGGER_NOTIFICATION"},{no:10,name:"USAGE_COST_TYPE_TABULAR_DATA_CLOUD_STORAGE",localName:"TABULAR_DATA_CLOUD_STORAGE"},{no:11,name:"USAGE_COST_TYPE_CONFIG_HISTORY_CLOUD_STORAGE",localName:"CONFIG_HISTORY_CLOUD_STORAGE"},{no:12,name:"USAGE_COST_TYPE_LOGS_CLOUD_STORAGE",localName:"LOGS_CLOUD_STORAGE"},{no:13,name:"USAGE_COST_TYPE_TRAINING_LOGS_CLOUD_STORAGE",localName:"TRAINING_LOGS_CLOUD_STORAGE"},{no:14,name:"USAGE_COST_TYPE_PACKAGES_CLOUD_STORAGE",localName:"PACKAGES_CLOUD_STORAGE"},{no:15,name:"USAGE_COST_TYPE_BINARY_DATA_UPLOAD",localName:"BINARY_DATA_UPLOAD"},{no:16,name:"USAGE_COST_TYPE_TABULAR_DATA_UPLOAD",localName:"TABULAR_DATA_UPLOAD"},{no:17,name:"USAGE_COST_TYPE_LOGS_UPLOAD",localName:"LOGS_UPLOAD"},{no:18,name:"USAGE_COST_TYPE_BINARY_DATA_EGRESS",localName:"BINARY_DATA_EGRESS"},{no:19,name:"USAGE_COST_TYPE_TABULAR_DATA_EGRESS",localName:"TABULAR_DATA_EGRESS"},{no:20,name:"USAGE_COST_TYPE_LOGS_EGRESS",localName:"LOGS_EGRESS"},{no:21,name:"USAGE_COST_TYPE_TRAINING_LOGS_EGRESS",localName:"TRAINING_LOGS_EGRESS"},{no:22,name:"USAGE_COST_TYPE_TABULAR_DATA_DATABASE_CLOUD_STORAGE",localName:"TABULAR_DATA_DATABASE_CLOUD_STORAGE"},{no:23,name:"USAGE_COST_TYPE_TABULAR_DATA_DATABASE_COMPUTE",localName:"TABULAR_DATA_DATABASE_COMPUTE"},{no:24,name:"USAGE_COST_TYPE_BINARY_DATA_CROSS_REGION_EGRESS",localName:"BINARY_DATA_CROSS_REGION_EGRESS"},{no:25,name:"USAGE_COST_TYPE_PIPELINE_SINK_CLOUD_STORAGE",localName:"PIPELINE_SINK_CLOUD_STORAGE"},{no:26,name:"USAGE_COST_TYPE_PIPELINE_SINK_COMPUTE",localName:"PIPELINE_SINK_COMPUTE"}]),ch=s.makeEnum("viam.app.v1.SourceType",[{no:0,name:"SOURCE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"SOURCE_TYPE_ORG",localName:"ORG"},{no:2,name:"SOURCE_TYPE_FRAGMENT",localName:"FRAGMENT"}]),dh=s.makeMessageType("viam.app.v1.InvoiceSummary",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"invoice_date",kind:"message",T:S},{no:3,name:"invoice_amount",kind:"scalar",T:1},{no:4,name:"status",kind:"scalar",T:9},{no:5,name:"due_date",kind:"message",T:S},{no:6,name:"paid_date",kind:"message",T:S}]),lh=s.makeMessageType("viam.app.v1.PaymentMethodCard",()=>[{no:1,name:"brand",kind:"scalar",T:9},{no:2,name:"last_four_digits",kind:"scalar",T:9}]),ph=s.makeMessageType("viam.app.v1.VerificationInfo",()=>[{no:1,name:"arrival_date",kind:"scalar",T:3},{no:2,name:"hosted_verification_page_url",kind:"scalar",T:9}]),uh=s.makeMessageType("viam.app.v1.PaymentMethodUSBankAccount",()=>[{no:1,name:"bank_name",kind:"scalar",T:9},{no:2,name:"last_four_digits_account_number",kind:"scalar",T:9},{no:3,name:"routing_number",kind:"scalar",T:9},{no:4,name:"account_type",kind:"scalar",T:9},{no:5,name:"verification_info",kind:"message",T:ph,opt:!0}]),gh=s.makeMessageType("viam.app.v1.GetCurrentMonthUsageRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Th=s.makeMessageType("viam.app.v1.UsageCost",()=>[{no:1,name:"resource_type",kind:"enum",T:s.getEnumType(mh)},{no:2,name:"cost",kind:"scalar",T:1}]),kh=s.makeMessageType("viam.app.v1.ResourceUsageCostsBySource",()=>[{no:1,name:"source_type",kind:"enum",T:s.getEnumType(ch)},{no:2,name:"resource_usage_costs",kind:"message",T:yh},{no:3,name:"tier_name",kind:"scalar",T:9}]),yh=s.makeMessageType("viam.app.v1.ResourceUsageCosts",()=>[{no:1,name:"usage_costs",kind:"message",T:Th,repeated:!0},{no:2,name:"discount",kind:"scalar",T:1},{no:3,name:"total_with_discount",kind:"scalar",T:1},{no:4,name:"total_without_discount",kind:"scalar",T:1}]),vh=s.makeMessageType("viam.app.v1.GetCurrentMonthUsageResponse",()=>[{no:1,name:"start_date",kind:"message",T:S},{no:2,name:"end_date",kind:"message",T:S},{no:14,name:"resource_usage_costs_by_source",kind:"message",T:kh,repeated:!0},{no:15,name:"subtotal",kind:"scalar",T:1},{no:3,name:"cloud_storage_usage_cost",kind:"scalar",T:1},{no:4,name:"data_upload_usage_cost",kind:"scalar",T:1},{no:5,name:"data_egres_usage_cost",kind:"scalar",T:1},{no:6,name:"remote_control_usage_cost",kind:"scalar",T:1},{no:7,name:"standard_compute_usage_cost",kind:"scalar",T:1},{no:8,name:"discount_amount",kind:"scalar",T:1},{no:9,name:"total_usage_with_discount",kind:"scalar",T:1},{no:10,name:"total_usage_without_discount",kind:"scalar",T:1},{no:11,name:"per_machine_usage_cost",kind:"scalar",T:1},{no:12,name:"binary_data_cloud_storage_usage_cost",kind:"scalar",T:1},{no:13,name:"other_cloud_storage_usage_cost",kind:"scalar",T:1}]),hh=s.makeMessageType("viam.app.v1.GetOrgBillingInformationRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),fh=s.makeMessageType("viam.app.v1.GetOrgBillingInformationResponse",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(rh)},{no:2,name:"billing_email",kind:"scalar",T:9},{no:3,name:"method",kind:"message",T:lh,opt:!0},{no:4,name:"billing_tier",kind:"scalar",T:9,opt:!0},{no:5,name:"method_us_bank_account",kind:"message",T:uh,opt:!0}]),Rh=s.makeMessageType("viam.app.v1.GetInvoicesSummaryRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),_h=s.makeMessageType("viam.app.v1.GetInvoicesSummaryResponse",()=>[{no:1,name:"outstanding_balance",kind:"scalar",T:1},{no:2,name:"invoices",kind:"message",T:dh,repeated:!0}]),Sh=s.makeMessageType("viam.app.v1.GetInvoicePdfRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"org_id",kind:"scalar",T:9}]),Ih=s.makeMessageType("viam.app.v1.GetInvoicePdfResponse",()=>[{no:1,name:"chunk",kind:"scalar",T:12}]),Eh=s.makeMessageType("viam.app.v1.SendPaymentRequiredEmailRequest",()=>[{no:1,name:"customer_org_id",kind:"scalar",T:9},{no:2,name:"billing_owner_org_id",kind:"scalar",T:9}]),Mh=s.makeMessageType("viam.app.v1.SendPaymentRequiredEmailResponse",[]),bh=s.makeMessageType("viam.app.v1.GetAvailableBillingTiersRequest",[]),Oh=s.makeMessageType("viam.app.v1.GetAvailableBillingTiersResponse",()=>[{no:1,name:"tiers",kind:"scalar",T:9,repeated:!0}]),wh=s.makeMessageType("viam.app.v1.UpdateOrganizationBillingTierRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"billing_tier",kind:"scalar",T:9}]),Ch=s.makeMessageType("viam.app.v1.UpdateOrganizationBillingTierResponse",[]),Nh=s.makeMessageType("viam.app.v1.GetLocationBillingOrganizationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),Ph=s.makeMessageType("viam.app.v1.GetLocationBillingOrganizationResponse",()=>[{no:1,name:"billing_organization_id",kind:"scalar",T:9}]),Dh=s.makeMessageType("viam.app.v1.UpdateLocationBillingOrganizationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"billing_organization_id",kind:"scalar",T:9}]),Ah=s.makeMessageType("viam.app.v1.UpdateLocationBillingOrganizationResponse",[]),Uh=s.makeMessageType("viam.app.v1.ChargeOrganizationRequest",()=>[{no:1,name:"org_id_to_charge",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9,opt:!0},{no:3,name:"subtotal",kind:"scalar",T:1},{no:4,name:"tax",kind:"scalar",T:1},{no:5,name:"org_id_for_branding",kind:"scalar",T:9,opt:!0},{no:6,name:"disable_confirmation_email",kind:"scalar",T:8}]),qh=s.makeMessageType("viam.app.v1.ChargeOrganizationResponse",()=>[{no:1,name:"invoice_id",kind:"scalar",T:9}]),Lh=s.makeMessageType("viam.app.v1.CreateInvoiceAndChargeImmediatelyRequest",()=>[{no:1,name:"org_id_to_charge",kind:"scalar",T:9},{no:2,name:"amount",kind:"scalar",T:1},{no:3,name:"description",kind:"scalar",T:9,opt:!0},{no:4,name:"org_id_for_branding",kind:"scalar",T:9,opt:!0},{no:5,name:"disable_email",kind:"scalar",T:8}]),Gh=s.makeMessageType("viam.app.v1.CreateInvoiceAndChargeImmediatelyResponse",()=>[{no:1,name:"invoice_id",kind:"scalar",T:9}]),CS=Object.freeze(Object.defineProperty({__proto__:null,ChargeOrganizationRequest:Uh,ChargeOrganizationResponse:qh,CreateInvoiceAndChargeImmediatelyRequest:Lh,CreateInvoiceAndChargeImmediatelyResponse:Gh,GetAvailableBillingTiersRequest:bh,GetAvailableBillingTiersResponse:Oh,GetCurrentMonthUsageRequest:gh,GetCurrentMonthUsageResponse:vh,GetInvoicePdfRequest:Sh,GetInvoicePdfResponse:Ih,GetInvoicesSummaryRequest:Rh,GetInvoicesSummaryResponse:_h,GetLocationBillingOrganizationRequest:Nh,GetLocationBillingOrganizationResponse:Ph,GetOrgBillingInformationRequest:hh,GetOrgBillingInformationResponse:fh,InvoiceSummary:dh,PaymentMethodCard:lh,PaymentMethodType:rh,PaymentMethodUSBankAccount:uh,ResourceUsageCosts:yh,ResourceUsageCostsBySource:kh,SendPaymentRequiredEmailRequest:Eh,SendPaymentRequiredEmailResponse:Mh,SourceType:ch,UpdateLocationBillingOrganizationRequest:Dh,UpdateLocationBillingOrganizationResponse:Ah,UpdateOrganizationBillingTierRequest:wh,UpdateOrganizationBillingTierResponse:Ch,UsageCost:Th,UsageCostType:mh,VerificationInfo:ph},Symbol.toStringTag,{value:"Module"})),NS={typeName:"viam.app.v1.BillingService",methods:{getCurrentMonthUsage:{name:"GetCurrentMonthUsage",I:gh,O:vh,kind:m.Unary},getOrgBillingInformation:{name:"GetOrgBillingInformation",I:hh,O:fh,kind:m.Unary},getInvoicesSummary:{name:"GetInvoicesSummary",I:Rh,O:_h,kind:m.Unary},getInvoicePdf:{name:"GetInvoicePdf",I:Sh,O:Ih,kind:m.ServerStreaming},sendPaymentRequiredEmail:{name:"SendPaymentRequiredEmail",I:Eh,O:Mh,kind:m.Unary},getAvailableBillingTiers:{name:"GetAvailableBillingTiers",I:bh,O:Oh,kind:m.Unary},updateOrganizationBillingTier:{name:"UpdateOrganizationBillingTier",I:wh,O:Ch,kind:m.Unary},getLocationBillingOrganization:{name:"GetLocationBillingOrganization",I:Nh,O:Ph,kind:m.Unary},updateLocationBillingOrganization:{name:"UpdateLocationBillingOrganization",I:Dh,O:Ah,kind:m.Unary},chargeOrganization:{name:"ChargeOrganization",I:Uh,O:qh,kind:m.Unary},createInvoiceAndChargeImmediately:{name:"CreateInvoiceAndChargeImmediately",I:Lh,O:Gh,kind:m.Unary}}};class PS{client;constructor(e){this.client=W(NS,e)}async getCurrentMonthUsage(e){const n=await this.client.getCurrentMonthUsage({orgId:e});return n.start=n.startDate?.toDate(),n.end=n.endDate?.toDate(),n}async getOrgBillingInformation(e){return this.client.getOrgBillingInformation({orgId:e})}async getInvoicesSummary(e){return this.client.getInvoicesSummary({orgId:e})}async getInvoicePdf(e,n){const a=this.client.getInvoicePdf({id:e,orgId:n}),o=[];for await(const i of a)o.push(i.chunk);return DS(o)}}const DS=t=>{const e=t.reduce((o,i)=>o+i.length,0),n=new Uint8Array(e);let a=0;for(const o of t)n.set(o,a),a+=o.length;return n};var Bh={},Fh={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){var n=function(){function y(h){this._id=new Uint8Array(h)}return y.prototype.buffer=function(){return this._id},y}();e.UUID=n;var a=function(){function y(h){this._id=new Uint8Array(h)}return y.prototype.buffer=function(){return this._id},y}();e.ObjectId=a;var o=function(){function y(h){this._time=typeof h!="string"?new Uint8Array(h||R(Date.now())):R(+new Date(h))}return y.prototype.buffer=function(){return this._time},y.prototype.fromString=function(h){this._time=R(+new Date(h))},y.prototype.toNumber=function(){return E(this._time)},y.prototype.toDate=function(){return new Date(E(this._time))},y}();e.UTC=o;function i(y){var h=5;for(var k in y)h+=r(k,y[k]);return h}function r(y,h){var k=1;if(y&&(k+=J(y)+1),h==null)return k;switch(h.constructor){case String:return k+4+J(h)+1;case Number:return Math.floor(h)===h&&h<=2147483647&&h>=-2147483647?k+4:k+8;case Boolean:return k+1;case Array:case Object:return k+i(h);case Int8Array:case Uint8Array:return k+5+h.byteLength;case Date:case o:return k+8;case n:return k+5+16;case a:return k+12;default:return 0}}function c(y){var h=new Uint8Array(i(y));return l(y,h),h}e.serialize=c;function l(y,h,k){if(k===void 0&&(k=0),k+=g(h.length,h,k),y.constructor===Array)for(var v=0,b=y.length;v<b;v++)k=f(v.toString(),y[v],h,k);else for(var M in y)k=f(M,y[M],h,k);return h[k++]=0,k}function d(y,h,k){var v=w(y),b=v.length;return h.set(v,k),h[k+b++]=0,b}function g(y,h,k){return h[k++]=y&255,h[k++]=y>>>8&255,h[k++]=y>>>16&255,h[k++]=y>>>24&255,4}function f(y,h,k,v){if(h==null)return k[v++]=10,v+=d(y,k,v),v;switch(h.constructor){case String:k[v++]=2,v+=d(y,k,v);var b=d(h,k,v+4);return v+=g(b,k,v),v+b;case Number:if(Math.floor(h)===h)h<=2147483647&&h>=-2147483647?(k[v++]=16,v+=d(y,k,v),v+=g(h,k,v)):(k[v++]=18,v+=d(y,k,v),k.set(R(h),v),v+=8);else{k[v++]=1,v+=d(y,k,v);var M=new Float64Array([h]),ne=new Uint8Array(M.buffer);k.set(ne,v),v+=8}return v;case Boolean:return k[v++]=8,v+=d(y,k,v),k[v++]=h?1:0,v;case Array:case Object:k[v++]=h.constructor===Array?4:3,v+=d(y,k,v);var q=l(h,k,v);return g(q-v,k,v),q;case Int8Array:case Uint8Array:return k[v++]=5,v+=d(y,k,v),v+=g(h.byteLength,k,v),k[v++]=0,k.set(h,v),v+=h.byteLength,v;case Date:return k[v++]=9,v+=d(y,k,v),k.set(R(h.getTime()),v),v+=8,v;case o:return k[v++]=9,v+=d(y,k,v),k.set(h.buffer(),v),v+=8,v;case n:return k[v++]=5,v+=d(y,k,v),v+=g(16,k,v),k[v++]=4,k.set(h.buffer(),v),v+=16,v;case a:return k[v++]=7,v+=d(y,k,v),k.set(h.buffer(),v),v+=12,v;case RegExp:return k[v++]=11,v+=d(y,k,v),v+=d(h.source,k,v),h.global&&(k[v++]=115),h.ignoreCase&&(k[v++]=105),h.multiline&&(k[v++]=109),k[v++]=0,v;default:return v}}function I(y,h,k,v){if(h===void 0&&(h=!1),k===void 0&&(k=0),v===void 0&&(v=!1),!(y.length<5)){var b=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24;if(!(b<5||b>y.length)&&y[y.length-1]===0){for(var M=v?[]:{};;){var ne=y[k++];if(ne===0)break;for(var q=k;y[q]!==0&&q<y.length;q++);if(q>=y.length-1)return;var z=N(y.subarray(k,q));switch(v&&(z=parseInt(z)),k=++q,ne){case 1:M[z]=new Float64Array(y.slice(k,k+=8).buffer)[0];break;case 2:b=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24,M[z]=N(y.subarray(k,k+=b-1)),k++;break;case 3:b=y[k]|y[k+1]<<8|y[k+2]<<16|y[k+3]<<24,M[z]=I(y,h,k,!1),k+=b;break;case 4:b=y[k]|y[k+1]<<8|y[k+2]<<16|y[k+3]<<24,M[z]=I(y,h,k,!0),k+=b;break;case 5:if(b=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24,y[k++]===4){if(b!==16)return;M[z]=new n(y.subarray(k,k+=b))}else M[z]=y.slice(k,k+=b);break;case 6:M[z]=null;break;case 7:M[z]=new a(y.subarray(k,k+=12));break;case 8:M[z]=y[k++]===1;break;case 9:M[z]=h?new o(y.subarray(k,k+=8)):new Date(E(y.subarray(k,k+=8)));break;case 10:M[z]=null;break;case 11:for(q=k;q<y.length&&y[q++]!==0;);if(q>=y.length)return;var vi=N(y.subarray(k,q));for(k=q;q<y.length&&y[q++]!==0;);if(q>=y.length)return;var hi=N(y.subarray(k,q));k=q,M[z]=new RegExp(vi,hi);break;case 16:M[z]=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24;break;case 18:M[z]=E(y.subarray(k,k+=8));break;default:return}}return M}}}e.deserialize=I;function R(y){var h=new Uint8Array(8);if(Math.floor(y)===y){var k=4294967296,v=y%k|0,b=y/k|0;y<0&&(v=~(-y%k)|0,b=~(-y/k)|0,v=v+1&4294967295,v||b++);var M=0;h[M++]=v&255,h[M++]=v>>>8&255,h[M++]=v>>>16&255,h[M++]=v>>>24&255,h[M++]=b&255,h[M++]=b>>>8&255,h[M++]=b>>>16&255,h[M]=b>>>24&255}else{var ne=new Float64Array([y]),q=new Uint8Array(ne.buffer);h.set(q)}return h}function E(y,h){h===void 0&&(h=0);var k=4294967296,v=y[h++]|y[h++]<<8|y[h++]<<16|y[h++]<<24,b=y[h++]|y[h++]<<8|y[h++]<<16|y[h]<<24;return b*k+(v>=0?v:k+v)}function w(y){y=y.replace(/\r\n/g,`
|
|
9
|
+
`);for(var h=[],k=0,v=0,b=y.length;v<b;v++){var M=y.charCodeAt(v);M<128?h[k++]=M:M<2048?(h[k++]=M>>>6|192,h[k++]=M&63|128):(h[k++]=M>>>12|224,h[k++]=M>>>6&63|128,h[k++]=M&63|128)}return new Uint8Array(h)}function N(y){for(var h="",k=y.length,v=0,b,M,ne;v<k;)b=y[v],b<128?(h+=String.fromCharCode(b),v++):b>191&&b<224?(M=y[v+1],h+=String.fromCharCode((b&31)<<6|M&63),v+=2):(M=y[v+1],ne=y[v+2],h+=String.fromCharCode((b&15)<<12|(M&63)<<6|ne&63),v+=3);return h}function J(y){return encodeURI(y).split(/%..|./).length-1}}(t.BSON||(t.BSON={}))})(Fh),Object.defineProperty(Bh,"__esModule",{value:!0});var AS=Fh,Jn=Bh.BSON=AS.BSON;const US={typeName:"viam.app.data.v1.DataService",methods:{tabularDataByFilter:{name:"TabularDataByFilter",I:op,O:ip,kind:m.Unary},tabularDataBySQL:{name:"TabularDataBySQL",I:mp,O:cp,kind:m.Unary},tabularDataByMQL:{name:"TabularDataByMQL",I:dp,O:lp,kind:m.Unary},exportTabularData:{name:"ExportTabularData",I:pp,O:up,kind:m.ServerStreaming},getLatestTabularData:{name:"GetLatestTabularData",I:gp,O:Tp,kind:m.Unary},binaryDataByFilter:{name:"BinaryDataByFilter",I:kp,O:yp,kind:m.Unary},binaryDataByIDs:{name:"BinaryDataByIDs",I:vp,O:hp,kind:m.Unary},deleteTabularData:{name:"DeleteTabularData",I:Sp,O:Ip,kind:m.Unary},deleteBinaryDataByFilter:{name:"DeleteBinaryDataByFilter",I:Ep,O:Mp,kind:m.Unary},deleteBinaryDataByIDs:{name:"DeleteBinaryDataByIDs",I:bp,O:Op,kind:m.Unary},addTagsToBinaryDataByIDs:{name:"AddTagsToBinaryDataByIDs",I:wp,O:Cp,kind:m.Unary},addTagsToBinaryDataByFilter:{name:"AddTagsToBinaryDataByFilter",I:Np,O:Pp,kind:m.Unary},removeTagsFromBinaryDataByIDs:{name:"RemoveTagsFromBinaryDataByIDs",I:Dp,O:Ap,kind:m.Unary},removeTagsFromBinaryDataByFilter:{name:"RemoveTagsFromBinaryDataByFilter",I:Up,O:qp,kind:m.Unary},tagsByFilter:{name:"TagsByFilter",I:Lp,O:Gp,kind:m.Unary},addBoundingBoxToImageByID:{name:"AddBoundingBoxToImageByID",I:Bp,O:Fp,kind:m.Unary},removeBoundingBoxFromImageByID:{name:"RemoveBoundingBoxFromImageByID",I:xp,O:Jp,kind:m.Unary},boundingBoxLabelsByFilter:{name:"BoundingBoxLabelsByFilter",I:$p,O:Yp,kind:m.Unary},updateBoundingBox:{name:"UpdateBoundingBox",I:zp,O:Vp,kind:m.Unary},getDatabaseConnection:{name:"GetDatabaseConnection",I:Hp,O:Kp,kind:m.Unary},configureDatabaseUser:{name:"ConfigureDatabaseUser",I:Wp,O:jp,kind:m.Unary},addBinaryDataToDatasetByIDs:{name:"AddBinaryDataToDatasetByIDs",I:Xp,O:Qp,kind:m.Unary},removeBinaryDataFromDatasetByIDs:{name:"RemoveBinaryDataFromDatasetByIDs",I:Zp,O:eu,kind:m.Unary},createIndex:{name:"CreateIndex",I:nu,O:au,kind:m.Unary},listIndexes:{name:"ListIndexes",I:ou,O:iu,kind:m.Unary},deleteIndex:{name:"DeleteIndex",I:tu,O:su,kind:m.Unary},createSavedQuery:{name:"CreateSavedQuery",I:mu,O:cu,kind:m.Unary},updateSavedQuery:{name:"UpdateSavedQuery",I:gu,O:Tu,kind:m.Unary},getSavedQuery:{name:"GetSavedQuery",I:pu,O:uu,kind:m.Unary},deleteSavedQuery:{name:"DeleteSavedQuery",I:du,O:lu,kind:m.Unary},listSavedQueries:{name:"ListSavedQueries",I:ku,O:yu,kind:m.Unary},createBinaryDataSignedURL:{name:"CreateBinaryDataSignedURL",I:vu,O:hu,kind:m.Unary}}},qS=s.makeEnum("viam.app.datapipelines.v1.DataPipelineRunStatus",[{no:0,name:"DATA_PIPELINE_RUN_STATUS_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"DATA_PIPELINE_RUN_STATUS_SCHEDULED",localName:"SCHEDULED"},{no:2,name:"DATA_PIPELINE_RUN_STATUS_STARTED",localName:"STARTED"},{no:3,name:"DATA_PIPELINE_RUN_STATUS_COMPLETED",localName:"COMPLETED"},{no:4,name:"DATA_PIPELINE_RUN_STATUS_FAILED",localName:"FAILED"}]),xh=s.makeMessageType("viam.app.datapipelines.v1.DataPipeline",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:5,name:"schedule",kind:"scalar",T:9},{no:6,name:"enabled",kind:"scalar",T:8},{no:7,name:"created_on",kind:"message",T:S},{no:8,name:"updated_at",kind:"message",T:S},{no:9,name:"data_source_type",kind:"enum",T:s.getEnumType(en),opt:!0}]),LS=s.makeMessageType("viam.app.datapipelines.v1.GetDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),GS=s.makeMessageType("viam.app.datapipelines.v1.GetDataPipelineResponse",()=>[{no:1,name:"data_pipeline",kind:"message",T:xh}]),BS=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelinesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),FS=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelinesResponse",()=>[{no:1,name:"data_pipelines",kind:"message",T:xh,repeated:!0}]),xS=s.makeMessageType("viam.app.datapipelines.v1.CreateDataPipelineRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:4,name:"schedule",kind:"scalar",T:9},{no:5,name:"enable_backfill",kind:"scalar",T:8,opt:!0},{no:6,name:"data_source_type",kind:"enum",T:s.getEnumType(en),opt:!0}]),JS=s.makeMessageType("viam.app.datapipelines.v1.CreateDataPipelineResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),zS=s.makeMessageType("viam.app.datapipelines.v1.RenameDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),VS=s.makeMessageType("viam.app.datapipelines.v1.RenameDataPipelineResponse",[]),$S=s.makeMessageType("viam.app.datapipelines.v1.DeleteDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),YS=s.makeMessageType("viam.app.datapipelines.v1.DeleteDataPipelineResponse",[]),WS=s.makeMessageType("viam.app.datapipelines.v1.EnableDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),jS=s.makeMessageType("viam.app.datapipelines.v1.EnableDataPipelineResponse",[]),HS=s.makeMessageType("viam.app.datapipelines.v1.DisableDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),KS=s.makeMessageType("viam.app.datapipelines.v1.DisableDataPipelineResponse",[]),XS=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelineRunsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_size",kind:"scalar",T:13},{no:3,name:"page_token",kind:"scalar",T:9}]),QS=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelineRunsResponse",()=>[{no:1,name:"pipeline_id",kind:"scalar",T:9},{no:2,name:"runs",kind:"message",T:ZS,repeated:!0},{no:3,name:"next_page_token",kind:"scalar",T:9}]),ZS=s.makeMessageType("viam.app.datapipelines.v1.DataPipelineRun",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"start_time",kind:"message",T:S},{no:3,name:"end_time",kind:"message",T:S},{no:4,name:"data_start_time",kind:"message",T:S},{no:5,name:"data_end_time",kind:"message",T:S},{no:6,name:"status",kind:"enum",T:s.getEnumType(qS)},{no:7,name:"error_message",kind:"scalar",T:9}]),eI={typeName:"viam.app.datapipelines.v1.DataPipelinesService",methods:{getDataPipeline:{name:"GetDataPipeline",I:LS,O:GS,kind:m.Unary},listDataPipelines:{name:"ListDataPipelines",I:BS,O:FS,kind:m.Unary},createDataPipeline:{name:"CreateDataPipeline",I:xS,O:JS,kind:m.Unary},renameDataPipeline:{name:"RenameDataPipeline",I:zS,O:VS,kind:m.Unary},deleteDataPipeline:{name:"DeleteDataPipeline",I:$S,O:YS,kind:m.Unary},enableDataPipeline:{name:"EnableDataPipeline",I:WS,O:jS,kind:m.Unary},disableDataPipeline:{name:"DisableDataPipeline",I:HS,O:KS,kind:m.Unary},listDataPipelineRuns:{name:"ListDataPipelineRuns",I:XS,O:QS,kind:m.Unary}}},Jh=s.makeMessageType("viam.app.dataset.v1.Dataset",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"organization_id",kind:"scalar",T:9},{no:4,name:"time_created",kind:"message",T:S}]),nI=s.makeMessageType("viam.app.dataset.v1.CreateDatasetRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),aI=s.makeMessageType("viam.app.dataset.v1.CreateDatasetResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),tI=s.makeMessageType("viam.app.dataset.v1.DeleteDatasetRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),sI=s.makeMessageType("viam.app.dataset.v1.DeleteDatasetResponse",[]),oI=s.makeMessageType("viam.app.dataset.v1.RenameDatasetRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),iI=s.makeMessageType("viam.app.dataset.v1.RenameDatasetResponse",[]),rI=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByOrganizationIDRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),mI=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByOrganizationIDResponse",()=>[{no:1,name:"datasets",kind:"message",T:Jh,repeated:!0}]),cI=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByIDsRequest",()=>[{no:1,name:"ids",kind:"scalar",T:9,repeated:!0}]),dI=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByIDsResponse",()=>[{no:1,name:"datasets",kind:"message",T:Jh,repeated:!0}]),lI=s.makeMessageType("viam.app.dataset.v1.MergeDatasetsRequest",()=>[{no:1,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"organization_id",kind:"scalar",T:9}]),pI=s.makeMessageType("viam.app.dataset.v1.MergeDatasetsResponse",()=>[{no:1,name:"dataset_id",kind:"scalar",T:9}]),uI={typeName:"viam.app.dataset.v1.DatasetService",methods:{createDataset:{name:"CreateDataset",I:nI,O:aI,kind:m.Unary},deleteDataset:{name:"DeleteDataset",I:tI,O:sI,kind:m.Unary},renameDataset:{name:"RenameDataset",I:oI,O:iI,kind:m.Unary},listDatasetsByOrganizationID:{name:"ListDatasetsByOrganizationID",I:rI,O:mI,kind:m.Unary},listDatasetsByIDs:{name:"ListDatasetsByIDs",I:cI,O:dI,kind:m.Unary},mergeDatasets:{name:"MergeDatasets",I:lI,O:pI,kind:m.Unary}}},zh=s.makeEnum("viam.app.datasync.v1.MimeType",[{no:0,name:"MIME_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MIME_TYPE_IMAGE_JPEG",localName:"IMAGE_JPEG"},{no:2,name:"MIME_TYPE_IMAGE_PNG",localName:"IMAGE_PNG"},{no:3,name:"MIME_TYPE_APPLICATION_PCD",localName:"APPLICATION_PCD"},{no:4,name:"MIME_TYPE_VIDEO_MP4",localName:"VIDEO_MP4"}]),Ha=s.makeEnum("viam.app.datasync.v1.DataType",[{no:0,name:"DATA_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"DATA_TYPE_BINARY_SENSOR",localName:"BINARY_SENSOR"},{no:2,name:"DATA_TYPE_TABULAR_SENSOR",localName:"TABULAR_SENSOR"},{no:3,name:"DATA_TYPE_FILE",localName:"FILE"}]),ni=s.makeMessageType("viam.app.datasync.v1.DataCaptureUploadRequest",()=>[{no:1,name:"metadata",kind:"message",T:vn},{no:2,name:"sensor_contents",kind:"message",T:si,repeated:!0}]),gI=s.makeMessageType("viam.app.datasync.v1.DataCaptureUploadResponse",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"binary_data_id",kind:"scalar",T:9}]),ai=s.makeMessageType("viam.app.datasync.v1.FileUploadRequest",()=>[{no:1,name:"metadata",kind:"message",T:vn,oneof:"upload_packet"},{no:2,name:"file_contents",kind:"message",T:Vh,oneof:"upload_packet"}]),TI=s.makeMessageType("viam.app.datasync.v1.FileUploadResponse",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"binary_data_id",kind:"scalar",T:9}]),kI=s.makeMessageType("viam.app.datasync.v1.StreamingDataCaptureUploadRequest",()=>[{no:1,name:"metadata",kind:"message",T:vI,oneof:"upload_packet"},{no:2,name:"data",kind:"scalar",T:12,oneof:"upload_packet"}]),yI=s.makeMessageType("viam.app.datasync.v1.StreamingDataCaptureUploadResponse",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"binary_data_id",kind:"scalar",T:9}]),ti=s.makeMessageType("viam.app.datasync.v1.SensorMetadata",()=>[{no:1,name:"time_requested",kind:"message",T:S},{no:2,name:"time_received",kind:"message",T:S},{no:3,name:"mime_type",kind:"enum",T:s.getEnumType(zh)},{no:4,name:"annotations",kind:"message",T:Aa}]),si=s.makeMessageType("viam.app.datasync.v1.SensorData",()=>[{no:1,name:"metadata",kind:"message",T:ti},{no:2,name:"struct",kind:"message",T:p,oneof:"data"},{no:3,name:"binary",kind:"scalar",T:12,oneof:"data"}]),Vh=s.makeMessageType("viam.app.datasync.v1.FileData",()=>[{no:1,name:"data",kind:"scalar",T:12}]),vn=s.makeMessageType("viam.app.datasync.v1.UploadMetadata",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"component_type",kind:"scalar",T:9},{no:3,name:"component_name",kind:"scalar",T:9},{no:5,name:"method_name",kind:"scalar",T:9},{no:6,name:"type",kind:"enum",T:s.getEnumType(Ha)},{no:8,name:"method_parameters",kind:"map",K:9,V:{kind:"message",T:K}},{no:7,name:"file_name",kind:"scalar",T:9},{no:9,name:"file_extension",kind:"scalar",T:9},{no:14,name:"file_create_time",kind:"message",T:S},{no:15,name:"file_modify_time",kind:"message",T:S},{no:10,name:"tags",kind:"scalar",T:9,repeated:!0},{no:12,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:13,name:"mime_type",kind:"scalar",T:9}]),vI=s.makeMessageType("viam.app.datasync.v1.DataCaptureUploadMetadata",()=>[{no:1,name:"upload_metadata",kind:"message",T:vn},{no:2,name:"sensor_metadata",kind:"message",T:ti}]),hI={typeName:"viam.app.datasync.v1.DataSyncService",methods:{dataCaptureUpload:{name:"DataCaptureUpload",I:ni,O:gI,kind:m.Unary},fileUpload:{name:"FileUpload",I:ai,O:TI,kind:m.ClientStreaming},streamingDataCaptureUpload:{name:"StreamingDataCaptureUpload",I:kI,O:yI,kind:m.ClientStreaming}}},Ge=()=>{console.warn("The BinaryID type is deprecated and will be removed in a future release. Please migrate to the BinaryDataId field instead.")};class zn{dataClient;datasetClient;dataSyncClient;dataPipelinesClient;static UPLOAD_CHUNK_SIZE=1024*64;constructor(e){this.dataClient=W(US,e),this.datasetClient=W(uI,e),this.dataSyncClient=W(hI,e),this.dataPipelinesClient=W(eI,e)}async exportTabularData(e,n,a,o,i,r,c){const l=new Gn;i&&(l.start=S.fromDate(i)),r&&(l.end=S.fromDate(r));let d;c&&(d=p.fromJson(c));const g={partId:e,resourceName:n,resourceSubtype:a,methodName:o,interval:l,additionalParameters:d},f=this.dataClient.exportTabularData(g),I=[];for await(const R of f)I.push({partId:R.partId,resourceName:R.resourceName,resourceSubtype:R.resourceSubtype,methodName:R.methodName,timeCaptured:R.timeCaptured.toDate(),organizationId:R.organizationId,locationId:R.locationId,robotName:R.robotName,robotId:R.robotId,partName:R.partName,methodParameters:R.methodParameters.toJson(),tags:R.tags,payload:R.payload.toJson()});return I}async tabularDataBySQL(e,n){return(await this.dataClient.tabularDataBySQL({organizationId:e,sqlQuery:n})).rawData.map(o=>Jn.deserialize(o))}async tabularDataByMQL(e,n,a,o,i){const r=n[0]instanceof Uint8Array?n:n.map(d=>Jn.serialize(d));let c=o;return a&&(!c||c.type===en.UNSPECIFIED)&&(c=new wo({type:en.HOT_STORAGE})),(await this.dataClient.tabularDataByMQL({organizationId:e,mqlBinary:r,dataSource:c,queryPrefixName:i})).rawData.map(d=>Jn.deserialize(d))}async tabularDataByFilter(e,n,a,o="",i=!1,r=!1){const l={dataRequest:{filter:e,limit:n===void 0?void 0:BigInt(n),sortOrder:a,last:o},countOnly:i,includeInternalData:r},d=await this.dataClient.tabularDataByFilter(l),g=d.metadata.length,f=[];return f.push(...d.data.map(I=>{const R=I.metadataIndex,E=g!==0&&R>=g?new Da:d.metadata[R];return{data:I.data?.toJson(),metadata:E,timeRequested:I.timeRequested?.toDate(),timeReceived:I.timeRequested?.toDate()}})),{data:f,count:d.count,last:d.last}}async binaryDataByFilter(e,n,a,o="",i=!0,r=!1,c=!1){const d={dataRequest:{filter:e,limit:n===void 0?void 0:BigInt(n),sortOrder:a,last:o},includeBinary:i,countOnly:r,includeInternalData:c},g=await this.dataClient.binaryDataByFilter(d);return{data:g.data,count:g.count,last:g.last}}async binaryDataByIds(e,n=!0){return Array.isArray(e)&&typeof e[0]=="string"?(await this.dataClient.binaryDataByIDs({binaryDataIds:e,includeBinary:n})).data:(Ge(),(await this.dataClient.binaryDataByIDs({binaryIds:e,includeBinary:n})).data)}async createBinaryDataSignedURL(e,n){return(await this.dataClient.createBinaryDataSignedURL({binaryDataId:e,expirationMinutes:n})).signedUrl}async deleteTabularData(e,n){return(await this.dataClient.deleteTabularData({organizationId:e,deleteOlderThanDays:n})).deletedCount}async deleteBinaryDataByFilter(e,n=!0){return(await this.dataClient.deleteBinaryDataByFilter({filter:e,includeInternalData:n})).deletedCount}async deleteBinaryDataByIds(e){return Array.isArray(e)&&typeof e[0]=="string"?(await this.dataClient.deleteBinaryDataByIDs({binaryDataIds:e})).deletedCount:(Ge(),(await this.dataClient.deleteBinaryDataByIDs({binaryIds:e})).deletedCount)}async addTagsToBinaryDataByIds(e,n){if(Array.isArray(n)&&typeof n[0]=="string"){await this.dataClient.addTagsToBinaryDataByIDs({tags:e,binaryDataIds:n});return}Ge(),await this.dataClient.addTagsToBinaryDataByIDs({tags:e,binaryIds:n})}async addTagsToBinaryDataByFilter(e,n){await this.dataClient.addTagsToBinaryDataByFilter({tags:e,filter:n})}async removeTagsFromBinaryDataByIds(e,n){return Array.isArray(n)&&typeof n[0]=="string"?(await this.dataClient.removeTagsFromBinaryDataByIDs({tags:e,binaryDataIds:n})).deletedCount:(Ge(),(await this.dataClient.removeTagsFromBinaryDataByIDs({tags:e,binaryIds:n})).deletedCount)}async removeTagsFromBinaryDataByFilter(e,n){return(await this.dataClient.removeTagsFromBinaryDataByFilter({tags:e,filter:n})).deletedCount}async tagsByFilter(e){return(await this.dataClient.tagsByFilter({filter:e})).tags}async addBoundingBoxToImageById(e,n,a,o,i,r,c){return typeof e=="string"?(await this.dataClient.addBoundingBoxToImageByID({binaryDataId:e,label:n,xMinNormalized:a,yMinNormalized:o,xMaxNormalized:i,yMaxNormalized:r,confidence:c})).bboxId:(Ge(),(await this.dataClient.addBoundingBoxToImageByID({binaryId:e,label:n,xMinNormalized:a,yMinNormalized:o,xMaxNormalized:i,yMaxNormalized:r,confidence:c})).bboxId)}async removeBoundingBoxFromImageById(e,n){if(typeof e=="string"){await this.dataClient.removeBoundingBoxFromImageByID({binaryDataId:e,bboxId:n});return}Ge(),await this.dataClient.removeBoundingBoxFromImageByID({binaryId:e,bboxId:n})}async updateBoundingBox(e,n,a,o,i,r,c,l){if(typeof e=="string"){await this.dataClient.updateBoundingBox({binaryDataId:e,bboxId:n,label:a,xMinNormalized:o,yMinNormalized:i,xMaxNormalized:r,yMaxNormalized:c,confidence:l});return}Ge(),await this.dataClient.updateBoundingBox({binaryId:e,bboxId:n,label:a,xMinNormalized:o,yMinNormalized:i,xMaxNormalized:r,yMaxNormalized:c,confidence:l})}async boundingBoxLabelsByFilter(e){return(await this.dataClient.boundingBoxLabelsByFilter({filter:e})).labels}async configureDatabaseUser(e,n){await this.dataClient.configureDatabaseUser({organizationId:e,password:n})}async getDatabaseConnection(e){return(await this.dataClient.getDatabaseConnection({organizationId:e})).hostname}async addBinaryDataToDatasetByIds(e,n){if(Array.isArray(e)&&typeof e[0]=="string"){await this.dataClient.addBinaryDataToDatasetByIDs({binaryDataIds:e,datasetId:n});return}Ge(),await this.dataClient.addBinaryDataToDatasetByIDs({binaryIds:e,datasetId:n})}async removeBinaryDataFromDatasetByIds(e,n){if(Array.isArray(e)&&typeof e[0]=="string"){await this.dataClient.removeBinaryDataFromDatasetByIDs({binaryDataIds:e,datasetId:n});return}Ge(),await this.dataClient.removeBinaryDataFromDatasetByIDs({binaryIds:e,datasetId:n})}async createDataset(e,n){return(await this.datasetClient.createDataset({name:e,organizationId:n})).id}async deleteDataset(e){await this.datasetClient.deleteDataset({id:e})}async renameDataset(e,n){await this.datasetClient.renameDataset({id:e,name:n})}async listDatasetsByOrganizationID(e){return(await this.datasetClient.listDatasetsByOrganizationID({organizationId:e})).datasets.map(a=>({created:a.timeCreated?.toDate(),...a}))}async listDatasetsByIds(e){return(await this.datasetClient.listDatasetsByIDs({ids:e})).datasets.map(a=>({created:a.timeCreated?.toDate(),...a}))}async tabularDataCaptureUpload(e,n,a,o,i,r,c){if(r.length!==e.length)throw new Error("dataRequestTimes and data lengths must be equal.");const l=new vn({partId:n,componentType:a,componentName:o,methodName:i,type:Ha.TABULAR_SENSOR,tags:c}),d=[];for(const[I,R]of e.entries()){const E=new ti,w=r[I];w&&(E.timeRequested=S.fromDate(w[0]),E.timeReceived=S.fromDate(w[1])),d.push(new si({metadata:E,data:{case:"struct",value:p.fromJson(R)}}))}const g=new ni({metadata:l,sensorContents:d});return(await this.dataSyncClient.dataCaptureUpload(g)).fileId}async binaryDataCaptureUpload(e,n,a,o,i,r,c,l,d){const g=new vn({partId:n,componentType:a,componentName:o,methodName:i,type:Ha.BINARY_SENSOR,tags:l,fileExtension:r,datasetIds:d}),f=new si({metadata:{timeRequested:S.fromDate(c[0]),timeReceived:S.fromDate(c[1])},data:{case:"binary",value:e}}),I=new ni({metadata:g,sensorContents:[f]});return(await this.dataSyncClient.dataCaptureUpload(I)).binaryDataId}async fileUpload(e,n,a){const o=new vn({partId:n,type:Ha.FILE,...a});return(await this.dataSyncClient.fileUpload(zn.fileUploadRequests(o,e))).binaryDataId}static async*fileUploadRequests(e,n){yield new ai({uploadPacket:{case:"metadata",value:e}});for(let a=0;a<n.length;a+=zn.UPLOAD_CHUNK_SIZE){let o=a+zn.UPLOAD_CHUNK_SIZE;o>n.length&&(o=n.length),yield new ai({uploadPacket:{case:"fileContents",value:new Vh({data:n.slice(a,o)})}})}}static createFilter(e){const n=new Ye(e);if(e.startTime??e.endTime){const o=new Gn;e.startTime&&(o.start=S.fromDate(e.startTime)),e.endTime&&(o.end=S.fromDate(e.endTime)),n.interval=o}const a=new Oo;return e.tags&&(a.tags=e.tags,n.tagsFilter=a),n}async getLatestTabularData(e,n,a,o,i){let r;i&&(r=p.fromJson(i));const c=await this.dataClient.getLatestTabularData({partId:e,resourceName:n,resourceSubtype:a,methodName:o,additionalParameters:r});return!c.payload||!c.timeCaptured||!c.timeSynced?null:[c.timeCaptured.toDate(),c.timeSynced.toDate(),c.payload.toJson()]}async listDataPipelines(e){return(await this.dataPipelinesClient.listDataPipelines({organizationId:e})).dataPipelines}async getDataPipeline(e){return(await this.dataPipelinesClient.getDataPipeline({id:e})).dataPipeline??null}async createDataPipeline(e,n,a,o,i,r){const c=a[0]instanceof Uint8Array?a:a.map(g=>Jn.serialize(g)),l=r??en.STANDARD;return(await this.dataPipelinesClient.createDataPipeline({organizationId:e,name:n,mqlBinary:c,schedule:o,enableBackfill:i,dataSourceType:l})).id}async deleteDataPipeline(e){await this.dataPipelinesClient.deleteDataPipeline({id:e})}async listDataPipelineRuns(e,n){const a=await this.dataPipelinesClient.listDataPipelineRuns({id:e,pageSize:n});return new Ka(this.dataPipelinesClient,e,a.runs,n,a.nextPageToken)}async createIndex(e,n,a,o){await this.dataClient.createIndex({organizationId:e,collectionType:n,indexSpec:[Jn.serialize(a)],pipelineName:o})}async listIndexes(e,n,a){return(await this.dataClient.listIndexes({organizationId:e,collectionType:n,pipelineName:a})).indexes}async deleteIndex(e,n,a,o){await this.dataClient.deleteIndex({organizationId:e,collectionType:n,indexName:a,pipelineName:o})}}class Ka{constructor(e,n,a=[],o,i){this.dataPipelinesClient=e,this.pipelineId=n,this.runs=a,this.pageSize=o,this.nextPageToken=i}async nextPage(){if(this.nextPageToken===void 0||this.nextPageToken==="")return new Ka(this.dataPipelinesClient,this.pipelineId,[],this.pageSize,"");const e=await this.dataPipelinesClient.listDataPipelineRuns({id:this.pipelineId,pageSize:this.pageSize,pageToken:this.nextPageToken});return new Ka(this.dataPipelinesClient,this.pipelineId,e.runs,this.pageSize,e.nextPageToken)}}const fI={typeName:"viam.app.mltraining.v1.MLTrainingService",methods:{submitTrainingJob:{name:"SubmitTrainingJob",I:ng,O:ag,kind:m.Unary},submitCustomTrainingJob:{name:"SubmitCustomTrainingJob",I:tg,O:sg,kind:m.Unary},getTrainingJob:{name:"GetTrainingJob",I:og,O:ig,kind:m.Unary},listTrainingJobs:{name:"ListTrainingJobs",I:rg,O:mg,kind:m.Unary},cancelTrainingJob:{name:"CancelTrainingJob",I:cg,O:dg,kind:m.Unary},deleteCompletedTrainingJob:{name:"DeleteCompletedTrainingJob",I:lg,O:pg,kind:m.Unary},getTrainingJobLogs:{name:"GetTrainingJobLogs",I:gg,O:Tg,kind:m.Unary},listSupportedContainers:{name:"ListSupportedContainers",I:kg,O:yg,kind:m.Unary}}};class RI{client;constructor(e){this.client=W(fI,e)}async submitTrainingJob(e,n,a,o,i,r){return(await this.client.submitTrainingJob({organizationId:e,datasetId:n,modelName:a,modelVersion:o,modelType:i,tags:r})).id}async submitCustomTrainingJob(e,n,a,o,i,r){return(await this.client.submitCustomTrainingJob({organizationId:e,datasetId:n,registryItemId:a,registryItemVersion:o,modelName:i,modelVersion:r})).id}async getTrainingJob(e){return(await this.client.getTrainingJob({id:e})).metadata}async listTrainingJobs(e,n){return(await this.client.listTrainingJobs({organizationId:e,status:n})).jobs}async cancelTrainingJob(e){return await this.client.cancelTrainingJob({id:e}),null}async deleteCompletedTrainingJob(e){return await this.client.deleteCompletedTrainingJob({id:e}),null}}const $h=s.makeMessageType("viam.provisioning.v1.ExitProvisioningRequest",[]),Yh=s.makeMessageType("viam.provisioning.v1.ExitProvisioningResponse",[]),Wh=s.makeMessageType("viam.provisioning.v1.GetSmartMachineStatusRequest",[]),jh=s.makeMessageType("viam.provisioning.v1.GetSmartMachineStatusResponse",()=>[{no:1,name:"provisioning_info",kind:"message",T:nf},{no:2,name:"has_smart_machine_credentials",kind:"scalar",T:8},{no:3,name:"is_online",kind:"scalar",T:8},{no:4,name:"latest_connection_attempt",kind:"message",T:oi},{no:5,name:"errors",kind:"scalar",T:9,repeated:!0},{no:6,name:"agent_version",kind:"scalar",T:9}]),Hh=s.makeMessageType("viam.provisioning.v1.SetNetworkCredentialsRequest",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"ssid",kind:"scalar",T:9},{no:3,name:"psk",kind:"scalar",T:9}]),Kh=s.makeMessageType("viam.provisioning.v1.SetNetworkCredentialsResponse",[]),Xh=s.makeMessageType("viam.provisioning.v1.SetSmartMachineCredentialsRequest",()=>[{no:1,name:"cloud",kind:"message",T:ii}]),Qh=s.makeMessageType("viam.provisioning.v1.SetSmartMachineCredentialsResponse",[]),Zh=s.makeMessageType("viam.provisioning.v1.GetNetworkListRequest",[]),ef=s.makeMessageType("viam.provisioning.v1.GetNetworkListResponse",()=>[{no:1,name:"networks",kind:"message",T:oi,repeated:!0}]),nf=s.makeMessageType("viam.provisioning.v1.ProvisioningInfo",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"model",kind:"scalar",T:9},{no:3,name:"manufacturer",kind:"scalar",T:9}]),oi=s.makeMessageType("viam.provisioning.v1.NetworkInfo",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"ssid",kind:"scalar",T:9},{no:3,name:"security",kind:"scalar",T:9},{no:4,name:"signal",kind:"scalar",T:5},{no:5,name:"connected",kind:"scalar",T:8},{no:6,name:"last_error",kind:"scalar",T:9}]),ii=s.makeMessageType("viam.provisioning.v1.CloudConfig",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"secret",kind:"scalar",T:9},{no:3,name:"app_address",kind:"scalar",T:9},{no:4,name:"api_key",kind:"message",T:af}]),af=s.makeMessageType("viam.provisioning.v1.APIKey",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]),_I=Object.freeze(Object.defineProperty({__proto__:null,APIKey:af,CloudConfig:ii,ExitProvisioningRequest:$h,ExitProvisioningResponse:Yh,GetNetworkListRequest:Zh,GetNetworkListResponse:ef,GetSmartMachineStatusRequest:Wh,GetSmartMachineStatusResponse:jh,NetworkInfo:oi,ProvisioningInfo:nf,SetNetworkCredentialsRequest:Hh,SetNetworkCredentialsResponse:Kh,SetSmartMachineCredentialsRequest:Xh,SetSmartMachineCredentialsResponse:Qh},Symbol.toStringTag,{value:"Module"})),SI={typeName:"viam.provisioning.v1.ProvisioningService",methods:{getSmartMachineStatus:{name:"GetSmartMachineStatus",I:Wh,O:jh,kind:m.Unary},setNetworkCredentials:{name:"SetNetworkCredentials",I:Hh,O:Kh,kind:m.Unary},setSmartMachineCredentials:{name:"SetSmartMachineCredentials",I:Xh,O:Qh,kind:m.Unary},getNetworkList:{name:"GetNetworkList",I:Zh,O:ef,kind:m.Unary},exitProvisioning:{name:"ExitProvisioning",I:$h,O:Yh,kind:m.Unary}}};class II{client;constructor(e){this.client=W(SI,e)}async getSmartMachineStatus(){return this.client.getSmartMachineStatus({})}async setNetworkCredentials(e,n,a){await this.client.setNetworkCredentials({type:e,ssid:n,psk:a})}async setSmartMachineCredentials(e){await this.client.setSmartMachineCredentials({cloud:e})}async getNetworkList(){return(await this.client.getNetworkList({})).networks}}const EI=async({serviceHost:t="https://app.viam.com",credentials:e})=>{const n=await r_(t,e);return new MI(n,e)};class MI{transport;credentials;dataClient;appClient;mlTrainingClient;provisioningClient;billingClient;constructor(e,n){this.transport=e,this.credentials=n,this.dataClient=new zn(this.transport),this.appClient=new wS(this.transport),this.mlTrainingClient=new RI(this.transport),this.provisioningClient=new II(this.transport),this.billingClient=new PS(this.transport)}async getRobotSecretFromHost(e){const a=e.split(".viam.")[0]?.split(".");if(a!==void 0){const o=a.at(-1);if(o===void 0)return;const i=e.split(".").at(0);if(i!==void 0)return(await this.appClient.getRobotPartByNameAndLocation(i,o)).part?.secret}}async connectToMachine({host:e=void 0,id:n=void 0}){if(e===void 0&&n===void 0)throw new Error("Either a machine address or ID must be provided");let a=e,o;if(n!==void 0&&e===void 0){const c=(await this.appClient.getRobotParts(n)).find(l=>l.mainPart);if(!c)throw new Error(`Could not find a main part for the machine with UUID: ${n}`);a=c.fqdn,o=c.secret}if(a===void 0||a==="")throw new Error("Host was not provided and could not be obtained from the machine ID");let i=this.credentials;return Un(i)||(o===void 0&&(o=await this.getRobotSecretFromHost(a)),i=o===void 0?i:{type:"robot-secret",payload:o,authEntity:a}),eg({host:a,credentials:i,signalingAddress:"https://app.viam.com:443",reconnectMaxAttempts:1})}}const{JointPositions:bI}=am;class OI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(tm),this.name=n,this.options=a}async getEndPosition(e={},n=this.callOptions){const a=new Pt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const i=(await this.client.getEndPosition(a,n)).pose;if(!i)throw new Error("no pose");return i}async getGeometries(e={},n=this.callOptions){return $r(this.client.getGeometries,this.name,p.fromJson(e),n)}async getKinematics(e={},n=this.callOptions){return Vr(this.client.getKinematics,this.name,p.fromJson(e),n)}async get3DModels(e={},n=this.callOptions){const a=new bt({name:this.name,extra:p.fromJson(e)});return(await this.client.get3DModels(a,n)).models}async moveToPosition(e,n={},a=this.callOptions){const o=new At({name:this.name,to:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.moveToPosition(o,a)}async moveToJointPositions(e,n={},a=this.callOptions){const o=new pn({values:e}),i=new Ut({name:this.name,positions:o,extra:p.fromJson(n)});this.options.requestLogger?.(i),await this.client.moveToJointPositions(i,a)}async getJointPositions(e={},n=this.callOptions){const a=new Dt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const i=(await this.client.getJointPositions(a,n)).positions;if(!i)throw new Error("no pose");return i}async stop(e={},n=this.callOptions){const a=new qt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.stop(a,n)}async isMoving(e=this.callOptions){const n=new Lt({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const tf=s.makeMessageType("viam.component.audioin.v1.GetAudioRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"duration_seconds",kind:"scalar",T:2},{no:3,name:"codec",kind:"scalar",T:9},{no:4,name:"request_id",kind:"scalar",T:9},{no:5,name:"previous_timestamp_nanoseconds",kind:"scalar",T:3},{no:99,name:"extra",kind:"message",T:p}]),wI=s.makeMessageType("viam.component.audioin.v1.GetAudioResponse",()=>[{no:1,name:"audio",kind:"message",T:CI},{no:2,name:"request_id",kind:"scalar",T:9}]),CI=s.makeMessageType("viam.component.audioin.v1.AudioChunk",()=>[{no:1,name:"audio_data",kind:"scalar",T:12},{no:2,name:"audio_info",kind:"message",T:Ot},{no:3,name:"start_timestamp_nanoseconds",kind:"scalar",T:3},{no:4,name:"end_timestamp_nanoseconds",kind:"scalar",T:3},{no:5,name:"sequence",kind:"scalar",T:5}]),NI={typeName:"viam.component.audioin.v1.AudioInService",methods:{getAudio:{name:"GetAudio",I:tf,O:wI,kind:m.ServerStreaming},getProperties:{name:"GetProperties",I:Dn,O:wt,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}};class PI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(NI),this.name=n,this.options=a}async*getAudio(e,n,a=0n,o={},i=this.callOptions){const r=new tf({name:this.name,codec:e,durationSeconds:n,previousTimestampNanoseconds:a,extra:p.fromJson(o)});this.options.requestLogger?.(r);const c=this.client.getAudio(r,i);for await(const l of c)l.audio&&(yield{audioData:l.audio.audioData,audioInfo:l.audio.audioInfo,startTimeNs:l.audio.startTimestampNanoseconds,endTimeNs:l.audio.endTimestampNanoseconds,sequence:l.audio.sequence,requestID:l.requestId})}async getProperties(e=this.callOptions){const n=new Dn({name:this.name});this.options.requestLogger?.(n);const a=await this.client.getProperties(n,e);return{supportedCodecs:a.supportedCodecs,sampleRateHz:a.sampleRateHz,numChannels:a.numChannels}}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const DI={MP3:"mp3",PCM16:"pcm16",PCM32:"pcm32",PCM32_FLOAT:"pcm32_float",AAC:"aac",OPUS:"opus",FLAC:"flac",WAV:"wav"},sf=s.makeMessageType("viam.component.audioout.v1.PlayRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"audio_data",kind:"scalar",T:12},{no:3,name:"audio_info",kind:"message",T:Ot},{no:99,name:"extra",kind:"message",T:p}]),AI={typeName:"viam.component.audioout.v1.AudioOutService",methods:{play:{name:"Play",I:sf,O:s.makeMessageType("viam.component.audioout.v1.PlayResponse",[]),kind:m.Unary},getProperties:{name:"GetProperties",I:Dn,O:wt,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}};class UI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(AI),this.name=n,this.options=a}async play(e,n,a={},o=this.callOptions){const i=new sf({name:this.name,audioData:e,audioInfo:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.play(i,o)}async getProperties(e=this.callOptions){const n=new Dn({name:this.name});this.options.requestLogger?.(n);const a=await this.client.getProperties(n,e);return{supportedCodecs:a.supportedCodecs,sampleRateHz:a.sampleRateHz,numChannels:a.numChannels}}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const{GetPropertiesResponse:qI}=lm;class LI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(pm),this.name=n,this.options=a}async getGeometries(e={},n=this.callOptions){const a=new L({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(a,n)).geometries}async moveStraight(e,n,a={},o=this.callOptions){const i=new Gt({name:this.name,mmPerSec:n,distanceMm:e?BigInt(e):void 0,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.moveStraight(i,o)}async spin(e,n,a={},o=this.callOptions){const i=new Bt({name:this.name,angleDeg:e,degsPerSec:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.spin(i,o)}async setPower(e,n,a={},o=this.callOptions){const i=new xt({name:this.name,linear:e,angular:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.setPower(i,o)}async setVelocity(e,n,a={},o=this.callOptions){const i=new Jt({name:this.name,linear:e,angular:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.setVelocity(i,o)}async stop(e={},n=this.callOptions){const a=new Ft({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.stop(a,n)}async isMoving(e=this.callOptions){const n=new zt({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}async getProperties(e={},n=this.callOptions){const a=new Oa({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),this.client.getProperties(a,n)}}const{ReadAnalogReaderResponse:GI,PowerMode:BI}=Em;class FI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Mm),this.name=n,this.options=a}async setGPIO(e,n,a={},o=this.callOptions){const i=new Vt({name:this.name,pin:e,high:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.setGPIO(i,o)}async getGPIO(e,n={},a=this.callOptions){const o=new $t({name:this.name,pin:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.getGPIO(o,a)).high}async getPWM(e,n={},a=this.callOptions){const o=new Yt({name:this.name,pin:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.pWM(o,a)).dutyCyclePct}async setPWM(e,n,a={},o=this.callOptions){const i=new Wt({name:this.name,pin:e,dutyCyclePct:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.setPWM(i,o)}async getPWMFrequency(e,n={},a=this.callOptions){const o=new jt({name:this.name,pin:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.pWMFrequency(o,a);return Number(i.frequencyHz)}async setPWMFrequency(e,n,a={},o=this.callOptions){const i=new Ht({name:this.name,pin:e,frequencyHz:n?BigInt(n):void 0,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.setPWMFrequency(i,o)}async readAnalogReader(e,n={},a=this.callOptions){const o=new Kt({boardName:this.name,analogReaderName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),this.client.readAnalogReader(o,a)}async writeAnalog(e,n,a={},o=this.callOptions){const i=new Xt({name:this.name,pin:e,value:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.writeAnalog(i,o)}async getDigitalInterruptValue(e,n={},a=this.callOptions){const o=new Qt({boardName:this.name,digitalInterruptName:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getDigitalInterruptValue(o,a);return Number(i.value)}async streamTicks(e,n,a={},o=this.callOptions){const i=new Zt({name:this.name,pinNames:e,extra:p.fromJson(a)});this.options.requestLogger?.(i);const r=this.client.streamTicks(i,o);for await(const c of r)n.push({pinName:c.pinName,high:c.high,time:c.time?Number(c.time):0})}async setPowerMode(e,n,a={},o=this.callOptions){const i=new es({name:this.name,powerMode:e,duration:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.setPowerMode(i,o)}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const ri=s.makeMessageType("viam.component.button.v1.PushRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),of=s.makeMessageType("viam.component.button.v1.PushResponse",[]),xI=Object.freeze(Object.defineProperty({__proto__:null,PushRequest:ri,PushResponse:of},Symbol.toStringTag,{value:"Module"})),JI={typeName:"viam.component.button.v1.ButtonService",methods:{push:{name:"Push",I:ri,O:of,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}};class zI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(JI),this.name=n,this.options=a}async push(e={},n=this.callOptions){const a=new ri({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.push(a,n)}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const VI=s.makeMessageType("google.api.HttpBody",()=>[{no:1,name:"content_type",kind:"scalar",T:9},{no:2,name:"data",kind:"scalar",T:12},{no:3,name:"extensions",kind:"message",T:K,repeated:!0}]),$I={typeName:"viam.component.camera.v1.CameraService",methods:{getImage:{name:"GetImage",I:Ru,O:_u,kind:m.Unary},getImages:{name:"GetImages",I:Po,O:Su,kind:m.Unary},renderFrame:{name:"RenderFrame",I:Iu,O:VI,kind:m.Unary},getPointCloud:{name:"GetPointCloud",I:Ao,O:Eu,kind:m.Unary},getProperties:{name:"GetProperties",I:Mu,O:bu,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}},YI="pointcloud/pcd";class WI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient($I),this.name=n,this.options=a}async getGeometries(e={},n=this.callOptions){const a=new L({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(a,n)).geometries}async getImages(e=[],n={},a=this.callOptions){const o=new Po({name:this.name,filterSourceNames:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getImages(o,a),r=i.images.map(l=>({sourceName:l.sourceName,image:l.image,mimeType:l.mimeType})),c={capturedAt:i.responseMetadata?.capturedAt??new S};return{images:r,metadata:c}}async getPointCloud(e={},n=this.callOptions){const a=new Ao({name:this.name,mimeType:YI,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPointCloud(a,n)).pointCloud}async getProperties(e=this.callOptions){const n=new Oa({name:this.name});return this.options.requestLogger?.(n),this.client.getProperties(n,e)}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}class jI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(ll),this.name=n,this.options=a}async discoverResources(e={},n=this.callOptions){const a=new ao({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.discoverResources(a,n)).discoveries}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const{GetPropertiesResponse:HI,PositionType:rf}=Cm;class KI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Nm),this.name=n,this.options=a}async resetPosition(e={},n=this.callOptions){const a=new ts({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.resetPosition(a,n)}async getProperties(e={},n=this.callOptions){const a=new ss({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),this.client.getProperties(a,n)}async getPosition(e=rf.UNSPECIFIED,n={},a=this.callOptions){const o=new as({name:this.name,positionType:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getPosition(o,a);return[i.value,i.positionType]}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}class XI{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Gm),this.name=n,this.options=a}async getGeometries(e={},n=this.callOptions){return $r(this.client.getGeometries,this.name,p.fromJson(e),n)}async getKinematics(e={},n=this.callOptions){return Vr(this.client.getKinematics,this.name,p.fromJson(e),n)}async getPosition(e={},n=this.callOptions){const a=new os({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPosition(a,n)).positionsMm}async moveToPosition(e,n,a={},o=this.callOptions){const i=new is({name:this.name,positionsMm:e,speedsMmPerSec:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.moveToPosition(i,o)}async home(e={},n=this.callOptions){const a=new rs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.home(a,n)).homed}async getLengths(e={},n=this.callOptions){const a=new ms({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getLengths(a,n)).lengthsMm}async stop(e={},n=this.callOptions){const a=new cs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.stop(a,n)}async isMoving(e=this.callOptions){const n=new ds({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const{Capsule:QI,GeoGeometry:ZI,GeoPoint:eE,GeometriesInFrame:nE,Geometry:aE,Orientation:tE,PointCloud:sE,Pose:oE,PoseInFrame:iE,RectangularPrism:rE,ResourceName:mE,Sphere:cE,Transform:dE,Vector3:lE,WorldState:pE}=Ct,mf=t=>{const{latitude:e,longitude:n}=t;return!(typeof e!="number"||typeof n!="number"||Number.isNaN(e)||Number.isNaN(n))};class uE{client;options;name;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient($u),this.name=n,this.options=a}async metadata(e={},n=this.callOptions){const a=new Ju({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),this.client.metadata(a,n)}async infer(e,n={},a=this.callOptions){const o=new xu({name:this.name,inputTensors:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),this.client.infer(o,a)}}class gE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(lc),this.name=n,this.options=a}async setPower(e,n={},a=this.callOptions){const o=new vs({name:this.name,powerPct:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setPower(o,a)}async goFor(e,n,a={},o=this.callOptions){const i=new hs({name:this.name,rpm:e,revolutions:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.goFor(i,o)}async goTo(e,n,a={},o=this.callOptions){const i=new fs({name:this.name,rpm:e,positionRevolutions:n,extra:p.fromJson(a)});this.options.requestLogger?.(i),await this.client.goTo(i,o)}async setRPM(e,n={},a=this.callOptions){const o=new Rs({name:this.name,rpm:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setRPM(o,a)}async resetZeroPosition(e,n={},a=this.callOptions){const o=new _s({name:this.name,offset:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.resetZeroPosition(o,a)}async stop(e={},n=this.callOptions){const a=new Is({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.stop(a,n)}async getProperties(e={},n=this.callOptions){const a=new Ms({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),{positionReporting:(await this.client.getProperties(a,n)).positionReporting}}async getPosition(e={},n=this.callOptions){const a=new Ss({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPosition(a,n)).position}async isPowered(e={},n=this.callOptions){const a=new Es({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.isPowered(a,n);return[o.isOn,o.powerPct]}async isMoving(e=this.callOptions){const n=new bs({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}class TE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Rc),this.name=n,this.options=a}async getLinearVelocity(e={},n=this.callOptions){const a=new Os({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const i=(await this.client.getLinearVelocity(a,n)).linearVelocity;if(!i)throw new Error("no linear velocity");return i}async getAngularVelocity(e={},n=this.callOptions){const a=new ws({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const i=(await this.client.getAngularVelocity(a,n)).angularVelocity;if(!i)throw new Error("no angular velocity");return i}async getCompassHeading(e={},n=this.callOptions){const a=new Cs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getCompassHeading(a,n)).value}async getOrientation(e={},n=this.callOptions){const a=new Ns({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const i=(await this.client.getOrientation(a,n)).orientation;if(!i)throw new Error("no orientation");return i}async getPosition(e={},n=this.callOptions){const a=new Ps({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),this.client.getPosition(a,n)}async getProperties(e={},n=this.callOptions){const a=new Ds({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),this.client.getProperties(a,n)}async getAccuracy(e={},n=this.callOptions){const a=new As({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),this.client.getAccuracy(a,n)}async getLinearAcceleration(e={},n=this.callOptions){const a=new Us({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const i=(await this.client.getLinearAcceleration(a,n)).linearAcceleration;if(!i)throw new Error("no linear acceleration");return i}async getReadings(e={},n=this.callOptions){const a=new Ze({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getReadings(a,n),i={};for(const r of Object.keys(o.readings)){const c=o.readings[r];c&&(i[r]=c.toJson())}return i}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const{GetAccuracyResponse:kE,GetPositionResponse:yE,GetPropertiesResponse:vE}=fc;class hE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Ec),this.name=n,this.options=a}async getVoltage(e={},n=this.callOptions){const a=new qs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getVoltage(a,n);return[o.volts,o.isAc]}async getCurrent(e={},n=this.callOptions){const a=new Ls({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getCurrent(a,n);return[o.amperes,o.isAc]}async getPower(e={},n=this.callOptions){const a=new Gs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPower(a,n)).watts}async getReadings(e={},n=this.callOptions){const a=new Ze({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getReadings(a,n),i={};for(const r of Object.keys(o.readings)){const c=o.readings[r];c&&(i[r]=c.toJson())}return i}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const cf={typeName:"viam.component.sensor.v1.SensorService",methods:{getReadings:{name:"GetReadings",I:Ze,O:ba,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}},fE=Object.freeze(Object.defineProperty({__proto__:null,SensorService:cf},Symbol.toStringTag,{value:"Module"}));class RE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(cf),this.name=n,this.options=a}async getReadings(e={},n=this.callOptions){const a=new Ze({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getReadings(a,n),i={};for(const r of Object.keys(o.readings)){const c=o.readings[r];c&&(i[r]=c.toJson())}return i}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const df=s.makeMessageType("proto.stream.v1.ListStreamsRequest",[]),lf=s.makeMessageType("proto.stream.v1.ListStreamsResponse",()=>[{no:1,name:"names",kind:"scalar",T:9,repeated:!0}]),mi=s.makeMessageType("proto.stream.v1.AddStreamRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),pf=s.makeMessageType("proto.stream.v1.AddStreamResponse",[]),ci=s.makeMessageType("proto.stream.v1.RemoveStreamRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),uf=s.makeMessageType("proto.stream.v1.RemoveStreamResponse",[]),di=s.makeMessageType("proto.stream.v1.Resolution",()=>[{no:1,name:"width",kind:"scalar",T:5},{no:2,name:"height",kind:"scalar",T:5}]),li=s.makeMessageType("proto.stream.v1.GetStreamOptionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),gf=s.makeMessageType("proto.stream.v1.GetStreamOptionsResponse",()=>[{no:1,name:"resolutions",kind:"message",T:di,repeated:!0}]),Xa=s.makeMessageType("proto.stream.v1.SetStreamOptionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"resolution",kind:"message",T:di}]),Tf=s.makeMessageType("proto.stream.v1.SetStreamOptionsResponse",[]),_E=Object.freeze(Object.defineProperty({__proto__:null,AddStreamRequest:mi,AddStreamResponse:pf,GetStreamOptionsRequest:li,GetStreamOptionsResponse:gf,ListStreamsRequest:df,ListStreamsResponse:lf,RemoveStreamRequest:ci,RemoveStreamResponse:uf,Resolution:di,SetStreamOptionsRequest:Xa,SetStreamOptionsResponse:Tf},Symbol.toStringTag,{value:"Module"})),SE={typeName:"proto.stream.v1.StreamService",methods:{listStreams:{name:"ListStreams",I:df,O:lf,kind:m.Unary},addStream:{name:"AddStream",I:mi,O:pf,kind:m.Unary},getStreamOptions:{name:"GetStreamOptions",I:li,O:gf,kind:m.Unary},setStreamOptions:{name:"SetStreamOptions",I:Xa,O:Tf,kind:m.Unary},removeStream:{name:"RemoveStream",I:ci,O:uf,kind:m.Unary}}},Vn=t=>t.replaceAll(":","+");class IE extends Yr{client;options;streams;constructor(e,n={}){super(),this.client=e.createServiceClient(SE),this.options=n,this.streams=new Set,e.on("track",a=>{this.emit("track",a)}),e.on(H.CONNECTED,()=>{for(const a of this.streams.values())this.add(a)})}async add(e){const n=new mi({name:Vn(e)});this.options.requestLogger?.(n);try{await this.client.addStream(n),this.streams.add(e)}catch{n.name=e,this.options.requestLogger?.(n),await this.client.addStream(n),this.streams.add(e)}}async remove(e){const n=new ci({name:Vn(e)});this.options.requestLogger?.(n);try{await this.client.removeStream(n),this.streams.delete(e)}catch{n.name=e,this.options.requestLogger?.(n),await this.client.removeStream(n),this.streams.delete(e)}}async getOptions(e){const n=async i=>{const r=new li({name:i});this.options.requestLogger?.(r);try{return(await this.client.getStreamOptions(r)).resolutions}catch{return[]}},a=Vn(e);let o=await n(a);return o.length>0||(o=await n(e)),o}async setOptions(e,n,a){const o=new Xa({name:Vn(e),resolution:{width:n,height:a}});this.options.requestLogger?.(o);try{await this.client.setStreamOptions(o)}catch{o.name=e,this.options.requestLogger?.(o),await this.client.setStreamOptions(o)}}async resetOptions(e){const n=new Xa({name:Vn(e)});this.options.requestLogger?.(n);try{await this.client.setStreamOptions(n)}catch{n.name=e,this.options.requestLogger?.(n),await this.client.setStreamOptions(n)}}STREAM_TIMEOUT=5e3;getStream=async e=>{const n=new Promise((a,o)=>{const i=r=>{const[c]=r.streams;c?c.id===e&&(this.off("track",i),a(c)):(this.off("track",i),o(new Error("Received track event with no streams")))};this.on("track",i),setTimeout(()=>{this.off("track",i),o(new Error(`Did not receive a stream after ${this.STREAM_TIMEOUT} ms`))},this.STREAM_TIMEOUT)});return await this.add(e),n}}const pi=s.makeMessageType("viam.component.switch.v1.SetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"position",kind:"scalar",T:13},{no:99,name:"extra",kind:"message",T:p}]),kf=s.makeMessageType("viam.component.switch.v1.SetPositionResponse",[]),ui=s.makeMessageType("viam.component.switch.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),yf=s.makeMessageType("viam.component.switch.v1.GetPositionResponse",()=>[{no:1,name:"position",kind:"scalar",T:13}]),gi=s.makeMessageType("viam.component.switch.v1.GetNumberOfPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),vf=s.makeMessageType("viam.component.switch.v1.GetNumberOfPositionsResponse",()=>[{no:1,name:"number_of_positions",kind:"scalar",T:13},{no:2,name:"labels",kind:"scalar",T:9,repeated:!0}]),EE=Object.freeze(Object.defineProperty({__proto__:null,GetNumberOfPositionsRequest:gi,GetNumberOfPositionsResponse:vf,GetPositionRequest:ui,GetPositionResponse:yf,SetPositionRequest:pi,SetPositionResponse:kf},Symbol.toStringTag,{value:"Module"})),ME={typeName:"viam.component.switch.v1.SwitchService",methods:{setPosition:{name:"SetPosition",I:pi,O:kf,kind:m.Unary},getPosition:{name:"GetPosition",I:ui,O:yf,kind:m.Unary},getNumberOfPositions:{name:"GetNumberOfPositions",I:gi,O:vf,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}};class bE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(ME),this.name=n,this.options=a}async setPosition(e,n={},a=this.callOptions){const o=new pi({name:this.name,position:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setPosition(o,a)}async getPosition(e={},n=this.callOptions){const a=new ui({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPosition(a,n)).position}async getNumberOfPositions(e={},n=this.callOptions){const a=new gi({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getNumberOfPositions(a,n);if(o.labels.length>0&&o.labels.length!==o.numberOfPositions)throw new Error("the number of labels does not match the number of positions");return[o.numberOfPositions,o.labels]}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}let OE=class{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(ls),this.name=n,this.options=a}async getGeometries(e={},n=this.callOptions){const a=new L({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(a,n)).geometries}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}};const wE={typeName:"viam.component.posetracker.v1.PoseTrackerService",methods:{getPoses:{name:"GetPoses",I:s.makeMessageType("viam.component.posetracker.v1.GetPosesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"body_names",kind:"scalar",T:9,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),O:s.makeMessageType("viam.component.posetracker.v1.GetPosesResponse",()=>[{no:1,name:"body_poses",kind:"map",K:9,V:{kind:"message",T:Ve}}]),kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},getGeometries:{name:"GetGeometries",I:L,O:Y,kind:m.Unary}}};class CE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(wE),this.name=n,this.options=a}async getGeometries(e={},n=this.callOptions){const a=new L({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(a,n)).geometries}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}class NE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient($m),this.name=n,this.options=a}async getGeometries(e={},n=this.callOptions){const a=new L({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(a,n)).geometries}async open(e={},n=this.callOptions){const a=new ps({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.open(a,n)}async grab(e={},n=this.callOptions){const a=new us({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.grab(a,n)}async stop(e={},n=this.callOptions){const a=new gs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.stop(a,n)}async isMoving(e=this.callOptions){const n=new Ts({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}class PE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(ec),this.name=n,this.options=a}async getEvents(e={},n=this.callOptions){const a=new ks({controller:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getEvents(a,n)).events}async triggerEvent(e,n={},a=this.callOptions){const o=new ys({controller:this.name,event:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.triggerEvent(o,a)}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const{Event:DE}=Zm,{CollisionSpecification:AE,Constraints:UE,GetPlanResponse:uM,LinearConstraint:qE,PseudolinearConstraint:gM,ListPlanStatusesResponse:LE,MotionConfiguration:GE,ObstacleDetector:BE,OrientationConstraint:FE,PlanState:TM}=Nl;class xE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Pl),this.name=n,this.options=a}async move(e,n,a,o,i={},r=this.callOptions){const c=new to({name:this.name,destination:e,componentName:n,worldState:a,constraints:o,extra:p.fromJson(i)});return this.options.requestLogger?.(c),(await this.client.move(c,r)).success}async moveOnMap(e,n,a,o,i,r={},c=this.callOptions){const l=new so({name:this.name,destination:e,componentName:n,slamServiceName:a,motionConfiguration:o,obstacles:i,extra:p.fromJson(r)});return this.options.requestLogger?.(l),(await this.client.moveOnMap(l,c)).executionId}async moveOnGlobe(e,n,a,o,i,r,c,l={},d=this.callOptions){const g=new io({name:this.name,destination:e,componentName:n,movementSensorName:a,heading:o,obstacles:i,boundingRegions:c,motionConfiguration:r,extra:p.fromJson(l)});return this.options.requestLogger?.(g),(await this.client.moveOnGlobe(g,d)).executionId}async stopPlan(e,n={},a=this.callOptions){const o=new mo({name:this.name,componentName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),await this.client.stopPlan(o,a),null}async getPlan(e,n,a,o={},i=this.callOptions){const r=new lo({name:this.name,componentName:e,lastPlanOnly:n,executionId:a,extra:p.fromJson(o)});return this.options.requestLogger?.(r),this.client.getPlan(r,i)}async listPlanStatuses(e,n={},a=this.callOptions){const o=new co({name:this.name,onlyActivePlans:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),this.client.listPlanStatuses(o,a)}async getPose(e,n,a,o={},i=this.callOptions){const r=new ro({name:this.name,componentName:e,destinationFrame:n,supplementalTransforms:a,extra:p.fromJson(o)});this.options.requestLogger?.(r);const l=(await this.client.getPose(r,i)).pose;if(!l)throw new Error("no pose");return l}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const Ti=s.makeMessageType("viam.service.datamanager.v1.SyncRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),hf=s.makeMessageType("viam.service.datamanager.v1.SyncResponse",[]),ki=s.makeMessageType("viam.service.datamanager.v1.UploadBinaryDataToDatasetsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"binary_data",kind:"scalar",T:12},{no:3,name:"tags",kind:"scalar",T:9,repeated:!0},{no:4,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:5,name:"mime_type",kind:"enum",T:s.getEnumType(zh)},{no:99,name:"extra",kind:"message",T:p}]),ff=s.makeMessageType("viam.service.datamanager.v1.UploadBinaryDataToDatasetsResponse",[]),JE=Object.freeze(Object.defineProperty({__proto__:null,SyncRequest:Ti,SyncResponse:hf,UploadBinaryDataToDatasetsRequest:ki,UploadBinaryDataToDatasetsResponse:ff},Symbol.toStringTag,{value:"Module"})),zE={typeName:"viam.service.datamanager.v1.DataManagerService",methods:{sync:{name:"Sync",I:Ti,O:hf,kind:m.Unary},doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary},uploadBinaryDataToDatasets:{name:"UploadBinaryDataToDatasets",I:ki,O:ff,kind:m.Unary}}};class VE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(zE),this.name=n,this.options=a}async sync(e={},n=this.callOptions){const a=new Ti({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.sync(a,n)}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}async uploadBinaryDataToDatasets(e,n,a,o,i={},r=this.callOptions){const c=new ki({name:this.name,binaryData:e,tags:n,datasetIds:a,mimeType:o,extra:p.fromJson(i)});this.options.requestLogger?.(c),await this.client.uploadBinaryDataToDatasets(c,r)}}class $E{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Yl),this.name=n,this.options=a}async getMode(e={},n=this.callOptions){const a=new go({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getMode(a,n)).mode}async setMode(e,n={},a=this.callOptions){const o=new To({name:this.name,mode:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setMode(o,a)}async getLocation(e={},n=this.callOptions){const a=new ko({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getLocation(a,n);if(!o.location)throw new Error("no location");if(!mf(o.location))throw new Error("invalid location");return o}async getWayPoints(e={},n=this.callOptions){const a=new yo({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getWaypoints(a,n)).waypoints}async addWayPoint(e,n={},a=this.callOptions){const o=new vo({name:this.name,location:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.addWaypoint(o,a)}async removeWayPoint(e,n={},a=this.callOptions){const o=new ho({name:this.name,id:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.removeWaypoint(o,a)}async getObstacles(e={},n=this.callOptions){const a=new fo({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getObstacles(a,n)).obstacles}async getPaths(e={},n=this.callOptions){const a=new Ro({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPaths(a,n)).paths}async getProperties(e=this.callOptions){const n=new _o({name:this.name});return this.options.requestLogger?.(n),this.client.getProperties(n,e)}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const{GetLocationResponse:YE,GetPropertiesResponse:WE,Mode:kM,Path:jE,Waypoint:HE}=$l;class KE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Cc),this.name=n,this.options=a}async move(e,n={},a=this.callOptions){const o=new Bs({name:this.name,angleDeg:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.move(o,a)}async getPosition(e={},n=this.callOptions){const a=new Fs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.getPosition(a,n)).positionDeg}async stop(e={},n=this.callOptions){const a=new xs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a),await this.client.stop(a,n)}async isMoving(e=this.callOptions){const n=new Js({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}class XE{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(np),this.name=n,this.options=a}async getPosition(e=this.callOptions){const n=new So({name:this.name});return this.options.requestLogger?.(n),this.client.getPosition(n,e)}async getPointCloudMap(e,n=this.callOptions){const a=new Io({name:this.name,returnEditedMap:e});this.options.requestLogger?.(a);const o=[],i=this.client.getPointCloudMap(a,n);for await(const r of i)o.push(r.pointCloudPcdChunk);return Rf(o)}async getInternalState(e=this.callOptions){const n=new Eo({name:this.name});this.options.requestLogger?.(n);const a=[],o=this.client.getInternalState(n,e);for await(const i of o)a.push(i.internalStateChunk);return Rf(a)}async getProperties(e=this.callOptions){const n=new Mo({name:this.name});return this.options.requestLogger?.(n),this.client.getProperties(n,e)}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const Rf=t=>{const e=t.reduce((o,i)=>o+i.length,0),n=new Uint8Array(e);let a=0;for(const o of t)n.set(o,a),a+=o.length;return n},{GetPositionResponse:QE,GetPropertiesResponse:ZE}=ep;class eM{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Fu),this.name=n,this.options=a}async getDetectionsFromCamera(e,n={},a=this.callOptions){const o=new qo({name:this.name,cameraName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.getDetectionsFromCamera(o,a)).detections}async getDetections(e,n,a,o,i={},r=this.callOptions){const c=new Uo({name:this.name,image:e,width:n?BigInt(n):void 0,height:a?BigInt(a):void 0,mimeType:o,extra:p.fromJson(i)});return this.options.requestLogger?.(c),(await this.client.getDetections(c,r)).detections}async getClassificationsFromCamera(e,n,a={},o=this.callOptions){const i=new Go({name:this.name,cameraName:e,n,extra:p.fromJson(a)});return this.options.requestLogger?.(i),(await this.client.getClassificationsFromCamera(i,o)).classifications}async getClassifications(e,n,a,o,i,r={},c=this.callOptions){const l=new Lo({name:this.name,image:e,width:n,height:a,mimeType:o,n:i,extra:p.fromJson(r)});return this.options.requestLogger?.(l),(await this.client.getClassifications(l,c)).classifications}async getObjectPointClouds(e,n={},a=this.callOptions){const o=new Bo({name:this.name,cameraName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.getObjectPointClouds(o,a)).objects}async getProperties(e={},n=this.callOptions){const a=new Fo({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=await this.client.getProperties(a,n);return{classificationsSupported:o.classificationsSupported,detectionsSupported:o.detectionsSupported,objectPointCloudsSupported:o.objectPointCloudsSupported}}async captureAllFromCamera(e,{returnImage:n,returnClassifications:a,returnDetections:o,returnObjectPointClouds:i},r={},c=this.callOptions){const l=new xo({name:this.name,cameraName:e,returnImage:n,returnClassifications:a,returnDetections:o,returnObjectPointClouds:i,extra:p.fromJson(r)});this.options.requestLogger?.(l);const d=await this.client.captureAllFromCamera(l,c);return{image:d.image,classifications:d.classifications,detections:d.detections,objectPointClouds:d.objects,extra:d.extra}}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const{Classification:nM,Detection:aM}=Bu,{PointCloudObject:tM}=Ct,_f=t=>Ra.UuidTool.toString([...t]),sM=t=>new Uint8Array(Ra.UuidTool.toBytes(t)),yi=t=>({...t,uuidString:_f(t.uuid)});class oM{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Ku),this.name=n,this.options=a}async listUUIDs(e={},n=this.callOptions){const a=new Wu({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(a),(await this.client.listUUIDs(a,n)).uuids.map(i=>_f(i))}async getTransform(e,n={},a=this.callOptions){const o=new ju({name:this.name,uuid:sM(e),extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getTransform(o,a);if(!i.transform)throw new Error("No transform returned from server");return yi(i.transform)}async*streamTransformChanges(e={},n=this.callOptions){const a=new Hu({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(a);const o=this.client.streamTransformChanges(a,n);for await(const i of o)i.transform&&(yield{...i,transform:yi(i.transform)})}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const Sf={typeName:"viam.service.generic.v1.GenericService",methods:{doCommand:{name:"DoCommand",I:P,O:D,kind:m.Unary}}},iM=Object.freeze(Object.defineProperty({__proto__:null,GenericService:Sf},Symbol.toStringTag,{value:"Module"}));class rM{client;name;options;callOptions={headers:{}};constructor(e,n,a={}){this.client=e.createServiceClient(Sf),this.name=n,this.options=a}async doCommand(e,n=this.callOptions){return A(this.client.doCommand,this.name,e,this.options,n)}}const mM="0.64.0";u.AnalogValue=GI,u.ArmClient=OI,u.ArmJointPositions=bI,u.AudioCodec=DI,u.AudioInClient=PI,u.AudioOutClient=UI,u.BaseClient=LI,u.BaseProperties=qI,u.BoardClient=FI,u.ButtonClient=zI,u.CameraClient=WI,u.Capsule=QI,u.Classification=nM,u.Client=We,u.CloudConfig=ii,u.CollisionSpecification=AE,u.ConnectError=C,u.ConnectionClosedError=ce,u.Constraints=UE,u.DataManagerClient=VE,u.Detection=aM,u.DiscoveryClient=jI,u.Duration=B,u.EncoderClient=KI,u.EncoderPositionType=rf,u.EncoderProperties=HI,u.GantryClient=XI,u.GenericComponentClient=OE,u.GenericServiceClient=rM,u.GeoGeometry=ZI,u.GeoPoint=eE,u.GeometriesInFrame=nE,u.Geometry=aE,u.GripperClient=NE,u.InputControllerClient=PE,u.InputControllerEvent=DE,u.LinearConstraint=qE,u.ListPlanStatusesResponse=LE,u.MLModelClient=uE,u.MachineConnectionEvent=H,u.ModelType=je,u.MotionClient=xE,u.MotionConfiguration=GE,u.MotorClient=gE,u.MovementSensorAccuracy=kE,u.MovementSensorClient=TE,u.MovementSensorPosition=yE,u.MovementSensorProperties=vE,u.NavigationClient=$E,u.NavigationPosition=YE,u.NavigationProperties=WE,u.ObstacleDetector=BE,u.Orientation=tE,u.OrientationConstraint=FE,u.Path=jE,u.PointCloud=sE,u.PointCloudObject=tM,u.Pose=oE,u.PoseInFrame=iE,u.PoseTrackerClient=CE,u.PowerMode=BI,u.PowerSensorClient=hE,u.RectangularPrism=rE,u.ResourceName=mE,u.RobotClient=We,u.SensorClient=RE,u.ServoClient=KE,u.SlamClient=XE,u.SlamPosition=QE,u.SlamProperties=ZE,u.Sphere=cE,u.StreamClient=IE,u.Struct=p,u.SwitchClient=bE,u.Timestamp=S,u.TrainingStatus=Ba,u.Transform=dE,u.TransformChangeType=Yu,u.Vector3=lE,u.VisionClient=eM,u.Waypoint=HE,u.WorldState=pE,u.WorldStateStoreClient=oM,u.addMetadata=o_,u.appApi=bS,u.appRobotApi=x_,u.armApi=am,u.baseApi=lm,u.billingApi=CS,u.boardApi=Em,u.buttonApi=xI,u.cameraApi=$_,u.commonApi=Ct,u.createRobotClient=eg,u.createViamClient=EI,u.dataApi=z_,u.dataManagerApi=JE,u.deleteMetadata=i_,u.disableDebugLogging=s_,u.discoveryApi=J_,u.doCommandFromClient=A,u.enableDebugLogging=t_,u.encoderApi=Cm,u.gantryApi=l_,u.genericComponentApi=p_,u.genericServiceApi=iM,u.gripperApi=u_,u.inputControllerApi=Zm,u.isValidGeoPoint=mf,u.mlTrainingApi=MS,u.motionApi=Nl,u.motorApi=T_,u.movementSensorApi=fc,u.navigationApi=$l,u.powerSensorApi=k_,u.provisioningApi=_I,u.robotApi=P_,u.sensorApi=fE,u.servoApi=v_,u.slamApi=ep,u.streamApi=_E,u.switchApi=EE,u.transformWithUUID=yi,u.version=mM,u.visionApi=Bu,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
|