pianoverse/pb.js
2024-12-28 03:19:00 +02:00

2 lines
45 KiB
JavaScript

"use strict";var pianoverse=(()=>{var pe=Object.defineProperty;var ct=Object.getOwnPropertyDescriptor;var ft=Object.getOwnPropertyNames;var lt=Object.prototype.hasOwnProperty;var mt=(t,e)=>{for(var n in e)pe(t,n,{get:e[n],enumerable:!0})},dt=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ft(e))!lt.call(t,r)&&r!==n&&pe(t,r,{get:()=>e[r],enumerable:!(s=ct(e,r))||s.enumerable});return t};var pt=t=>dt(pe({},"__esModule",{value:!0}),t);var Vt={};mt(Vt,{ClientMessage:()=>Fe,ClientMessage_Ban:()=>oe,ClientMessage_EventType:()=>me,ClientMessage_Heartbeat:()=>A,ClientMessage_Room:()=>ie,Move:()=>V,NotificationLevel:()=>le,Press:()=>D,Profile:()=>x,Release:()=>C,Role:()=>$,ServerMessage:()=>Pe,ServerMessage_Chat:()=>L,ServerMessage_EventType:()=>de,ServerMessage_Notification:()=>fe,ServerMessage_Room:()=>ae,ServerMessage_Sustain:()=>ce,ServerMessage_Welcome:()=>ue});function h(t,e){if(!t)throw new Error(e)}var ht=34028234663852886e22,gt=-34028234663852886e22,bt=4294967295,kt=2147483647,yt=-2147483648;function P(t){if(typeof t!="number")throw new Error("invalid int 32: "+typeof t);if(!Number.isInteger(t)||t>kt||t<yt)throw new Error("invalid int 32: "+t)}function E(t){if(typeof t!="number")throw new Error("invalid uint 32: "+typeof t);if(!Number.isInteger(t)||t>bt||t<0)throw new Error("invalid uint 32: "+t)}function q(t){if(typeof t!="number")throw new Error("invalid float 32: "+typeof t);if(Number.isFinite(t)&&(t>ht||t<gt))throw new Error("invalid float 32: "+t)}var Me=Symbol("@bufbuild/protobuf/enum-type");function Be(t){let e=t[Me];return h(e,"missing enum type on enum object"),e}function he(t,e,n,s){t[Me]=ge(e,n.map(r=>({no:r.no,name:r.name,localName:t[r.no]})),s)}function ge(t,e,n){let s=Object.create(null),r=Object.create(null),i=[];for(let o of e){let a=Je(o);i.push(a),s[o.name]=a,r[o.no]=a}return{typeName:t,values:i,findName(o){return s[o]},findNumber(o){return r[o]}}}function Ee(t,e,n){let s={};for(let r of e){let i=Je(r);s[i.localName]=i.no,s[i.no]=i.localName}return he(s,t,e,n),s}function Je(t){return"localName"in t?t:Object.assign(Object.assign({},t),{localName:t.name})}var b=class{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,n){let s=this.getType(),r=s.runtime.bin,i=r.makeReadOptions(n);return r.readMessage(this,i.readerFactory(e),e.byteLength,i),this}fromJson(e,n){let s=this.getType(),r=s.runtime.json,i=r.makeReadOptions(n);return r.readMessage(s,e,i,this),this}fromJsonString(e,n){let s;try{s=JSON.parse(e)}catch(r){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${r instanceof Error?r.message:String(r)}`)}return this.fromJson(s,n)}toBinary(e){let n=this.getType(),s=n.runtime.bin,r=s.makeWriteOptions(e),i=r.writerFactory();return s.writeMessage(this,i,r),i.finish()}toJson(e){let n=this.getType(),s=n.runtime.json,r=s.makeWriteOptions(e);return s.writeMessage(this,r)}toJsonString(e){var n;let s=this.toJson(e);return JSON.stringify(s,null,(n=e?.prettySpaces)!==null&&n!==void 0?n:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}};function Re(t,e,n,s){var r;let i=(r=s?.localName)!==null&&r!==void 0?r:e.substring(e.lastIndexOf(".")+1),o={[i]:function(a){t.util.initFields(this),t.util.initPartial(a,this)}}[i];return Object.setPrototypeOf(o.prototype,new b),Object.assign(o,{runtime:t,typeName:e,fields:t.util.newFieldList(n),fromBinary(a,c){return new o().fromBinary(a,c)},fromJson(a,c){return new o().fromJson(a,c)},fromJsonString(a,c){return new o().fromJsonString(a,c)},equals(a,c){return t.util.equals(o,a,c)}}),o}function Ae(){let t=0,e=0;for(let s=0;s<28;s+=7){let r=this.buf[this.pos++];if(t|=(r&127)<<s,!(r&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 s=3;s<=31;s+=7){let r=this.buf[this.pos++];if(e|=(r&127)<<s,!(r&128))return this.assertBounds(),[t,e]}throw new Error("invalid varint")}function W(t,e,n){for(let i=0;i<28;i=i+7){let o=t>>>i,a=!(!(o>>>7)&&e==0),c=(a?o|128:o)&255;if(n.push(c),!a)return}let s=t>>>28&15|(e&7)<<4,r=!!(e>>3);if(n.push((r?s|128:s)&255),!!r){for(let i=3;i<31;i=i+7){let o=e>>>i,a=!!(o>>>7),c=(a?o|128:o)&255;if(n.push(c),!a)return}n.push(e>>>31&1)}}var G=4294967296;function be(t){let e=t[0]==="-";e&&(t=t.slice(1));let n=1e6,s=0,r=0;function i(o,a){let c=Number(t.slice(o,a));r*=n,s=s*n+c,s>=G&&(r=r+(s/G|0),s=s%G)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),e?Ve(s,r):ye(s,r)}function Le(t,e){let n=ye(t,e),s=n.hi&2147483648;s&&(n=Ve(n.lo,n.hi));let r=ke(n.lo,n.hi);return s?"-"+r:r}function ke(t,e){if({lo:t,hi:e}=wt(t,e),e<=2097151)return String(G*e+t);let n=t&16777215,s=(t>>>24|e<<8)&16777215,r=e>>16&65535,i=n+s*6777216+r*6710656,o=s+r*8147497,a=r*2,c=1e7;return i>=c&&(o+=Math.floor(i/c),i%=c),o>=c&&(a+=Math.floor(o/c),o%=c),a.toString()+Ue(o)+Ue(i)}function wt(t,e){return{lo:t>>>0,hi:e>>>0}}function ye(t,e){return{lo:t|0,hi:e|0}}function Ve(t,e){return e=~e,t?t=~t+1:e+=1,ye(t,e)}var Ue=t=>{let e=String(t);return"0000000".slice(e.length)+e};function we(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 De(){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 Nt(){let 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")){let r=BigInt("-9223372036854775808"),i=BigInt("9223372036854775807"),o=BigInt("0"),a=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(c){let d=typeof c=="bigint"?c:BigInt(c);if(d>i||d<r)throw new Error(`int64 invalid: ${c}`);return d},uParse(c){let d=typeof c=="bigint"?c:BigInt(c);if(d>a||d<o)throw new Error(`uint64 invalid: ${c}`);return d},enc(c){return t.setBigInt64(0,this.parse(c),!0),{lo:t.getInt32(0,!0),hi:t.getInt32(4,!0)}},uEnc(c){return t.setBigInt64(0,this.uParse(c),!0),{lo:t.getInt32(0,!0),hi:t.getInt32(4,!0)}},dec(c,d){return t.setInt32(0,c,!0),t.setInt32(4,d,!0),t.getBigInt64(0,!0)},uDec(c,d){return t.setInt32(0,c,!0),t.setInt32(4,d,!0),t.getBigUint64(0,!0)}}}let n=r=>h(/^-?[0-9]+$/.test(r),`int64 invalid: ${r}`),s=r=>h(/^[0-9]+$/.test(r),`uint64 invalid: ${r}`);return{zero:"0",supported:!1,parse(r){return typeof r!="string"&&(r=r.toString()),n(r),r},uParse(r){return typeof r!="string"&&(r=r.toString()),s(r),r},enc(r){return typeof r!="string"&&(r=r.toString()),n(r),be(r)},uEnc(r){return typeof r!="string"&&(r=r.toString()),s(r),be(r)},dec(r,i){return Le(r,i)},uDec(r,i){return ke(r,i)}}}var y=Nt();var u;(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"})(u||(u={}));var w;(function(t){t[t.BIGINT=0]="BIGINT",t[t.STRING=1]="STRING"})(w||(w={}));function S(t,e,n){if(e===n)return!0;if(t==u.BYTES){if(!(e instanceof Uint8Array)||!(n instanceof Uint8Array)||e.length!==n.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==n[s])return!1;return!0}switch(t){case u.UINT64:case u.FIXED64:case u.INT64:case u.SFIXED64:case u.SINT64:return e==n}return!1}function N(t,e){switch(t){case u.BOOL:return!1;case u.UINT64:case u.FIXED64:case u.INT64:case u.SFIXED64:case u.SINT64:return e==0?y.zero:"0";case u.DOUBLE:case u.FLOAT:return 0;case u.BYTES:return new Uint8Array(0);case u.STRING:return"";default:return 0}}function X(t,e){switch(t){case u.BOOL:return e===!1;case u.STRING:return e==="";case u.BYTES:return e instanceof Uint8Array&&!e.byteLength;default:return e==0}}var k;(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"})(k||(k={}));var v=class{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 r=0;r<this.chunks.length;r++)e+=this.chunks[r].length;let n=new Uint8Array(e),s=0;for(let r=0;r<this.chunks.length;r++)n.set(this.chunks[r],s),s+=this.chunks[r].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(E(e);e>127;)this.buf.push(e&127|128),e=e>>>7;return this.buf.push(e),this}int32(e){return P(e),we(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){q(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){E(e);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,e,!0),this.raw(n)}sfixed32(e){P(e);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,e,!0),this.raw(n)}sint32(e){return P(e),e=(e<<1^e>>31)>>>0,we(e,this.buf),this}sfixed64(e){let n=new Uint8Array(8),s=new DataView(n.buffer),r=y.enc(e);return s.setInt32(0,r.lo,!0),s.setInt32(4,r.hi,!0),this.raw(n)}fixed64(e){let n=new Uint8Array(8),s=new DataView(n.buffer),r=y.uEnc(e);return s.setInt32(0,r.lo,!0),s.setInt32(4,r.hi,!0),this.raw(n)}int64(e){let n=y.enc(e);return W(n.lo,n.hi,this.buf),this}sint64(e){let n=y.enc(e),s=n.hi>>31,r=n.lo<<1^s,i=(n.hi<<1|n.lo>>>31)^s;return W(r,i,this.buf),this}uint64(e){let n=y.uEnc(e);return W(n.lo,n.hi,this.buf),this}},H=class{constructor(e,n){this.varint64=Ae,this.uint32=De,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,s=e&7;if(n<=0||s<0||s>5)throw new Error("illegal tag: field no "+n+" wire type "+s);return[n,s]}skip(e,n){let s=this.pos;switch(e){case k.Varint:for(;this.buf[this.pos++]&128;);break;case k.Bit64:this.pos+=4;case k.Bit32:this.pos+=4;break;case k.LengthDelimited:let r=this.uint32();this.pos+=r;break;case k.StartGroup:for(;;){let[i,o]=this.tag();if(o===k.EndGroup){if(n!==void 0&&i!==n)throw new Error("invalid end group tag");break}this.skip(o,i)}break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(s,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 y.dec(...this.varint64())}uint64(){return y.uDec(...this.varint64())}sint64(){let[e,n]=this.varint64(),s=-(e&1);return e=(e>>>1|(n&1)<<31)^s,n=n>>>1^s,y.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 y.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return y.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 Ce(t,e,n,s){let r;return{typeName:e,extendee:n,get field(){if(!r){let i=typeof s=="function"?s():s;i.name=e.split(".").pop(),i.jsonName=`[${e}]`,r=t.util.newFieldList([i]).list()[0]}return r},runtime:t}}function K(t){let e=t.field.localName,n=Object.create(null);return n[e]=Tt(t),[n,()=>n[e]]}function Tt(t){let 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 N(e.T,e.L);case"message":let n=e.T,s=new n;return n.fieldWrapper?n.fieldWrapper.unwrapField(s):s;case"map":throw"map fields are not allowed to be extensions"}}function $e(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)}var O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Y=[];for(let t=0;t<O.length;t++)Y[O[t].charCodeAt(0)]=t;Y[45]=O.indexOf("+");Y[95]=O.indexOf("/");var Ne={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),s=0,r=0,i,o=0;for(let a=0;a<t.length;a++){if(i=Y[t.charCodeAt(a)],i===void 0)switch(t[a]){case"=":r=0;case`
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(r){case 0:o=i,r=1;break;case 1:n[s++]=o<<2|(i&48)>>4,o=i,r=2;break;case 2:n[s++]=(o&15)<<4|(i&60)>>2,o=i,r=3;break;case 3:n[s++]=(o&3)<<6|i,r=0;break}}if(r==1)throw Error("invalid base64 string.");return n.subarray(0,s)},enc(t){let e="",n=0,s,r=0;for(let i=0;i<t.length;i++)switch(s=t[i],n){case 0:e+=O[s>>2],r=(s&3)<<4,n=1;break;case 1:e+=O[r|s>>4],r=(s&15)<<2,n=2;break;case 2:e+=O[r|s>>6],e+=O[s&63],n=0;break}return n&&(e+=O[r],e+="=",n==1&&(e+="=")),e}};function qe(t,e,n){We(e,t);let s=e.runtime.bin.makeReadOptions(n),r=$e(t.getType().runtime.bin.listUnknownFields(t),e.field),[i,o]=K(e);for(let a of r)e.runtime.bin.readField(i,s.readerFactory(a.data),e.field,a.wireType,s);return o()}function Ge(t,e,n,s){We(e,t);let r=e.runtime.bin.makeReadOptions(s),i=e.runtime.bin.makeWriteOptions(s);if(Te(t,e)){let d=t.getType().runtime.bin.listUnknownFields(t).filter(l=>l.no!=e.field.no);t.getType().runtime.bin.discardUnknownFields(t);for(let l of d)t.getType().runtime.bin.onUnknownField(t,l.no,l.wireType,l.data)}let o=i.writerFactory(),a=e.field;!a.opt&&!a.repeated&&(a.kind=="enum"||a.kind=="scalar")&&(a=Object.assign(Object.assign({},e.field),{opt:!0})),e.runtime.bin.writeField(a,n,o,i);let c=r.readerFactory(o.finish());for(;c.pos<c.len;){let[d,l]=c.tag(),p=c.skip(l,d);t.getType().runtime.bin.onUnknownField(t,d,l,p)}}function Te(t,e){let n=t.getType();return e.extendee.typeName===n.typeName&&!!n.runtime.bin.listUnknownFields(t).find(s=>s.no==e.field.no)}function We(t,e){h(t.extendee.typeName==e.getType().typeName,`extension ${t.typeName} can only be applied to message ${t.extendee.typeName}`)}function j(t,e){let 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:!X(t.T,e[n]);case"message":return e[n]!==void 0;case"map":return Object.keys(e[n]).length>0}}function Ie(t,e){let n=t.localName,s=!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]=s?t.T.values[0].no:void 0;break;case"scalar":e[n]=s?N(t.T,t.L):void 0;break;case"message":e[n]=void 0;break}}function T(t,e){if(t===null||typeof t!="object"||!Object.getOwnPropertyNames(b.prototype).every(s=>s in t&&typeof t[s]=="function"))return!1;let 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 Z(t,e){return T(e)||!t.fieldWrapper?e:t.fieldWrapper.wrapField(e)}var bn={"google.protobuf.DoubleValue":u.DOUBLE,"google.protobuf.FloatValue":u.FLOAT,"google.protobuf.Int64Value":u.INT64,"google.protobuf.UInt64Value":u.UINT64,"google.protobuf.Int32Value":u.INT32,"google.protobuf.UInt32Value":u.UINT32,"google.protobuf.BoolValue":u.BOOL,"google.protobuf.StringValue":u.STRING,"google.protobuf.BytesValue":u.BYTES};var Xe={ignoreUnknownFields:!1},ve={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function It(t){return t?Object.assign(Object.assign({},Xe),t):Xe}function St(t){return t?Object.assign(Object.assign({},ve),t):ve}var _=Symbol(),z=Symbol();function Ye(){return{makeReadOptions:It,makeWriteOptions:St,readMessage(t,e,n,s){if(e==null||Array.isArray(e)||typeof e!="object")throw new Error(`cannot decode message ${t.typeName} from JSON: ${I(e)}`);s=s??new t;let r=new Map,i=n.typeRegistry;for(let[o,a]of Object.entries(e)){let c=t.fields.findJsonName(o);if(c){if(c.oneof){if(a===null&&c.kind=="scalar")continue;let d=r.get(c.oneof);if(d!==void 0)throw new Error(`cannot decode message ${t.typeName} from JSON: multiple keys for oneof "${c.oneof.name}" present: "${d}", "${o}"`);r.set(c.oneof,o)}He(s,a,c,n,t)}else{let d=!1;if(i?.findExtension&&o.startsWith("[")&&o.endsWith("]")){let l=i.findExtension(o.substring(1,o.length-1));if(l&&l.extendee.typeName==t.typeName){d=!0;let[p,g]=K(l);He(p,a,l.field,n,l),Ge(s,l,g(),n)}}if(!d&&!n.ignoreUnknownFields)throw new Error(`cannot decode message ${t.typeName} from JSON: key "${o}" is unknown`)}}return s},writeMessage(t,e){let n=t.getType(),s={},r;try{for(r of n.fields.byNumber()){if(!j(r,t)){if(r.req)throw"required field not set";if(!e.emitDefaultValues||!xt(r))continue}let o=r.oneof?t[r.oneof.localName].value:t[r.localName],a=Ke(r,o,e);a!==void 0&&(s[e.useProtoFieldName?r.name:r.jsonName]=a)}let i=e.typeRegistry;if(i?.findExtensionFor)for(let o of n.runtime.bin.listUnknownFields(t)){let a=i.findExtensionFor(n.typeName,o.no);if(a&&Te(t,a)){let c=qe(t,a,e),d=Ke(a.field,c,e);d!==void 0&&(s[a.field.jsonName]=d)}}}catch(i){let o=r?`cannot encode field ${n.typeName}.${r.name} to JSON`:`cannot encode message ${n.typeName} to JSON`,a=i instanceof Error?i.message:String(i);throw new Error(o+(a.length>0?`: ${a}`:""))}return s},readScalar(t,e,n){return J(t,e,n??w.BIGINT,!0)},writeScalar(t,e,n){if(e!==void 0&&(n||X(t,e)))return Q(t,e)},debug:I}}function I(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 He(t,e,n,s,r){let i=n.localName;if(n.repeated){if(h(n.kind!="map"),e===null)return;if(!Array.isArray(e))throw new Error(`cannot decode field ${r.typeName}.${n.name} from JSON: ${I(e)}`);let o=t[i];for(let a of e){if(a===null)throw new Error(`cannot decode field ${r.typeName}.${n.name} from JSON: ${I(a)}`);switch(n.kind){case"message":o.push(n.T.fromJson(a,s));break;case"enum":let c=Se(n.T,a,s.ignoreUnknownFields,!0);c!==z&&o.push(c);break;case"scalar":try{o.push(J(n.T,a,n.L,!0))}catch(d){let l=`cannot decode field ${r.typeName}.${n.name} from JSON: ${I(a)}`;throw d instanceof Error&&d.message.length>0&&(l+=`: ${d.message}`),new Error(l)}break}}}else if(n.kind=="map"){if(e===null)return;if(typeof e!="object"||Array.isArray(e))throw new Error(`cannot decode field ${r.typeName}.${n.name} from JSON: ${I(e)}`);let o=t[i];for(let[a,c]of Object.entries(e)){if(c===null)throw new Error(`cannot decode field ${r.typeName}.${n.name} from JSON: map value null`);let d;try{d=Ot(n.K,a)}catch(l){let p=`cannot decode map key for field ${r.typeName}.${n.name} from JSON: ${I(e)}`;throw l instanceof Error&&l.message.length>0&&(p+=`: ${l.message}`),new Error(p)}switch(n.V.kind){case"message":o[d]=n.V.T.fromJson(c,s);break;case"enum":let l=Se(n.V.T,c,s.ignoreUnknownFields,!0);l!==z&&(o[d]=l);break;case"scalar":try{o[d]=J(n.V.T,c,w.BIGINT,!0)}catch(p){let g=`cannot decode map value for field ${r.typeName}.${n.name} from JSON: ${I(e)}`;throw p instanceof Error&&p.message.length>0&&(g+=`: ${p.message}`),new Error(g)}break}}}else switch(n.oneof&&(t=t[n.oneof.localName]={case:i},i="value"),n.kind){case"message":let o=n.T;if(e===null&&o.typeName!="google.protobuf.Value")return;let a=t[i];T(a)?a.fromJson(e,s):(t[i]=a=o.fromJson(e,s),o.fieldWrapper&&!n.oneof&&(t[i]=o.fieldWrapper.unwrapField(a)));break;case"enum":let c=Se(n.T,e,s.ignoreUnknownFields,!1);switch(c){case _:Ie(n,t);break;case z:break;default:t[i]=c;break}break;case"scalar":try{let d=J(n.T,e,n.L,!1);switch(d){case _:Ie(n,t);break;default:t[i]=d;break}}catch(d){let l=`cannot decode field ${r.typeName}.${n.name} from JSON: ${I(e)}`;throw d instanceof Error&&d.message.length>0&&(l+=`: ${d.message}`),new Error(l)}break}}function Ot(t,e){if(t===u.BOOL)switch(e){case"true":e=!0;break;case"false":e=!1;break}return J(t,e,w.BIGINT,!0).toString()}function J(t,e,n,s){if(e===null)return s?N(t,n):_;switch(t){case u.DOUBLE:case u.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;let r=Number(e);if(Number.isNaN(r)||!Number.isFinite(r))break;return t==u.FLOAT&&q(r),r;case u.INT32:case u.FIXED32:case u.SFIXED32:case u.SINT32:case u.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==u.UINT32||t==u.FIXED32?E(i):P(i),i;case u.INT64:case u.SFIXED64:case u.SINT64:if(typeof e!="number"&&typeof e!="string")break;let o=y.parse(e);return n?o.toString():o;case u.FIXED64:case u.UINT64:if(typeof e!="number"&&typeof e!="string")break;let a=y.uParse(e);return n?a.toString():a;case u.BOOL:if(typeof e!="boolean")break;return e;case u.STRING:if(typeof e!="string")break;try{encodeURIComponent(e)}catch{throw new Error("invalid UTF8")}return e;case u.BYTES:if(e==="")return new Uint8Array(0);if(typeof e!="string")break;return Ne.dec(e)}throw new Error}function Se(t,e,n,s){if(e===null)return t.typeName=="google.protobuf.NullValue"?0:s?t.values[0].no:_;switch(typeof e){case"number":if(Number.isInteger(e))return e;break;case"string":let r=t.findName(e);if(r!==void 0)return r.no;if(n)return z;break}throw new Error(`cannot decode enum ${t.typeName} from JSON: ${I(e)}`)}function xt(t){return t.repeated||t.kind=="map"?!0:!(t.oneof||t.kind=="message"||t.opt||t.req)}function Ke(t,e,n){if(t.kind=="map"){h(typeof e=="object"&&e!=null);let s={},r=Object.entries(e);switch(t.V.kind){case"scalar":for(let[o,a]of r)s[o.toString()]=Q(t.V.T,a);break;case"message":for(let[o,a]of r)s[o.toString()]=a.toJson(n);break;case"enum":let i=t.V.T;for(let[o,a]of r)s[o.toString()]=Oe(i,a,n.enumAsInteger);break}return n.emitDefaultValues||r.length>0?s:void 0}if(t.repeated){h(Array.isArray(e));let s=[];switch(t.kind){case"scalar":for(let r=0;r<e.length;r++)s.push(Q(t.T,e[r]));break;case"enum":for(let r=0;r<e.length;r++)s.push(Oe(t.T,e[r],n.enumAsInteger));break;case"message":for(let r=0;r<e.length;r++)s.push(e[r].toJson(n));break}return n.emitDefaultValues||s.length>0?s:void 0}switch(t.kind){case"scalar":return Q(t.T,e);case"enum":return Oe(t.T,e,n.enumAsInteger);case"message":return Z(t.T,e).toJson(n)}}function Oe(t,e,n){var s;if(h(typeof e=="number"),t.typeName=="google.protobuf.NullValue")return null;if(n)return e;let r=t.findNumber(e);return(s=r?.name)!==null&&s!==void 0?s:e}function Q(t,e){switch(t){case u.INT32:case u.SFIXED32:case u.SINT32:case u.FIXED32:case u.UINT32:return h(typeof e=="number"),e;case u.FLOAT:case u.DOUBLE:return h(typeof e=="number"),Number.isNaN(e)?"NaN":e===Number.POSITIVE_INFINITY?"Infinity":e===Number.NEGATIVE_INFINITY?"-Infinity":e;case u.STRING:return h(typeof e=="string"),e;case u.BOOL:return h(typeof e=="boolean"),e;case u.UINT64:case u.FIXED64:case u.INT64:case u.SFIXED64:case u.SINT64:return h(typeof e=="bigint"||typeof e=="string"||typeof e=="number"),e.toString();case u.BYTES:return h(e instanceof Uint8Array),Ne.enc(e)}}var M=Symbol("@bufbuild/protobuf/unknown-fields"),je={readUnknownFields:!0,readerFactory:t=>new H(t)},Ze={writeUnknownFields:!0,writerFactory:()=>new v};function Ft(t){return t?Object.assign(Object.assign({},je),t):je}function Pt(t){return t?Object.assign(Object.assign({},Ze),t):Ze}function et(){return{makeReadOptions:Ft,makeWriteOptions:Pt,listUnknownFields(t){var e;return(e=t[M])!==null&&e!==void 0?e:[]},discardUnknownFields(t){delete t[M]},writeUnknownFields(t,e){let s=t[M];if(s)for(let r of s)e.tag(r.no,r.wireType).raw(r.data)},onUnknownField(t,e,n,s){let r=t;Array.isArray(r[M])||(r[M]=[]),r[M].push({no:e,wireType:n,data:s})},readMessage(t,e,n,s,r){let i=t.getType(),o=r?e.len:e.pos+n,a,c;for(;e.pos<o&&([a,c]=e.tag(),!(r===!0&&c==k.EndGroup));){let d=i.fields.find(a);if(!d){let l=e.skip(c,a);s.readUnknownFields&&this.onUnknownField(t,a,c,l);continue}ze(t,e,d,c,s)}if(r&&(c!=k.EndGroup||a!==n))throw new Error("invalid end group tag")},readField:ze,writeMessage(t,e,n){let s=t.getType();for(let r of s.fields.byNumber()){if(!j(r,t)){if(r.req)throw new Error(`cannot encode field ${s.typeName}.${r.name} to binary: required field not set`);continue}let i=r.oneof?t[r.oneof.localName].value:t[r.localName];Qe(r,i,e,n)}return n.writeUnknownFields&&this.writeUnknownFields(t,e),e},writeField(t,e,n,s){e!==void 0&&Qe(t,e,n,s)}}}function ze(t,e,n,s,r){let{repeated:i,localName:o}=n;switch(n.oneof&&(t=t[n.oneof.localName],t.case!=o&&delete t.value,t.case=o,o="value"),n.kind){case"scalar":case"enum":let a=n.kind=="enum"?u.INT32:n.T,c=te;if(n.kind=="scalar"&&n.L>0&&(c=Bt),i){let g=t[o];if(s==k.LengthDelimited&&a!=u.STRING&&a!=u.BYTES){let F=e.uint32()+e.pos;for(;e.pos<F;)g.push(c(e,a))}else g.push(c(e,a))}else t[o]=c(e,a);break;case"message":let d=n.T;i?t[o].push(ee(e,new d,r,n)):T(t[o])?ee(e,t[o],r,n):(t[o]=ee(e,new d,r,n),d.fieldWrapper&&!n.oneof&&!n.repeated&&(t[o]=d.fieldWrapper.unwrapField(t[o])));break;case"map":let[l,p]=Mt(n,e,r);t[o][l]=p;break}}function ee(t,e,n,s){let r=e.getType().runtime.bin,i=s?.delimited;return r.readMessage(e,t,i?s.no:t.uint32(),n,i),e}function Mt(t,e,n){let s=e.uint32(),r=e.pos+s,i,o;for(;e.pos<r;){let[a]=e.tag();switch(a){case 1:i=te(e,t.K);break;case 2:switch(t.V.kind){case"scalar":o=te(e,t.V.T);break;case"enum":o=e.int32();break;case"message":o=ee(e,new t.V.T,n,void 0);break}break}}if(i===void 0&&(i=N(t.K,w.BIGINT)),typeof i!="string"&&typeof i!="number"&&(i=i.toString()),o===void 0)switch(t.V.kind){case"scalar":o=N(t.V.T,w.BIGINT);break;case"enum":o=t.V.T.values[0].no;break;case"message":o=new t.V.T;break}return[i,o]}function Bt(t,e){let n=te(t,e);return typeof n=="bigint"?n.toString():n}function te(t,e){switch(e){case u.STRING:return t.string();case u.BOOL:return t.bool();case u.DOUBLE:return t.double();case u.FLOAT:return t.float();case u.INT32:return t.int32();case u.INT64:return t.int64();case u.UINT64:return t.uint64();case u.FIXED64:return t.fixed64();case u.BYTES:return t.bytes();case u.FIXED32:return t.fixed32();case u.SFIXED32:return t.sfixed32();case u.SFIXED64:return t.sfixed64();case u.SINT64:return t.sint64();case u.UINT32:return t.uint32();case u.SINT32:return t.sint32()}}function Qe(t,e,n,s){h(e!==void 0);let r=t.repeated;switch(t.kind){case"scalar":case"enum":let i=t.kind=="enum"?u.INT32:t.T;if(r)if(h(Array.isArray(e)),t.packed)Jt(n,i,t.no,e);else for(let o of e)R(n,i,t.no,o);else R(n,i,t.no,e);break;case"message":if(r){h(Array.isArray(e));for(let o of e)_e(n,s,t,o)}else _e(n,s,t,e);break;case"map":h(typeof e=="object"&&e!=null);for(let[o,a]of Object.entries(e))Et(n,s,t,o,a);break}}function Et(t,e,n,s,r){t.tag(n.no,k.LengthDelimited),t.fork();let i=s;switch(n.K){case u.INT32:case u.FIXED32:case u.UINT32:case u.SFIXED32:case u.SINT32:i=Number.parseInt(s);break;case u.BOOL:h(s=="true"||s=="false"),i=s=="true";break}switch(R(t,n.K,1,i),n.V.kind){case"scalar":R(t,n.V.T,2,r);break;case"enum":R(t,u.INT32,2,r);break;case"message":h(r!==void 0),t.tag(2,k.LengthDelimited).bytes(r.toBinary(e));break}t.join()}function _e(t,e,n,s){let r=Z(n.T,s);n.delimited?t.tag(n.no,k.StartGroup).raw(r.toBinary(e)).tag(n.no,k.EndGroup):t.tag(n.no,k.LengthDelimited).bytes(r.toBinary(e))}function R(t,e,n,s){h(s!==void 0);let[r,i]=tt(e);t.tag(n,r)[i](s)}function Jt(t,e,n,s){if(!s.length)return;t.tag(n,k.LengthDelimited).fork();let[,r]=tt(e);for(let i=0;i<s.length;i++)t[r](s[i]);t.join()}function tt(t){let e=k.Varint;switch(t){case u.BYTES:case u.STRING:e=k.LengthDelimited;break;case u.DOUBLE:case u.FIXED64:case u.SFIXED64:e=k.Bit64;break;case u.FIXED32:case u.SFIXED32:case u.FLOAT:e=k.Bit32;break}let n=u[t].toLowerCase();return[e,n]}function nt(){return{setEnumType:he,initPartial(t,e){if(t===void 0)return;let n=e.getType();for(let s of n.fields.byMember()){let r=s.localName,i=e,o=t;if(o[r]!=null)switch(s.kind){case"oneof":let a=o[r].case;if(a===void 0)continue;let c=s.findField(a),d=o[r].value;c&&c.kind=="message"&&!T(d,c.T)?d=new c.T(d):c&&c.kind==="scalar"&&c.T===u.BYTES&&(d=U(d)),i[r]={case:a,value:d};break;case"scalar":case"enum":let l=o[r];s.T===u.BYTES&&(l=s.repeated?l.map(U):U(l)),i[r]=l;break;case"map":switch(s.V.kind){case"scalar":case"enum":if(s.V.T===u.BYTES)for(let[B,F]of Object.entries(o[r]))i[r][B]=U(F);else Object.assign(i[r],o[r]);break;case"message":let g=s.V.T;for(let B of Object.keys(o[r])){let F=o[r][B];g.fieldWrapper||(F=new g(F)),i[r][B]=F}break}break;case"message":let p=s.T;if(s.repeated)i[r]=o[r].map(g=>T(g,p)?g:new p(g));else{let g=o[r];p.fieldWrapper?p.typeName==="google.protobuf.BytesValue"?i[r]=U(g):i[r]=g:i[r]=T(g,p)?g:new p(g)}break}}},equals(t,e,n){return e===n?!0:!e||!n?!1:t.fields.byMember().every(s=>{let r=e[s.localName],i=n[s.localName];if(s.repeated){if(r.length!==i.length)return!1;switch(s.kind){case"message":return r.every((o,a)=>s.T.equals(o,i[a]));case"scalar":return r.every((o,a)=>S(s.T,o,i[a]));case"enum":return r.every((o,a)=>S(u.INT32,o,i[a]))}throw new Error(`repeated cannot contain ${s.kind}`)}switch(s.kind){case"message":return s.T.equals(r,i);case"enum":return S(u.INT32,r,i);case"scalar":return S(s.T,r,i);case"oneof":if(r.case!==i.case)return!1;let o=s.findField(r.case);if(o===void 0)return!0;switch(o.kind){case"message":return o.T.equals(r.value,i.value);case"enum":return S(u.INT32,r.value,i.value);case"scalar":return S(o.T,r.value,i.value)}throw new Error(`oneof cannot contain ${o.kind}`);case"map":let a=Object.keys(r).concat(Object.keys(i));switch(s.V.kind){case"message":let c=s.V.T;return a.every(l=>c.equals(r[l],i[l]));case"enum":return a.every(l=>S(u.INT32,r[l],i[l]));case"scalar":let d=s.V.T;return a.every(l=>S(d,r[l],i[l]))}break}})},clone(t){let e=t.getType(),n=new e,s=n;for(let r of e.fields.byMember()){let i=t[r.localName],o;if(r.repeated)o=i.map(ne);else if(r.kind=="map"){o=s[r.localName];for(let[a,c]of Object.entries(i))o[a]=ne(c)}else r.kind=="oneof"?o=r.findField(i.case)?{case:i.case,value:ne(i.value)}:{case:void 0}:o=ne(i);s[r.localName]=o}for(let r of e.runtime.bin.listUnknownFields(t))e.runtime.bin.onUnknownField(s,r.no,r.wireType,r.data);return n}}}function ne(t){if(t===void 0)return t;if(T(t))return t.clone();if(t instanceof Uint8Array){let e=new Uint8Array(t.byteLength);return e.set(t),e}return t}function U(t){return t instanceof Uint8Array?t:new Uint8Array(t)}function rt(t,e,n){return{syntax:t,json:Ye(),bin:et(),util:Object.assign(Object.assign({},nt()),{newFieldList:e,initFields:n}),makeMessageType(s,r,i){return Re(this,s,r,i)},makeEnum:Ee,makeEnumType:ge,getEnumType:Be,makeExtension(s,r,i){return Ce(this,s,r,i)}}}var re=class{constructor(e,n){this._fields=e,this._normalizer=n}findJsonName(e){if(!this.jsonNames){let n={};for(let s of this.list())n[s.jsonName]=n[s.name]=s;this.jsonNames=n}return this.jsonNames[e]}find(e){if(!this.numbers){let n={};for(let s of this.list())n[s.no]=s;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=[];let e=this.members,n;for(let s of this.list())s.oneof?s.oneof!==n&&(n=s.oneof,e.push(n)):e.push(s)}return this.members}};function xe(t,e){let n=ot(t);return e?n:Lt(At(n))}function st(t){return xe(t,!1)}var it=ot;function ot(t){let e=!1,n=[];for(let s=0;s<t.length;s++){let r=t.charAt(s);switch(r){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(r),e=!1;break;default:e&&(e=!1,r=r.toUpperCase()),n.push(r);break}}return n.join("")}var Rt=new Set(["constructor","toString","toJSON","valueOf"]),Ut=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),at=t=>`${t}$`,At=t=>Ut.has(t)?at(t):t,Lt=t=>Rt.has(t)?at(t):t;var se=class{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=st(e)}addField(e){h(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 ut(t,e){var n,s,r,i,o,a;let c=[],d;for(let l of typeof t=="function"?t():t){let p=l;if(p.localName=xe(l.name,l.oneof!==void 0),p.jsonName=(n=l.jsonName)!==null&&n!==void 0?n:it(l.name),p.repeated=(s=l.repeated)!==null&&s!==void 0?s:!1,l.kind=="scalar"&&(p.L=(r=l.L)!==null&&r!==void 0?r:w.BIGINT),p.delimited=(i=l.delimited)!==null&&i!==void 0?i:!1,p.req=(o=l.req)!==null&&o!==void 0?o:!1,p.opt=(a=l.opt)!==null&&a!==void 0?a:!1,l.packed===void 0&&(e?p.packed=l.kind=="enum"||l.kind=="scalar"&&l.T!=u.BYTES&&l.T!=u.STRING:p.packed=!1),l.oneof!==void 0){let g=typeof l.oneof=="string"?l.oneof:l.oneof.name;(!d||d.name!=g)&&(d=new se(g)),p.oneof=d,d.addField(p)}c.push(p)}return c}var m=rt("proto3",t=>new re(t,e=>ut(e,!0)),t=>{for(let e of t.getType().fields.byMember()){if(e.opt)continue;let n=e.localName,s=t;if(e.repeated){s[n]=[];continue}switch(e.kind){case"oneof":s[n]={case:void 0};break;case"enum":s[n]=0;break;case"map":s[n]={};break;case"scalar":s[n]=N(e.T,e.L);break;case"message":break}}});var $=(s=>(s[s.USER=0]="USER",s[s.MOD=1]="MOD",s[s.DEV=2]="DEV",s))($||{});m.util.setEnumType($,"pianoverse.Role",[{no:0,name:"USER"},{no:1,name:"MOD"},{no:2,name:"DEV"}]);var le=(i=>(i[i.INFO=0]="INFO",i[i.SUCCESS=1]="SUCCESS",i[i.WARNING=2]="WARNING",i[i.ERROR=3]="ERROR",i[i.UNRECOGNIZED=-1]="UNRECOGNIZED",i))(le||{});m.util.setEnumType(le,"pianoverse.NotificationLevel",[{no:0,name:"INFO"},{no:1,name:"SUCCESS"},{no:2,name:"WARNING"},{no:3,name:"ERROR"},{no:-1,name:"UNRECOGNIZED"}]);var Fe=class t extends b{chown="";event=0;ping;room;profile;chat="";move;mute="";unmute="";kick="";press;release;sustain=!1;heartbeat;ban;ipban="";mod="";unmod="";constructor(e){super(),m.util.initPartial(e,this)}static runtime=m;static typeName="pianoverse.ClientMessage";static fields=m.util.newFieldList(()=>[{no:1,name:"chown",kind:"scalar",T:9},{no:2,name:"event",kind:"enum",T:m.getEnumType(me)},{no:3,name:"ping",kind:"message",T:A},{no:4,name:"room",kind:"message",T:ie},{no:5,name:"profile",kind:"message",T:x},{no:6,name:"chat",kind:"scalar",T:9},{no:7,name:"move",kind:"message",T:V},{no:8,name:"mute",kind:"scalar",T:9},{no:9,name:"unmute",kind:"scalar",T:9},{no:10,name:"kick",kind:"scalar",T:9},{no:11,name:"press",kind:"message",T:D},{no:12,name:"release",kind:"message",T:C},{no:13,name:"sustain",kind:"scalar",T:8},{no:14,name:"heartbeat",kind:"message",T:A},{no:15,name:"ban",kind:"message",T:oe},{no:16,name:"ipban",kind:"scalar",T:9},{no:17,name:"mod",kind:"scalar",T:9},{no:18,name:"unmod",kind:"scalar",T:9}]);static fromBinary(e,n){return new t().fromBinary(e,n)}static fromJson(e,n){return new t().fromJson(e,n)}static fromJsonString(e,n){return new t().fromJsonString(e,n)}static equals(e,n){return m.util.equals(t,e,n)}},me=(f=>(f[f.CHOWN=0]="CHOWN",f[f.PING=1]="PING",f[f.ROOM=2]="ROOM",f[f.PROFILE=3]="PROFILE",f[f.CHAT=4]="CHAT",f[f.MOVE=5]="MOVE",f[f.MUTE=6]="MUTE",f[f.UNMUTE=7]="UNMUTE",f[f.KICK=8]="KICK",f[f.PRESS=9]="PRESS",f[f.RELEASE=10]="RELEASE",f[f.SUSTAIN=11]="SUSTAIN",f[f.HEARTBEAT=12]="HEARTBEAT",f[f.BAN=13]="BAN",f[f.IPBAN=14]="IPBAN",f[f.MOD=15]="MOD",f[f.UNMOD=16]="UNMOD",f))(me||{});m.util.setEnumType(me,"pianoverse.ClientMessage.EventType",[{no:0,name:"CHOWN"},{no:1,name:"PING"},{no:2,name:"ROOM"},{no:3,name:"PROFILE"},{no:4,name:"CHAT"},{no:5,name:"MOVE"},{no:6,name:"MUTE"},{no:7,name:"UNMUTE"},{no:8,name:"KICK"},{no:9,name:"PRESS"},{no:10,name:"RELEASE"},{no:11,name:"SUSTAIN"},{no:12,name:"HEARTBEAT"},{no:13,name:"BAN"},{no:14,name:"IPBAN"},{no:15,name:"MOD"},{no:16,name:"UNMOD"}]);var ie=class t extends b{room="";private=!1;constructor(e){super(),m.util.initPartial(e,this)}static runtime=m;static typeName="pianoverse.ClientMessage.Room";static fields=m.util.newFieldList(()=>[{no:1,name:"room",kind:"scalar",T:9},{no:2,name:"private",kind:"scalar",T:8}]);static fromBinary(e,n){return new t().fromBinary(e,n)}static fromJson(e,n){return new t().fromJson(e,n)}static fromJsonString(e,n){return new t().fromJsonString(e,n)}static equals(e,n){return m.util.equals(t,e,n)}},A=class t extends b{constructor(e){super(),m.util.initPartial(e,this)}static runtime=m;static typeName="pianoverse.ClientMessage.Heartbeat";static fields=m.util.newFieldList(()=>[]);static fromBinary(e,n){return new t().fromBinary(e,n)}static fromJson(e,n){return new t().fromJson(e,n)}static fromJsonString(e,n){return new t().fromJsonString(e,n)}static equals(e,n){return m.util.equals(t,e,n)}},oe=class t extends b{id="";minutes=0;constructor(e){super(),m.util.initPartial(e,this)}static runtime=m;static typeName="pianoverse.ClientMessage.Ban";static fields=m.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"minutes",kind:"scalar",T:13}]);static fromBinary(e,n){return new t().fromBinary(e,n)}static fromJson(e,n){return new t().fromJson(e,n)}static fromJsonString(e,n){return new t().fromJsonString(e,n)}static equals(e,n){return m.util.equals(t,e,n)}},Pe=class t extends b{clear;event=0;pong;chat;rooms=[];welcome;move;press;release;sustain;profile;join;leave="";ratelimit=0;popup="";chown="";notification;token="";constructor(e){super(),m.util.initPartial(e,this)}static runtime=m;static typeName="pianoverse.ServerMessage";static fields=m.util.newFieldList(()=>[{no:1,name:"clear",kind:"message",T:x},{no:2,name:"event",kind:"enum",T:m.getEnumType(de)},{no:3,name:"pong",kind:"message",T:x},{no:4,name:"chat",kind:"message",T:L},{no:5,name:"rooms",kind:"message",T:ae,repeated:!0},{no:6,name:"welcome",kind:"message",T:ue},{no:7,name:"move",kind:"message",T:V},{no:8,name:"press",kind:"message",T:D},{no:9,name:"release",kind:"message",T:C},{no:10,name:"sustain",kind:"message",T:ce},{no:11,name:"profile",kind:"message",T:x},{no:12,name:"join",kind:"message",T:x},{no:13,name:"leave",kind:"scalar",T:9},{no:14,name:"ratelimit",kind:"scalar",T:13},{no:15,name:"popup",kind:"scalar",T:9},{no:16,name:"chown",kind:"scalar",T:9},{no:17,name:"notification",kind:"message",T:fe},{no:18,name:"token",kind:"scalar",T:9}]);static fromBinary(e,n){return new t().fromBinary(e,n)}static fromJson(e,n){return new t().fromJson(e,n)}static fromJsonString(e,n){return new t().fromJsonString(e,n)}static equals(e,n){return m.util.equals(t,e,n)}},de=(f=>(f[f.CLEAR=0]="CLEAR",f[f.PONG=1]="PONG",f[f.CHAT=2]="CHAT",f[f.ROOMS=3]="ROOMS",f[f.WELCOME=4]="WELCOME",f[f.MOVE=5]="MOVE",f[f.PRESS=6]="PRESS",f[f.RELEASE=7]="RELEASE",f[f.SUSTAIN=8]="SUSTAIN",f[f.PROFILE=9]="PROFILE",f[f.JOIN=10]="JOIN",f[f.LEAVE=11]="LEAVE",f[f.RATELIMIT=12]="RATELIMIT",f[f.POPUP=13]="POPUP",f[f.CHOWN=14]="CHOWN",f[f.NOTIFICATION=15]="NOTIFICATION",f[f.TOKEN=16]="TOKEN",f))(de||{});m.util.setEnumType(de,"pianoverse.ServerMessage.EventType",[{no:0,name:"CLEAR"},{no:1,name:"PONG"},{no:2,name:"CHAT"},{no:3,name:"ROOMS"},{no:4,name:"WELCOME"},{no:5,name:"MOVE"},{no:6,name:"PRESS"},{no:7,name:"RELEASE"},{no:8,name:"SUSTAIN"},{no:9,name:"PROFILE"},{no:10,name:"JOIN"},{no:11,name:"LEAVE"},{no:12,name:"RATELIMIT"},{no:13,name:"POPUP"},{no:14,name:"CHOWN"},{no:15,name:"NOTIFICATION"},{no:16,name:"TOKEN"}]);var L=class t extends b{id="";content="";name="";color="";constructor(e){super(),m.util.initPartial(e,this)}static runtime=m;static typeName="pianoverse.ServerMessage.Chat";static fields=m.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"content",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"color",kind:"scalar",T:9}]);static fromBinary(e,n){return new t().fromBinary(e,n)}static fromJson(e,n){return new t().fromJson(e,n)}static fromJsonString(e,n){return new t().fromJsonString(e,n)}static equals(e,n){return m.util.equals(t,e,n)}},ae=class t extends b{room="";count=0;constructor(e){super(),m.util.initPartial(e,this)}static runtime=m;static typeName="pianoverse.ServerMessage.Room";static fields=m.util.newFieldList(()=>[{no:1,name:"room",kind:"scalar",T:9},{no:2,name:"count",kind:"scalar",T:13}]);static fromBinary(e,n){return new t().fromBinary(e,n)}static fromJson(e,n){return new t().fromJson(e,n)}static fromJsonString(e,n){return new t().fromJsonString(e,n)}static equals(e,n){return m.util.equals(t,e,n)}},ue=class t extends b{id="";name="";color="";room="";owner="";chat=[];role=0;private=!1;constructor(e){super(),m.util.initPartial(e,this)}static runtime=m;static typeName="pianoverse.ServerMessage.Welcome";static fields=m.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"color",kind:"scalar",T:9},{no:4,name:"room",kind:"scalar",T:9},{no:5,name:"owner",kind:"scalar",T:9},{no:6,name:"chat",kind:"message",T:L,repeated:!0},{no:7,name:"role",kind:"enum",T:m.getEnumType($)},{no:8,name:"private",kind:"scalar",T:8}]);static fromBinary(e,n){return new t().fromBinary(e,n)}static fromJson(e,n){return new t().fromJson(e,n)}static fromJsonString(e,n){return new t().fromJsonString(e,n)}static equals(e,n){return m.util.equals(t,e,n)}},ce=class t extends b{id="";enabled=!1;constructor(e){super(),m.util.initPartial(e,this)}static runtime=m;static typeName="pianoverse.ServerMessage.Sustain";static fields=m.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"enabled",kind:"scalar",T:8}]);static fromBinary(e,n){return new t().fromBinary(e,n)}static fromJson(e,n){return new t().fromJson(e,n)}static fromJsonString(e,n){return new t().fromJsonString(e,n)}static equals(e,n){return m.util.equals(t,e,n)}},fe=class t extends b{level=0;title="";text="";timeout=0;constructor(e){super(),m.util.initPartial(e,this)}static runtime=m;static typeName="pianoverse.ServerMessage.Notification";static fields=m.util.newFieldList(()=>[{no:1,name:"level",kind:"enum",T:m.getEnumType(le)},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"text",kind:"scalar",T:9},{no:4,name:"timeout",kind:"scalar",T:13}]);static fromBinary(e,n){return new t().fromBinary(e,n)}static fromJson(e,n){return new t().fromJson(e,n)}static fromJsonString(e,n){return new t().fromJsonString(e,n)}static equals(e,n){return m.util.equals(t,e,n)}},x=class t extends b{id="";name="";color="";role=0;muted=!1;x=0;y=0;constructor(e){super(),m.util.initPartial(e,this)}static runtime=m;static typeName="pianoverse.Profile";static fields=m.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"color",kind:"scalar",T:9},{no:4,name:"role",kind:"enum",T:m.getEnumType($)},{no:5,name:"muted",kind:"scalar",T:8},{no:6,name:"x",kind:"scalar",T:2},{no:7,name:"y",kind:"scalar",T:2}]);static fromBinary(e,n){return new t().fromBinary(e,n)}static fromJson(e,n){return new t().fromJson(e,n)}static fromJsonString(e,n){return new t().fromJsonString(e,n)}static equals(e,n){return m.util.equals(t,e,n)}},V=class t extends b{id="";x=0;y=0;constructor(e){super(),m.util.initPartial(e,this)}static runtime=m;static typeName="pianoverse.Move";static fields=m.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"x",kind:"scalar",T:2},{no:3,name:"y",kind:"scalar",T:2}]);static fromBinary(e,n){return new t().fromBinary(e,n)}static fromJson(e,n){return new t().fromJson(e,n)}static fromJsonString(e,n){return new t().fromJsonString(e,n)}static equals(e,n){return m.util.equals(t,e,n)}},D=class t extends b{id="";key=0;vel=0;constructor(e){super(),m.util.initPartial(e,this)}static runtime=m;static typeName="pianoverse.Press";static fields=m.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:13},{no:3,name:"vel",kind:"scalar",T:13}]);static fromBinary(e,n){return new t().fromBinary(e,n)}static fromJson(e,n){return new t().fromJson(e,n)}static fromJsonString(e,n){return new t().fromJsonString(e,n)}static equals(e,n){return m.util.equals(t,e,n)}},C=class t extends b{id="";key=0;constructor(e){super(),m.util.initPartial(e,this)}static runtime=m;static typeName="pianoverse.Release";static fields=m.util.newFieldList(()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:13}]);static fromBinary(e,n){return new t().fromBinary(e,n)}static fromJson(e,n){return new t().fromJson(e,n)}static fromJsonString(e,n){return new t().fromJsonString(e,n)}static equals(e,n){return m.util.equals(t,e,n)}};return pt(Vt);})();