From 41a8514c0017238dc5d2ffa467de639a9740c875 Mon Sep 17 00:00:00 2001 From: jeff Date: Sun, 3 Jan 2021 13:46:40 +0000 Subject: [PATCH] Move typescript stuff to static/scripts --- .gitignore | 2 +- package.json | 6 +- .../scripts/{ts => }/_proto/cofd_api_pb.d.ts | 0 static/scripts/{ts => }/_proto/cofd_api_pb.js | 0 .../{ts => }/_proto/cofd_api_pb_service.d.ts | 0 .../{ts => }/_proto/cofd_api_pb_service.js | 0 static/scripts/{ts => }/_proto/cofd_pb.d.ts | 0 static/scripts/{ts => }/_proto/cofd_pb.js | 0 .../{ts => }/_proto/cofd_pb_service.d.ts | 0 .../{ts => }/_proto/cofd_pb_service.js | 0 .../build/_proto_cofd_api_pb_js.bundle.js | 4825 +++++++++++++++++ static/scripts/build/blah.bundle.js | 23 + static/scripts/build/index.bundle.js | 21 + static/scripts/build/runtime.bundle.js | 146 + ...ogle-protobuf_google-protobuf_js.bundle.js | 537 ++ static/scripts/{ts => }/src/blah.ts | 0 static/scripts/{ts => }/src/index.ts | 0 static/scripts/{ts => }/tsconfig.json | 0 static/scripts/{ts => }/webpack.config.js | 4 +- 19 files changed, 5558 insertions(+), 6 deletions(-) rename static/scripts/{ts => }/_proto/cofd_api_pb.d.ts (100%) rename static/scripts/{ts => }/_proto/cofd_api_pb.js (100%) rename static/scripts/{ts => }/_proto/cofd_api_pb_service.d.ts (100%) rename static/scripts/{ts => }/_proto/cofd_api_pb_service.js (100%) rename static/scripts/{ts => }/_proto/cofd_pb.d.ts (100%) rename static/scripts/{ts => }/_proto/cofd_pb.js (100%) rename static/scripts/{ts => }/_proto/cofd_pb_service.d.ts (100%) rename static/scripts/{ts => }/_proto/cofd_pb_service.js (100%) create mode 100644 static/scripts/build/_proto_cofd_api_pb_js.bundle.js create mode 100644 static/scripts/build/blah.bundle.js create mode 100644 static/scripts/build/index.bundle.js create mode 100644 static/scripts/build/runtime.bundle.js create mode 100644 static/scripts/build/vendors-node_modules_google-protobuf_google-protobuf_js.bundle.js rename static/scripts/{ts => }/src/blah.ts (100%) rename static/scripts/{ts => }/src/index.ts (100%) rename static/scripts/{ts => }/tsconfig.json (100%) rename static/scripts/{ts => }/webpack.config.js (93%) diff --git a/.gitignore b/.gitignore index e0a8deb..d0db3e4 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,5 @@ todo.org *.sqlite* *.sqlite.* node_modules -static/scripts/ts/build +static/scripts/dist static/templates/* diff --git a/package.json b/package.json index a3d7d11..cb314ec 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,9 @@ "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "webpack-dev": "cd static/scripts/ts && webpack serve --watch --inline --port 8081 --host 0.0.0.0 --output-path=./build", - "build:protobuf": "mkdir -p static/scripts/ts/_proto && protoc --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts -I ./proto --js_out=import_style=commonjs,binary:./static/scripts/ts/_proto --ts_out=service=grpc-web:./static/scripts/ts/_proto ./proto/*.proto", - "build:webpack": "cd static/scripts/ts && webpack" + "webpack-dev": "cd static/scripts && webpack serve --watch --inline --port 8081 --host 0.0.0.0 --output-path=./build", + "build:protobuf": "mkdir -p static/scripts/_proto && protoc --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts -I ./proto --js_out=import_style=commonjs,binary:./static/scripts/ts/_proto --ts_out=service=grpc-web:./static/scripts/ts/_proto ./proto/*.proto", + "build:webpack": "cd static/scripts && webpack" }, "repository": { "type": "git", diff --git a/static/scripts/ts/_proto/cofd_api_pb.d.ts b/static/scripts/_proto/cofd_api_pb.d.ts similarity index 100% rename from static/scripts/ts/_proto/cofd_api_pb.d.ts rename to static/scripts/_proto/cofd_api_pb.d.ts diff --git a/static/scripts/ts/_proto/cofd_api_pb.js b/static/scripts/_proto/cofd_api_pb.js similarity index 100% rename from static/scripts/ts/_proto/cofd_api_pb.js rename to static/scripts/_proto/cofd_api_pb.js diff --git a/static/scripts/ts/_proto/cofd_api_pb_service.d.ts b/static/scripts/_proto/cofd_api_pb_service.d.ts similarity index 100% rename from static/scripts/ts/_proto/cofd_api_pb_service.d.ts rename to static/scripts/_proto/cofd_api_pb_service.d.ts diff --git a/static/scripts/ts/_proto/cofd_api_pb_service.js b/static/scripts/_proto/cofd_api_pb_service.js similarity index 100% rename from static/scripts/ts/_proto/cofd_api_pb_service.js rename to static/scripts/_proto/cofd_api_pb_service.js diff --git a/static/scripts/ts/_proto/cofd_pb.d.ts b/static/scripts/_proto/cofd_pb.d.ts similarity index 100% rename from static/scripts/ts/_proto/cofd_pb.d.ts rename to static/scripts/_proto/cofd_pb.d.ts diff --git a/static/scripts/ts/_proto/cofd_pb.js b/static/scripts/_proto/cofd_pb.js similarity index 100% rename from static/scripts/ts/_proto/cofd_pb.js rename to static/scripts/_proto/cofd_pb.js diff --git a/static/scripts/ts/_proto/cofd_pb_service.d.ts b/static/scripts/_proto/cofd_pb_service.d.ts similarity index 100% rename from static/scripts/ts/_proto/cofd_pb_service.d.ts rename to static/scripts/_proto/cofd_pb_service.d.ts diff --git a/static/scripts/ts/_proto/cofd_pb_service.js b/static/scripts/_proto/cofd_pb_service.js similarity index 100% rename from static/scripts/ts/_proto/cofd_pb_service.js rename to static/scripts/_proto/cofd_pb_service.js diff --git a/static/scripts/build/_proto_cofd_api_pb_js.bundle.js b/static/scripts/build/_proto_cofd_api_pb_js.bundle.js new file mode 100644 index 0000000..3712473 --- /dev/null +++ b/static/scripts/build/_proto_cofd_api_pb_js.bundle.js @@ -0,0 +1,4825 @@ +(self["webpackChunk"] = self["webpackChunk"] || []).push([["_proto_cofd_api_pb_js"],{ + +/***/ "./_proto/cofd_api_pb.js": +/*!*******************************!*\ + !*** ./_proto/cofd_api_pb.js ***! + \*******************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +// source: cofd_api.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = __webpack_require__(/*! google-protobuf */ "../../node_modules/google-protobuf/google-protobuf.js"); +var goog = jspb; +var global = Function('return this')(); + +var cofd_pb = __webpack_require__(/*! ./cofd_pb.js */ "./_proto/cofd_pb.js"); +goog.object.extend(proto, cofd_pb); +goog.exportSymbol('proto.models.proto.cofd.api.Attributes', null, global); +goog.exportSymbol('proto.models.proto.cofd.api.BasicInfo', null, global); +goog.exportSymbol('proto.models.proto.cofd.api.Condition', null, global); +goog.exportSymbol('proto.models.proto.cofd.api.SkillSpecializationsUpdate', null, global); +goog.exportSymbol('proto.models.proto.cofd.api.SkillUpdate', null, global); +goog.exportSymbol('proto.models.proto.cofd.api.Skills', null, global); +goog.exportSymbol('proto.models.proto.cofd.api.UpdateAttributeRequest', null, global); +goog.exportSymbol('proto.models.proto.cofd.api.UpdateSkillValueRequest', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.models.proto.cofd.api.BasicInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.models.proto.cofd.api.BasicInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.models.proto.cofd.api.BasicInfo.displayName = 'proto.models.proto.cofd.api.BasicInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.models.proto.cofd.api.Attributes = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.models.proto.cofd.api.Attributes, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.models.proto.cofd.api.Attributes.displayName = 'proto.models.proto.cofd.api.Attributes'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.models.proto.cofd.api.UpdateAttributeRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.models.proto.cofd.api.UpdateAttributeRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.models.proto.cofd.api.UpdateAttributeRequest.displayName = 'proto.models.proto.cofd.api.UpdateAttributeRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.models.proto.cofd.api.Skills = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.models.proto.cofd.api.Skills.repeatedFields_, null); +}; +goog.inherits(proto.models.proto.cofd.api.Skills, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.models.proto.cofd.api.Skills.displayName = 'proto.models.proto.cofd.api.Skills'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.models.proto.cofd.api.SkillUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.models.proto.cofd.api.SkillUpdate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.models.proto.cofd.api.SkillUpdate.displayName = 'proto.models.proto.cofd.api.SkillUpdate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.models.proto.cofd.api.UpdateSkillValueRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.models.proto.cofd.api.UpdateSkillValueRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.models.proto.cofd.api.UpdateSkillValueRequest.displayName = 'proto.models.proto.cofd.api.UpdateSkillValueRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.models.proto.cofd.api.SkillSpecializationsUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.models.proto.cofd.api.SkillSpecializationsUpdate.repeatedFields_, null); +}; +goog.inherits(proto.models.proto.cofd.api.SkillSpecializationsUpdate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.models.proto.cofd.api.SkillSpecializationsUpdate.displayName = 'proto.models.proto.cofd.api.SkillSpecializationsUpdate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.models.proto.cofd.api.Condition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.models.proto.cofd.api.Condition, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.models.proto.cofd.api.Condition.displayName = 'proto.models.proto.cofd.api.Condition'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.models.proto.cofd.api.BasicInfo.prototype.toObject = function(opt_includeInstance) { + return proto.models.proto.cofd.api.BasicInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.models.proto.cofd.api.BasicInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.api.BasicInfo.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + gender: jspb.Message.getFieldWithDefault(msg, 2, ""), + concept: jspb.Message.getFieldWithDefault(msg, 3, ""), + chronicle: jspb.Message.getFieldWithDefault(msg, 4, ""), + age: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.models.proto.cofd.api.BasicInfo} + */ +proto.models.proto.cofd.api.BasicInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.models.proto.cofd.api.BasicInfo; + return proto.models.proto.cofd.api.BasicInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.models.proto.cofd.api.BasicInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.models.proto.cofd.api.BasicInfo} + */ +proto.models.proto.cofd.api.BasicInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setGender(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setConcept(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setChronicle(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setAge(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.models.proto.cofd.api.BasicInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.models.proto.cofd.api.BasicInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.models.proto.cofd.api.BasicInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.api.BasicInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getGender(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getConcept(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getChronicle(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getAge(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.models.proto.cofd.api.BasicInfo.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.api.BasicInfo} returns this + */ +proto.models.proto.cofd.api.BasicInfo.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string gender = 2; + * @return {string} + */ +proto.models.proto.cofd.api.BasicInfo.prototype.getGender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.api.BasicInfo} returns this + */ +proto.models.proto.cofd.api.BasicInfo.prototype.setGender = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string concept = 3; + * @return {string} + */ +proto.models.proto.cofd.api.BasicInfo.prototype.getConcept = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.api.BasicInfo} returns this + */ +proto.models.proto.cofd.api.BasicInfo.prototype.setConcept = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string chronicle = 4; + * @return {string} + */ +proto.models.proto.cofd.api.BasicInfo.prototype.getChronicle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.api.BasicInfo} returns this + */ +proto.models.proto.cofd.api.BasicInfo.prototype.setChronicle = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int32 age = 5; + * @return {number} + */ +proto.models.proto.cofd.api.BasicInfo.prototype.getAge = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.api.BasicInfo} returns this + */ +proto.models.proto.cofd.api.BasicInfo.prototype.setAge = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.models.proto.cofd.api.Attributes.prototype.toObject = function(opt_includeInstance) { + return proto.models.proto.cofd.api.Attributes.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.models.proto.cofd.api.Attributes} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.api.Attributes.toObject = function(includeInstance, msg) { + var f, obj = { + strength: jspb.Message.getFieldWithDefault(msg, 1, 0), + dexterity: jspb.Message.getFieldWithDefault(msg, 2, 0), + stamina: jspb.Message.getFieldWithDefault(msg, 3, 0), + intelligence: jspb.Message.getFieldWithDefault(msg, 4, 0), + wits: jspb.Message.getFieldWithDefault(msg, 5, 0), + resolve: jspb.Message.getFieldWithDefault(msg, 6, 0), + presence: jspb.Message.getFieldWithDefault(msg, 7, 0), + manipulation: jspb.Message.getFieldWithDefault(msg, 8, 0), + composure: jspb.Message.getFieldWithDefault(msg, 9, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.models.proto.cofd.api.Attributes} + */ +proto.models.proto.cofd.api.Attributes.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.models.proto.cofd.api.Attributes; + return proto.models.proto.cofd.api.Attributes.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.models.proto.cofd.api.Attributes} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.models.proto.cofd.api.Attributes} + */ +proto.models.proto.cofd.api.Attributes.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setStrength(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setDexterity(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setStamina(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setIntelligence(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setWits(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt32()); + msg.setResolve(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPresence(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt32()); + msg.setManipulation(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt32()); + msg.setComposure(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.models.proto.cofd.api.Attributes.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.models.proto.cofd.api.Attributes.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.models.proto.cofd.api.Attributes} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.api.Attributes.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStrength(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getDexterity(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getStamina(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getIntelligence(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getWits(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } + f = message.getResolve(); + if (f !== 0) { + writer.writeInt32( + 6, + f + ); + } + f = message.getPresence(); + if (f !== 0) { + writer.writeInt32( + 7, + f + ); + } + f = message.getManipulation(); + if (f !== 0) { + writer.writeInt32( + 8, + f + ); + } + f = message.getComposure(); + if (f !== 0) { + writer.writeInt32( + 9, + f + ); + } +}; + + +/** + * optional int32 strength = 1; + * @return {number} + */ +proto.models.proto.cofd.api.Attributes.prototype.getStrength = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.api.Attributes} returns this + */ +proto.models.proto.cofd.api.Attributes.prototype.setStrength = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 dexterity = 2; + * @return {number} + */ +proto.models.proto.cofd.api.Attributes.prototype.getDexterity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.api.Attributes} returns this + */ +proto.models.proto.cofd.api.Attributes.prototype.setDexterity = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 stamina = 3; + * @return {number} + */ +proto.models.proto.cofd.api.Attributes.prototype.getStamina = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.api.Attributes} returns this + */ +proto.models.proto.cofd.api.Attributes.prototype.setStamina = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 intelligence = 4; + * @return {number} + */ +proto.models.proto.cofd.api.Attributes.prototype.getIntelligence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.api.Attributes} returns this + */ +proto.models.proto.cofd.api.Attributes.prototype.setIntelligence = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int32 wits = 5; + * @return {number} + */ +proto.models.proto.cofd.api.Attributes.prototype.getWits = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.api.Attributes} returns this + */ +proto.models.proto.cofd.api.Attributes.prototype.setWits = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int32 resolve = 6; + * @return {number} + */ +proto.models.proto.cofd.api.Attributes.prototype.getResolve = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.api.Attributes} returns this + */ +proto.models.proto.cofd.api.Attributes.prototype.setResolve = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional int32 presence = 7; + * @return {number} + */ +proto.models.proto.cofd.api.Attributes.prototype.getPresence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.api.Attributes} returns this + */ +proto.models.proto.cofd.api.Attributes.prototype.setPresence = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional int32 manipulation = 8; + * @return {number} + */ +proto.models.proto.cofd.api.Attributes.prototype.getManipulation = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.api.Attributes} returns this + */ +proto.models.proto.cofd.api.Attributes.prototype.setManipulation = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional int32 composure = 9; + * @return {number} + */ +proto.models.proto.cofd.api.Attributes.prototype.getComposure = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.api.Attributes} returns this + */ +proto.models.proto.cofd.api.Attributes.prototype.setComposure = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.models.proto.cofd.api.UpdateAttributeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.models.proto.cofd.api.UpdateAttributeRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.models.proto.cofd.api.UpdateAttributeRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.api.UpdateAttributeRequest.toObject = function(includeInstance, msg) { + var f, obj = { + characterUsername: jspb.Message.getFieldWithDefault(msg, 1, ""), + characterId: jspb.Message.getFieldWithDefault(msg, 2, 0), + attributeName: jspb.Message.getFieldWithDefault(msg, 3, ""), + attributeValue: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.models.proto.cofd.api.UpdateAttributeRequest} + */ +proto.models.proto.cofd.api.UpdateAttributeRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.models.proto.cofd.api.UpdateAttributeRequest; + return proto.models.proto.cofd.api.UpdateAttributeRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.models.proto.cofd.api.UpdateAttributeRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.models.proto.cofd.api.UpdateAttributeRequest} + */ +proto.models.proto.cofd.api.UpdateAttributeRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setCharacterUsername(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setCharacterId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAttributeName(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setAttributeValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.models.proto.cofd.api.UpdateAttributeRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.models.proto.cofd.api.UpdateAttributeRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.models.proto.cofd.api.UpdateAttributeRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.api.UpdateAttributeRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCharacterUsername(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCharacterId(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getAttributeName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAttributeValue(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } +}; + + +/** + * optional string character_username = 1; + * @return {string} + */ +proto.models.proto.cofd.api.UpdateAttributeRequest.prototype.getCharacterUsername = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.api.UpdateAttributeRequest} returns this + */ +proto.models.proto.cofd.api.UpdateAttributeRequest.prototype.setCharacterUsername = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 character_id = 2; + * @return {number} + */ +proto.models.proto.cofd.api.UpdateAttributeRequest.prototype.getCharacterId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.api.UpdateAttributeRequest} returns this + */ +proto.models.proto.cofd.api.UpdateAttributeRequest.prototype.setCharacterId = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string attribute_name = 3; + * @return {string} + */ +proto.models.proto.cofd.api.UpdateAttributeRequest.prototype.getAttributeName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.api.UpdateAttributeRequest} returns this + */ +proto.models.proto.cofd.api.UpdateAttributeRequest.prototype.setAttributeName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int32 attribute_value = 4; + * @return {number} + */ +proto.models.proto.cofd.api.UpdateAttributeRequest.prototype.getAttributeValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.api.UpdateAttributeRequest} returns this + */ +proto.models.proto.cofd.api.UpdateAttributeRequest.prototype.setAttributeValue = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.models.proto.cofd.api.Skills.repeatedFields_ = [1,2,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.models.proto.cofd.api.Skills.prototype.toObject = function(opt_includeInstance) { + return proto.models.proto.cofd.api.Skills.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.models.proto.cofd.api.Skills} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.api.Skills.toObject = function(includeInstance, msg) { + var f, obj = { + physicalSkillsList: jspb.Message.toObjectList(msg.getPhysicalSkillsList(), + cofd_pb.CofdSheet.Skill.toObject, includeInstance), + mentalSkillsList: jspb.Message.toObjectList(msg.getMentalSkillsList(), + cofd_pb.CofdSheet.Skill.toObject, includeInstance), + socialSkillsList: jspb.Message.toObjectList(msg.getSocialSkillsList(), + cofd_pb.CofdSheet.Skill.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.models.proto.cofd.api.Skills} + */ +proto.models.proto.cofd.api.Skills.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.models.proto.cofd.api.Skills; + return proto.models.proto.cofd.api.Skills.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.models.proto.cofd.api.Skills} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.models.proto.cofd.api.Skills} + */ +proto.models.proto.cofd.api.Skills.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cofd_pb.CofdSheet.Skill; + reader.readMessage(value,cofd_pb.CofdSheet.Skill.deserializeBinaryFromReader); + msg.addPhysicalSkills(value); + break; + case 2: + var value = new cofd_pb.CofdSheet.Skill; + reader.readMessage(value,cofd_pb.CofdSheet.Skill.deserializeBinaryFromReader); + msg.addMentalSkills(value); + break; + case 3: + var value = new cofd_pb.CofdSheet.Skill; + reader.readMessage(value,cofd_pb.CofdSheet.Skill.deserializeBinaryFromReader); + msg.addSocialSkills(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.models.proto.cofd.api.Skills.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.models.proto.cofd.api.Skills.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.models.proto.cofd.api.Skills} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.api.Skills.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPhysicalSkillsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cofd_pb.CofdSheet.Skill.serializeBinaryToWriter + ); + } + f = message.getMentalSkillsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cofd_pb.CofdSheet.Skill.serializeBinaryToWriter + ); + } + f = message.getSocialSkillsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cofd_pb.CofdSheet.Skill.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated models.proto.cofd.CofdSheet.Skill physical_skills = 1; + * @return {!Array} + */ +proto.models.proto.cofd.api.Skills.prototype.getPhysicalSkillsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cofd_pb.CofdSheet.Skill, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.models.proto.cofd.api.Skills} returns this +*/ +proto.models.proto.cofd.api.Skills.prototype.setPhysicalSkillsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.models.proto.cofd.CofdSheet.Skill=} opt_value + * @param {number=} opt_index + * @return {!proto.models.proto.cofd.CofdSheet.Skill} + */ +proto.models.proto.cofd.api.Skills.prototype.addPhysicalSkills = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.models.proto.cofd.CofdSheet.Skill, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.models.proto.cofd.api.Skills} returns this + */ +proto.models.proto.cofd.api.Skills.prototype.clearPhysicalSkillsList = function() { + return this.setPhysicalSkillsList([]); +}; + + +/** + * repeated models.proto.cofd.CofdSheet.Skill mental_skills = 2; + * @return {!Array} + */ +proto.models.proto.cofd.api.Skills.prototype.getMentalSkillsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cofd_pb.CofdSheet.Skill, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.models.proto.cofd.api.Skills} returns this +*/ +proto.models.proto.cofd.api.Skills.prototype.setMentalSkillsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.models.proto.cofd.CofdSheet.Skill=} opt_value + * @param {number=} opt_index + * @return {!proto.models.proto.cofd.CofdSheet.Skill} + */ +proto.models.proto.cofd.api.Skills.prototype.addMentalSkills = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.models.proto.cofd.CofdSheet.Skill, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.models.proto.cofd.api.Skills} returns this + */ +proto.models.proto.cofd.api.Skills.prototype.clearMentalSkillsList = function() { + return this.setMentalSkillsList([]); +}; + + +/** + * repeated models.proto.cofd.CofdSheet.Skill social_skills = 3; + * @return {!Array} + */ +proto.models.proto.cofd.api.Skills.prototype.getSocialSkillsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cofd_pb.CofdSheet.Skill, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.models.proto.cofd.api.Skills} returns this +*/ +proto.models.proto.cofd.api.Skills.prototype.setSocialSkillsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.models.proto.cofd.CofdSheet.Skill=} opt_value + * @param {number=} opt_index + * @return {!proto.models.proto.cofd.CofdSheet.Skill} + */ +proto.models.proto.cofd.api.Skills.prototype.addSocialSkills = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.models.proto.cofd.CofdSheet.Skill, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.models.proto.cofd.api.Skills} returns this + */ +proto.models.proto.cofd.api.Skills.prototype.clearSocialSkillsList = function() { + return this.setSocialSkillsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.models.proto.cofd.api.SkillUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.models.proto.cofd.api.SkillUpdate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.models.proto.cofd.api.SkillUpdate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.api.SkillUpdate.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + skill: (f = msg.getSkill()) && cofd_pb.CofdSheet.Skill.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.models.proto.cofd.api.SkillUpdate} + */ +proto.models.proto.cofd.api.SkillUpdate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.models.proto.cofd.api.SkillUpdate; + return proto.models.proto.cofd.api.SkillUpdate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.models.proto.cofd.api.SkillUpdate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.models.proto.cofd.api.SkillUpdate} + */ +proto.models.proto.cofd.api.SkillUpdate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new cofd_pb.CofdSheet.Skill; + reader.readMessage(value,cofd_pb.CofdSheet.Skill.deserializeBinaryFromReader); + msg.setSkill(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.models.proto.cofd.api.SkillUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.models.proto.cofd.api.SkillUpdate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.models.proto.cofd.api.SkillUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.api.SkillUpdate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSkill(); + if (f != null) { + writer.writeMessage( + 2, + f, + cofd_pb.CofdSheet.Skill.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.models.proto.cofd.api.SkillUpdate.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.api.SkillUpdate} returns this + */ +proto.models.proto.cofd.api.SkillUpdate.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional models.proto.cofd.CofdSheet.Skill skill = 2; + * @return {?proto.models.proto.cofd.CofdSheet.Skill} + */ +proto.models.proto.cofd.api.SkillUpdate.prototype.getSkill = function() { + return /** @type{?proto.models.proto.cofd.CofdSheet.Skill} */ ( + jspb.Message.getWrapperField(this, cofd_pb.CofdSheet.Skill, 2)); +}; + + +/** + * @param {?proto.models.proto.cofd.CofdSheet.Skill|undefined} value + * @return {!proto.models.proto.cofd.api.SkillUpdate} returns this +*/ +proto.models.proto.cofd.api.SkillUpdate.prototype.setSkill = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.models.proto.cofd.api.SkillUpdate} returns this + */ +proto.models.proto.cofd.api.SkillUpdate.prototype.clearSkill = function() { + return this.setSkill(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.models.proto.cofd.api.SkillUpdate.prototype.hasSkill = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.models.proto.cofd.api.UpdateSkillValueRequest.prototype.toObject = function(opt_includeInstance) { + return proto.models.proto.cofd.api.UpdateSkillValueRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.models.proto.cofd.api.UpdateSkillValueRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.api.UpdateSkillValueRequest.toObject = function(includeInstance, msg) { + var f, obj = { + characterUsername: jspb.Message.getFieldWithDefault(msg, 1, ""), + characterId: jspb.Message.getFieldWithDefault(msg, 2, 0), + skillName: jspb.Message.getFieldWithDefault(msg, 3, ""), + skillValue: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.models.proto.cofd.api.UpdateSkillValueRequest} + */ +proto.models.proto.cofd.api.UpdateSkillValueRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.models.proto.cofd.api.UpdateSkillValueRequest; + return proto.models.proto.cofd.api.UpdateSkillValueRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.models.proto.cofd.api.UpdateSkillValueRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.models.proto.cofd.api.UpdateSkillValueRequest} + */ +proto.models.proto.cofd.api.UpdateSkillValueRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setCharacterUsername(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setCharacterId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSkillName(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setSkillValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.models.proto.cofd.api.UpdateSkillValueRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.models.proto.cofd.api.UpdateSkillValueRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.models.proto.cofd.api.UpdateSkillValueRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.api.UpdateSkillValueRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCharacterUsername(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCharacterId(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getSkillName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSkillValue(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } +}; + + +/** + * optional string character_username = 1; + * @return {string} + */ +proto.models.proto.cofd.api.UpdateSkillValueRequest.prototype.getCharacterUsername = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.api.UpdateSkillValueRequest} returns this + */ +proto.models.proto.cofd.api.UpdateSkillValueRequest.prototype.setCharacterUsername = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 character_id = 2; + * @return {number} + */ +proto.models.proto.cofd.api.UpdateSkillValueRequest.prototype.getCharacterId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.api.UpdateSkillValueRequest} returns this + */ +proto.models.proto.cofd.api.UpdateSkillValueRequest.prototype.setCharacterId = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string skill_name = 3; + * @return {string} + */ +proto.models.proto.cofd.api.UpdateSkillValueRequest.prototype.getSkillName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.api.UpdateSkillValueRequest} returns this + */ +proto.models.proto.cofd.api.UpdateSkillValueRequest.prototype.setSkillName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int32 skill_value = 4; + * @return {number} + */ +proto.models.proto.cofd.api.UpdateSkillValueRequest.prototype.getSkillValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.api.UpdateSkillValueRequest} returns this + */ +proto.models.proto.cofd.api.UpdateSkillValueRequest.prototype.setSkillValue = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.models.proto.cofd.api.SkillSpecializationsUpdate.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.models.proto.cofd.api.SkillSpecializationsUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.models.proto.cofd.api.SkillSpecializationsUpdate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.models.proto.cofd.api.SkillSpecializationsUpdate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.api.SkillSpecializationsUpdate.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + specializationsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.models.proto.cofd.api.SkillSpecializationsUpdate} + */ +proto.models.proto.cofd.api.SkillSpecializationsUpdate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.models.proto.cofd.api.SkillSpecializationsUpdate; + return proto.models.proto.cofd.api.SkillSpecializationsUpdate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.models.proto.cofd.api.SkillSpecializationsUpdate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.models.proto.cofd.api.SkillSpecializationsUpdate} + */ +proto.models.proto.cofd.api.SkillSpecializationsUpdate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addSpecializations(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.models.proto.cofd.api.SkillSpecializationsUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.models.proto.cofd.api.SkillSpecializationsUpdate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.models.proto.cofd.api.SkillSpecializationsUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.api.SkillSpecializationsUpdate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSpecializationsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.models.proto.cofd.api.SkillSpecializationsUpdate.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.api.SkillSpecializationsUpdate} returns this + */ +proto.models.proto.cofd.api.SkillSpecializationsUpdate.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string specializations = 2; + * @return {!Array} + */ +proto.models.proto.cofd.api.SkillSpecializationsUpdate.prototype.getSpecializationsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.models.proto.cofd.api.SkillSpecializationsUpdate} returns this + */ +proto.models.proto.cofd.api.SkillSpecializationsUpdate.prototype.setSpecializationsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.models.proto.cofd.api.SkillSpecializationsUpdate} returns this + */ +proto.models.proto.cofd.api.SkillSpecializationsUpdate.prototype.addSpecializations = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.models.proto.cofd.api.SkillSpecializationsUpdate} returns this + */ +proto.models.proto.cofd.api.SkillSpecializationsUpdate.prototype.clearSpecializationsList = function() { + return this.setSpecializationsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.models.proto.cofd.api.Condition.prototype.toObject = function(opt_includeInstance) { + return proto.models.proto.cofd.api.Condition.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.models.proto.cofd.api.Condition} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.api.Condition.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.models.proto.cofd.api.Condition} + */ +proto.models.proto.cofd.api.Condition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.models.proto.cofd.api.Condition; + return proto.models.proto.cofd.api.Condition.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.models.proto.cofd.api.Condition} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.models.proto.cofd.api.Condition} + */ +proto.models.proto.cofd.api.Condition.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.models.proto.cofd.api.Condition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.models.proto.cofd.api.Condition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.models.proto.cofd.api.Condition} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.api.Condition.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.models.proto.cofd.api.Condition.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.api.Condition} returns this + */ +proto.models.proto.cofd.api.Condition.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +goog.object.extend(exports, proto.models.proto.cofd.api); + + +/***/ }), + +/***/ "./_proto/cofd_pb.js": +/*!***************************!*\ + !*** ./_proto/cofd_pb.js ***! + \***************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +// source: cofd.proto +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = __webpack_require__(/*! google-protobuf */ "../../node_modules/google-protobuf/google-protobuf.js"); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.models.proto.cofd.ChangelingFields', null, global); +goog.exportSymbol('proto.models.proto.cofd.CofdSheet', null, global); +goog.exportSymbol('proto.models.proto.cofd.CofdSheet.Attack', null, global); +goog.exportSymbol('proto.models.proto.cofd.CofdSheet.Condition', null, global); +goog.exportSymbol('proto.models.proto.cofd.CofdSheet.Item', null, global); +goog.exportSymbol('proto.models.proto.cofd.CofdSheet.Merit', null, global); +goog.exportSymbol('proto.models.proto.cofd.CofdSheet.Skill', null, global); +goog.exportSymbol('proto.models.proto.cofd.CofdSheet.SystemFieldsCase', null, global); +goog.exportSymbol('proto.models.proto.cofd.CoreFields', null, global); +goog.exportSymbol('proto.models.proto.cofd.MageFields', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.models.proto.cofd.CoreFields = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.models.proto.cofd.CoreFields, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.models.proto.cofd.CoreFields.displayName = 'proto.models.proto.cofd.CoreFields'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.models.proto.cofd.MageFields = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.models.proto.cofd.MageFields, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.models.proto.cofd.MageFields.displayName = 'proto.models.proto.cofd.MageFields'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.models.proto.cofd.ChangelingFields = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.models.proto.cofd.ChangelingFields, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.models.proto.cofd.ChangelingFields.displayName = 'proto.models.proto.cofd.ChangelingFields'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.models.proto.cofd.CofdSheet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.models.proto.cofd.CofdSheet.repeatedFields_, proto.models.proto.cofd.CofdSheet.oneofGroups_); +}; +goog.inherits(proto.models.proto.cofd.CofdSheet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.models.proto.cofd.CofdSheet.displayName = 'proto.models.proto.cofd.CofdSheet'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.models.proto.cofd.CofdSheet.Merit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.models.proto.cofd.CofdSheet.Merit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.models.proto.cofd.CofdSheet.Merit.displayName = 'proto.models.proto.cofd.CofdSheet.Merit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.models.proto.cofd.CofdSheet.Condition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.models.proto.cofd.CofdSheet.Condition, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.models.proto.cofd.CofdSheet.Condition.displayName = 'proto.models.proto.cofd.CofdSheet.Condition'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.models.proto.cofd.CofdSheet.Skill = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.models.proto.cofd.CofdSheet.Skill.repeatedFields_, null); +}; +goog.inherits(proto.models.proto.cofd.CofdSheet.Skill, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.models.proto.cofd.CofdSheet.Skill.displayName = 'proto.models.proto.cofd.CofdSheet.Skill'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.models.proto.cofd.CofdSheet.Item = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.models.proto.cofd.CofdSheet.Item, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.models.proto.cofd.CofdSheet.Item.displayName = 'proto.models.proto.cofd.CofdSheet.Item'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.models.proto.cofd.CofdSheet.Attack = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.models.proto.cofd.CofdSheet.Attack, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.models.proto.cofd.CofdSheet.Attack.displayName = 'proto.models.proto.cofd.CofdSheet.Attack'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.models.proto.cofd.CoreFields.prototype.toObject = function(opt_includeInstance) { + return proto.models.proto.cofd.CoreFields.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.models.proto.cofd.CoreFields} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.CoreFields.toObject = function(includeInstance, msg) { + var f, obj = { + integrity: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.models.proto.cofd.CoreFields} + */ +proto.models.proto.cofd.CoreFields.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.models.proto.cofd.CoreFields; + return proto.models.proto.cofd.CoreFields.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.models.proto.cofd.CoreFields} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.models.proto.cofd.CoreFields} + */ +proto.models.proto.cofd.CoreFields.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setIntegrity(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.models.proto.cofd.CoreFields.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.models.proto.cofd.CoreFields.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.models.proto.cofd.CoreFields} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.CoreFields.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIntegrity(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } +}; + + +/** + * optional int32 integrity = 1; + * @return {number} + */ +proto.models.proto.cofd.CoreFields.prototype.getIntegrity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CoreFields} returns this + */ +proto.models.proto.cofd.CoreFields.prototype.setIntegrity = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.models.proto.cofd.MageFields.prototype.toObject = function(opt_includeInstance) { + return proto.models.proto.cofd.MageFields.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.models.proto.cofd.MageFields} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.MageFields.toObject = function(includeInstance, msg) { + var f, obj = { + widsom: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.models.proto.cofd.MageFields} + */ +proto.models.proto.cofd.MageFields.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.models.proto.cofd.MageFields; + return proto.models.proto.cofd.MageFields.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.models.proto.cofd.MageFields} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.models.proto.cofd.MageFields} + */ +proto.models.proto.cofd.MageFields.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setWidsom(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.models.proto.cofd.MageFields.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.models.proto.cofd.MageFields.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.models.proto.cofd.MageFields} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.MageFields.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWidsom(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } +}; + + +/** + * optional int32 widsom = 1; + * @return {number} + */ +proto.models.proto.cofd.MageFields.prototype.getWidsom = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.MageFields} returns this + */ +proto.models.proto.cofd.MageFields.prototype.setWidsom = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.models.proto.cofd.ChangelingFields.prototype.toObject = function(opt_includeInstance) { + return proto.models.proto.cofd.ChangelingFields.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.models.proto.cofd.ChangelingFields} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.ChangelingFields.toObject = function(includeInstance, msg) { + var f, obj = { + clarity: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.models.proto.cofd.ChangelingFields} + */ +proto.models.proto.cofd.ChangelingFields.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.models.proto.cofd.ChangelingFields; + return proto.models.proto.cofd.ChangelingFields.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.models.proto.cofd.ChangelingFields} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.models.proto.cofd.ChangelingFields} + */ +proto.models.proto.cofd.ChangelingFields.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setClarity(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.models.proto.cofd.ChangelingFields.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.models.proto.cofd.ChangelingFields.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.models.proto.cofd.ChangelingFields} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.ChangelingFields.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClarity(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } +}; + + +/** + * optional int32 clarity = 1; + * @return {number} + */ +proto.models.proto.cofd.ChangelingFields.prototype.getClarity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.ChangelingFields} returns this + */ +proto.models.proto.cofd.ChangelingFields.prototype.setClarity = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.models.proto.cofd.CofdSheet.repeatedFields_ = [15,19,25,26]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.models.proto.cofd.CofdSheet.oneofGroups_ = [[28,29,30]]; + +/** + * @enum {number} + */ +proto.models.proto.cofd.CofdSheet.SystemFieldsCase = { + SYSTEM_FIELDS_NOT_SET: 0, + CORE: 28, + MAGE: 29, + CHANGELING: 30 +}; + +/** + * @return {proto.models.proto.cofd.CofdSheet.SystemFieldsCase} + */ +proto.models.proto.cofd.CofdSheet.prototype.getSystemFieldsCase = function() { + return /** @type {proto.models.proto.cofd.CofdSheet.SystemFieldsCase} */(jspb.Message.computeOneofCase(this, proto.models.proto.cofd.CofdSheet.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.models.proto.cofd.CofdSheet.prototype.toObject = function(opt_includeInstance) { + return proto.models.proto.cofd.CofdSheet.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.models.proto.cofd.CofdSheet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.CofdSheet.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + player: jspb.Message.getFieldWithDefault(msg, 2, ""), + campaign: jspb.Message.getFieldWithDefault(msg, 3, ""), + description: jspb.Message.getFieldWithDefault(msg, 4, ""), + strength: jspb.Message.getFieldWithDefault(msg, 6, 0), + dexterity: jspb.Message.getFieldWithDefault(msg, 7, 0), + stamina: jspb.Message.getFieldWithDefault(msg, 8, 0), + intelligence: jspb.Message.getFieldWithDefault(msg, 9, 0), + wits: jspb.Message.getFieldWithDefault(msg, 10, 0), + resolve: jspb.Message.getFieldWithDefault(msg, 11, 0), + presence: jspb.Message.getFieldWithDefault(msg, 12, 0), + manipulation: jspb.Message.getFieldWithDefault(msg, 13, 0), + composure: jspb.Message.getFieldWithDefault(msg, 14, 0), + physicalSkillsMap: (f = msg.getPhysicalSkillsMap()) ? f.toObject(includeInstance, proto.models.proto.cofd.CofdSheet.Skill.toObject) : [], + mentalSkillsMap: (f = msg.getMentalSkillsMap()) ? f.toObject(includeInstance, proto.models.proto.cofd.CofdSheet.Skill.toObject) : [], + socialSkillsMap: (f = msg.getSocialSkillsMap()) ? f.toObject(includeInstance, proto.models.proto.cofd.CofdSheet.Skill.toObject) : [], + meritsList: jspb.Message.toObjectList(msg.getMeritsList(), + proto.models.proto.cofd.CofdSheet.Merit.toObject, includeInstance), + conditionsList: jspb.Message.toObjectList(msg.getConditionsList(), + proto.models.proto.cofd.CofdSheet.Condition.toObject, includeInstance), + size: jspb.Message.getFieldWithDefault(msg, 20, 0), + health: jspb.Message.getFieldWithDefault(msg, 21, 0), + willpower: jspb.Message.getFieldWithDefault(msg, 22, 0), + experiencePoints: jspb.Message.getFieldWithDefault(msg, 23, 0), + beats: jspb.Message.getFieldWithDefault(msg, 24, 0), + itemsList: jspb.Message.toObjectList(msg.getItemsList(), + proto.models.proto.cofd.CofdSheet.Item.toObject, includeInstance), + attacksList: jspb.Message.toObjectList(msg.getAttacksList(), + proto.models.proto.cofd.CofdSheet.Attack.toObject, includeInstance), + otherDataMap: (f = msg.getOtherDataMap()) ? f.toObject(includeInstance, undefined) : [], + core: (f = msg.getCore()) && proto.models.proto.cofd.CoreFields.toObject(includeInstance, f), + mage: (f = msg.getMage()) && proto.models.proto.cofd.MageFields.toObject(includeInstance, f), + changeling: (f = msg.getChangeling()) && proto.models.proto.cofd.ChangelingFields.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.models.proto.cofd.CofdSheet} + */ +proto.models.proto.cofd.CofdSheet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.models.proto.cofd.CofdSheet; + return proto.models.proto.cofd.CofdSheet.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.models.proto.cofd.CofdSheet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.models.proto.cofd.CofdSheet} + */ +proto.models.proto.cofd.CofdSheet.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPlayer(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setCampaign(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt32()); + msg.setStrength(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt32()); + msg.setDexterity(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt32()); + msg.setStamina(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt32()); + msg.setIntelligence(value); + break; + case 10: + var value = /** @type {number} */ (reader.readInt32()); + msg.setWits(value); + break; + case 11: + var value = /** @type {number} */ (reader.readInt32()); + msg.setResolve(value); + break; + case 12: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPresence(value); + break; + case 13: + var value = /** @type {number} */ (reader.readInt32()); + msg.setManipulation(value); + break; + case 14: + var value = /** @type {number} */ (reader.readInt32()); + msg.setComposure(value); + break; + case 16: + var value = msg.getPhysicalSkillsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.models.proto.cofd.CofdSheet.Skill.deserializeBinaryFromReader, "", new proto.models.proto.cofd.CofdSheet.Skill()); + }); + break; + case 17: + var value = msg.getMentalSkillsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.models.proto.cofd.CofdSheet.Skill.deserializeBinaryFromReader, "", new proto.models.proto.cofd.CofdSheet.Skill()); + }); + break; + case 18: + var value = msg.getSocialSkillsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.models.proto.cofd.CofdSheet.Skill.deserializeBinaryFromReader, "", new proto.models.proto.cofd.CofdSheet.Skill()); + }); + break; + case 15: + var value = new proto.models.proto.cofd.CofdSheet.Merit; + reader.readMessage(value,proto.models.proto.cofd.CofdSheet.Merit.deserializeBinaryFromReader); + msg.addMerits(value); + break; + case 19: + var value = new proto.models.proto.cofd.CofdSheet.Condition; + reader.readMessage(value,proto.models.proto.cofd.CofdSheet.Condition.deserializeBinaryFromReader); + msg.addConditions(value); + break; + case 20: + var value = /** @type {number} */ (reader.readInt32()); + msg.setSize(value); + break; + case 21: + var value = /** @type {number} */ (reader.readInt32()); + msg.setHealth(value); + break; + case 22: + var value = /** @type {number} */ (reader.readInt32()); + msg.setWillpower(value); + break; + case 23: + var value = /** @type {number} */ (reader.readInt32()); + msg.setExperiencePoints(value); + break; + case 24: + var value = /** @type {number} */ (reader.readInt32()); + msg.setBeats(value); + break; + case 25: + var value = new proto.models.proto.cofd.CofdSheet.Item; + reader.readMessage(value,proto.models.proto.cofd.CofdSheet.Item.deserializeBinaryFromReader); + msg.addItems(value); + break; + case 26: + var value = new proto.models.proto.cofd.CofdSheet.Attack; + reader.readMessage(value,proto.models.proto.cofd.CofdSheet.Attack.deserializeBinaryFromReader); + msg.addAttacks(value); + break; + case 27: + var value = msg.getOtherDataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 28: + var value = new proto.models.proto.cofd.CoreFields; + reader.readMessage(value,proto.models.proto.cofd.CoreFields.deserializeBinaryFromReader); + msg.setCore(value); + break; + case 29: + var value = new proto.models.proto.cofd.MageFields; + reader.readMessage(value,proto.models.proto.cofd.MageFields.deserializeBinaryFromReader); + msg.setMage(value); + break; + case 30: + var value = new proto.models.proto.cofd.ChangelingFields; + reader.readMessage(value,proto.models.proto.cofd.ChangelingFields.deserializeBinaryFromReader); + msg.setChangeling(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.models.proto.cofd.CofdSheet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.models.proto.cofd.CofdSheet.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.models.proto.cofd.CofdSheet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.CofdSheet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPlayer(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCampaign(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getStrength(); + if (f !== 0) { + writer.writeInt32( + 6, + f + ); + } + f = message.getDexterity(); + if (f !== 0) { + writer.writeInt32( + 7, + f + ); + } + f = message.getStamina(); + if (f !== 0) { + writer.writeInt32( + 8, + f + ); + } + f = message.getIntelligence(); + if (f !== 0) { + writer.writeInt32( + 9, + f + ); + } + f = message.getWits(); + if (f !== 0) { + writer.writeInt32( + 10, + f + ); + } + f = message.getResolve(); + if (f !== 0) { + writer.writeInt32( + 11, + f + ); + } + f = message.getPresence(); + if (f !== 0) { + writer.writeInt32( + 12, + f + ); + } + f = message.getManipulation(); + if (f !== 0) { + writer.writeInt32( + 13, + f + ); + } + f = message.getComposure(); + if (f !== 0) { + writer.writeInt32( + 14, + f + ); + } + f = message.getPhysicalSkillsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(16, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.models.proto.cofd.CofdSheet.Skill.serializeBinaryToWriter); + } + f = message.getMentalSkillsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(17, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.models.proto.cofd.CofdSheet.Skill.serializeBinaryToWriter); + } + f = message.getSocialSkillsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(18, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.models.proto.cofd.CofdSheet.Skill.serializeBinaryToWriter); + } + f = message.getMeritsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 15, + f, + proto.models.proto.cofd.CofdSheet.Merit.serializeBinaryToWriter + ); + } + f = message.getConditionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 19, + f, + proto.models.proto.cofd.CofdSheet.Condition.serializeBinaryToWriter + ); + } + f = message.getSize(); + if (f !== 0) { + writer.writeInt32( + 20, + f + ); + } + f = message.getHealth(); + if (f !== 0) { + writer.writeInt32( + 21, + f + ); + } + f = message.getWillpower(); + if (f !== 0) { + writer.writeInt32( + 22, + f + ); + } + f = message.getExperiencePoints(); + if (f !== 0) { + writer.writeInt32( + 23, + f + ); + } + f = message.getBeats(); + if (f !== 0) { + writer.writeInt32( + 24, + f + ); + } + f = message.getItemsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 25, + f, + proto.models.proto.cofd.CofdSheet.Item.serializeBinaryToWriter + ); + } + f = message.getAttacksList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 26, + f, + proto.models.proto.cofd.CofdSheet.Attack.serializeBinaryToWriter + ); + } + f = message.getOtherDataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(27, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getCore(); + if (f != null) { + writer.writeMessage( + 28, + f, + proto.models.proto.cofd.CoreFields.serializeBinaryToWriter + ); + } + f = message.getMage(); + if (f != null) { + writer.writeMessage( + 29, + f, + proto.models.proto.cofd.MageFields.serializeBinaryToWriter + ); + } + f = message.getChangeling(); + if (f != null) { + writer.writeMessage( + 30, + f, + proto.models.proto.cofd.ChangelingFields.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.models.proto.cofd.CofdSheet.Merit.prototype.toObject = function(opt_includeInstance) { + return proto.models.proto.cofd.CofdSheet.Merit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.models.proto.cofd.CofdSheet.Merit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.CofdSheet.Merit.toObject = function(includeInstance, msg) { + var f, obj = { + dots: jspb.Message.getFieldWithDefault(msg, 1, 0), + name: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.models.proto.cofd.CofdSheet.Merit} + */ +proto.models.proto.cofd.CofdSheet.Merit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.models.proto.cofd.CofdSheet.Merit; + return proto.models.proto.cofd.CofdSheet.Merit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.models.proto.cofd.CofdSheet.Merit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.models.proto.cofd.CofdSheet.Merit} + */ +proto.models.proto.cofd.CofdSheet.Merit.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setDots(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.models.proto.cofd.CofdSheet.Merit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.models.proto.cofd.CofdSheet.Merit.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.models.proto.cofd.CofdSheet.Merit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.CofdSheet.Merit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDots(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional int32 dots = 1; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.Merit.prototype.getDots = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet.Merit} returns this + */ +proto.models.proto.cofd.CofdSheet.Merit.prototype.setDots = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.models.proto.cofd.CofdSheet.Merit.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.CofdSheet.Merit} returns this + */ +proto.models.proto.cofd.CofdSheet.Merit.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.models.proto.cofd.CofdSheet.Condition.prototype.toObject = function(opt_includeInstance) { + return proto.models.proto.cofd.CofdSheet.Condition.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.models.proto.cofd.CofdSheet.Condition} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.CofdSheet.Condition.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.models.proto.cofd.CofdSheet.Condition} + */ +proto.models.proto.cofd.CofdSheet.Condition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.models.proto.cofd.CofdSheet.Condition; + return proto.models.proto.cofd.CofdSheet.Condition.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.models.proto.cofd.CofdSheet.Condition} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.models.proto.cofd.CofdSheet.Condition} + */ +proto.models.proto.cofd.CofdSheet.Condition.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.models.proto.cofd.CofdSheet.Condition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.models.proto.cofd.CofdSheet.Condition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.models.proto.cofd.CofdSheet.Condition} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.CofdSheet.Condition.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.models.proto.cofd.CofdSheet.Condition.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.CofdSheet.Condition} returns this + */ +proto.models.proto.cofd.CofdSheet.Condition.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.models.proto.cofd.CofdSheet.Skill.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.models.proto.cofd.CofdSheet.Skill.prototype.toObject = function(opt_includeInstance) { + return proto.models.proto.cofd.CofdSheet.Skill.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.models.proto.cofd.CofdSheet.Skill} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.CofdSheet.Skill.toObject = function(includeInstance, msg) { + var f, obj = { + dots: jspb.Message.getFieldWithDefault(msg, 1, 0), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + untrainedPenalty: jspb.Message.getFieldWithDefault(msg, 3, 0), + specializationsList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.models.proto.cofd.CofdSheet.Skill} + */ +proto.models.proto.cofd.CofdSheet.Skill.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.models.proto.cofd.CofdSheet.Skill; + return proto.models.proto.cofd.CofdSheet.Skill.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.models.proto.cofd.CofdSheet.Skill} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.models.proto.cofd.CofdSheet.Skill} + */ +proto.models.proto.cofd.CofdSheet.Skill.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setDots(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {number} */ (reader.readSint32()); + msg.setUntrainedPenalty(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.addSpecializations(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.models.proto.cofd.CofdSheet.Skill.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.models.proto.cofd.CofdSheet.Skill.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.models.proto.cofd.CofdSheet.Skill} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.CofdSheet.Skill.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDots(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getUntrainedPenalty(); + if (f !== 0) { + writer.writeSint32( + 3, + f + ); + } + f = message.getSpecializationsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 4, + f + ); + } +}; + + +/** + * optional int32 dots = 1; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.Skill.prototype.getDots = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet.Skill} returns this + */ +proto.models.proto.cofd.CofdSheet.Skill.prototype.setDots = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.models.proto.cofd.CofdSheet.Skill.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.CofdSheet.Skill} returns this + */ +proto.models.proto.cofd.CofdSheet.Skill.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional sint32 untrained_penalty = 3; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.Skill.prototype.getUntrainedPenalty = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet.Skill} returns this + */ +proto.models.proto.cofd.CofdSheet.Skill.prototype.setUntrainedPenalty = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * repeated string specializations = 4; + * @return {!Array} + */ +proto.models.proto.cofd.CofdSheet.Skill.prototype.getSpecializationsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.models.proto.cofd.CofdSheet.Skill} returns this + */ +proto.models.proto.cofd.CofdSheet.Skill.prototype.setSpecializationsList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.models.proto.cofd.CofdSheet.Skill} returns this + */ +proto.models.proto.cofd.CofdSheet.Skill.prototype.addSpecializations = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.models.proto.cofd.CofdSheet.Skill} returns this + */ +proto.models.proto.cofd.CofdSheet.Skill.prototype.clearSpecializationsList = function() { + return this.setSpecializationsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.models.proto.cofd.CofdSheet.Item.prototype.toObject = function(opt_includeInstance) { + return proto.models.proto.cofd.CofdSheet.Item.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.models.proto.cofd.CofdSheet.Item} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.CofdSheet.Item.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + rules: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.models.proto.cofd.CofdSheet.Item} + */ +proto.models.proto.cofd.CofdSheet.Item.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.models.proto.cofd.CofdSheet.Item; + return proto.models.proto.cofd.CofdSheet.Item.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.models.proto.cofd.CofdSheet.Item} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.models.proto.cofd.CofdSheet.Item} + */ +proto.models.proto.cofd.CofdSheet.Item.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRules(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.models.proto.cofd.CofdSheet.Item.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.models.proto.cofd.CofdSheet.Item.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.models.proto.cofd.CofdSheet.Item} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.CofdSheet.Item.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRules(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.models.proto.cofd.CofdSheet.Item.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.CofdSheet.Item} returns this + */ +proto.models.proto.cofd.CofdSheet.Item.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.models.proto.cofd.CofdSheet.Item.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.CofdSheet.Item} returns this + */ +proto.models.proto.cofd.CofdSheet.Item.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string rules = 3; + * @return {string} + */ +proto.models.proto.cofd.CofdSheet.Item.prototype.getRules = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.CofdSheet.Item} returns this + */ +proto.models.proto.cofd.CofdSheet.Item.prototype.setRules = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.models.proto.cofd.CofdSheet.Attack.prototype.toObject = function(opt_includeInstance) { + return proto.models.proto.cofd.CofdSheet.Attack.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.models.proto.cofd.CofdSheet.Attack} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.CofdSheet.Attack.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + dicePool: jspb.Message.getFieldWithDefault(msg, 2, 0), + damage: jspb.Message.getFieldWithDefault(msg, 3, 0), + range: jspb.Message.getFieldWithDefault(msg, 4, 0), + initiativeModifier: jspb.Message.getFieldWithDefault(msg, 5, 0), + size: jspb.Message.getFieldWithDefault(msg, 6, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.models.proto.cofd.CofdSheet.Attack} + */ +proto.models.proto.cofd.CofdSheet.Attack.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.models.proto.cofd.CofdSheet.Attack; + return proto.models.proto.cofd.CofdSheet.Attack.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.models.proto.cofd.CofdSheet.Attack} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.models.proto.cofd.CofdSheet.Attack} + */ +proto.models.proto.cofd.CofdSheet.Attack.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setDicePool(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setDamage(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRange(value); + break; + case 5: + var value = /** @type {number} */ (reader.readSint32()); + msg.setInitiativeModifier(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt32()); + msg.setSize(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.models.proto.cofd.CofdSheet.Attack.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.models.proto.cofd.CofdSheet.Attack.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.models.proto.cofd.CofdSheet.Attack} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.models.proto.cofd.CofdSheet.Attack.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDicePool(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getDamage(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getRange(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getInitiativeModifier(); + if (f !== 0) { + writer.writeSint32( + 5, + f + ); + } + f = message.getSize(); + if (f !== 0) { + writer.writeInt32( + 6, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.models.proto.cofd.CofdSheet.Attack.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.CofdSheet.Attack} returns this + */ +proto.models.proto.cofd.CofdSheet.Attack.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 dice_pool = 2; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.Attack.prototype.getDicePool = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet.Attack} returns this + */ +proto.models.proto.cofd.CofdSheet.Attack.prototype.setDicePool = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 damage = 3; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.Attack.prototype.getDamage = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet.Attack} returns this + */ +proto.models.proto.cofd.CofdSheet.Attack.prototype.setDamage = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 range = 4; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.Attack.prototype.getRange = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet.Attack} returns this + */ +proto.models.proto.cofd.CofdSheet.Attack.prototype.setRange = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional sint32 initiative_modifier = 5; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.Attack.prototype.getInitiativeModifier = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet.Attack} returns this + */ +proto.models.proto.cofd.CofdSheet.Attack.prototype.setInitiativeModifier = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int32 size = 6; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.Attack.prototype.getSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet.Attack} returns this + */ +proto.models.proto.cofd.CofdSheet.Attack.prototype.setSize = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.models.proto.cofd.CofdSheet.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string player = 2; + * @return {string} + */ +proto.models.proto.cofd.CofdSheet.prototype.getPlayer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.setPlayer = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string campaign = 3; + * @return {string} + */ +proto.models.proto.cofd.CofdSheet.prototype.getCampaign = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.setCampaign = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string description = 4; + * @return {string} + */ +proto.models.proto.cofd.CofdSheet.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int32 strength = 6; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.prototype.getStrength = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.setStrength = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional int32 dexterity = 7; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.prototype.getDexterity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.setDexterity = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional int32 stamina = 8; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.prototype.getStamina = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.setStamina = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional int32 intelligence = 9; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.prototype.getIntelligence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.setIntelligence = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional int32 wits = 10; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.prototype.getWits = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.setWits = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional int32 resolve = 11; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.prototype.getResolve = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.setResolve = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; + + +/** + * optional int32 presence = 12; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.prototype.getPresence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.setPresence = function(value) { + return jspb.Message.setProto3IntField(this, 12, value); +}; + + +/** + * optional int32 manipulation = 13; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.prototype.getManipulation = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.setManipulation = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); +}; + + +/** + * optional int32 composure = 14; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.prototype.getComposure = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.setComposure = function(value) { + return jspb.Message.setProto3IntField(this, 14, value); +}; + + +/** + * map physical_skills = 16; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.models.proto.cofd.CofdSheet.prototype.getPhysicalSkillsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 16, opt_noLazyCreate, + proto.models.proto.cofd.CofdSheet.Skill)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.clearPhysicalSkillsMap = function() { + this.getPhysicalSkillsMap().clear(); + return this;}; + + +/** + * map mental_skills = 17; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.models.proto.cofd.CofdSheet.prototype.getMentalSkillsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 17, opt_noLazyCreate, + proto.models.proto.cofd.CofdSheet.Skill)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.clearMentalSkillsMap = function() { + this.getMentalSkillsMap().clear(); + return this;}; + + +/** + * map social_skills = 18; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.models.proto.cofd.CofdSheet.prototype.getSocialSkillsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 18, opt_noLazyCreate, + proto.models.proto.cofd.CofdSheet.Skill)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.clearSocialSkillsMap = function() { + this.getSocialSkillsMap().clear(); + return this;}; + + +/** + * repeated Merit merits = 15; + * @return {!Array} + */ +proto.models.proto.cofd.CofdSheet.prototype.getMeritsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.models.proto.cofd.CofdSheet.Merit, 15)); +}; + + +/** + * @param {!Array} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this +*/ +proto.models.proto.cofd.CofdSheet.prototype.setMeritsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 15, value); +}; + + +/** + * @param {!proto.models.proto.cofd.CofdSheet.Merit=} opt_value + * @param {number=} opt_index + * @return {!proto.models.proto.cofd.CofdSheet.Merit} + */ +proto.models.proto.cofd.CofdSheet.prototype.addMerits = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 15, opt_value, proto.models.proto.cofd.CofdSheet.Merit, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.clearMeritsList = function() { + return this.setMeritsList([]); +}; + + +/** + * repeated Condition conditions = 19; + * @return {!Array} + */ +proto.models.proto.cofd.CofdSheet.prototype.getConditionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.models.proto.cofd.CofdSheet.Condition, 19)); +}; + + +/** + * @param {!Array} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this +*/ +proto.models.proto.cofd.CofdSheet.prototype.setConditionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 19, value); +}; + + +/** + * @param {!proto.models.proto.cofd.CofdSheet.Condition=} opt_value + * @param {number=} opt_index + * @return {!proto.models.proto.cofd.CofdSheet.Condition} + */ +proto.models.proto.cofd.CofdSheet.prototype.addConditions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 19, opt_value, proto.models.proto.cofd.CofdSheet.Condition, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.clearConditionsList = function() { + return this.setConditionsList([]); +}; + + +/** + * optional int32 size = 20; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.prototype.getSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.setSize = function(value) { + return jspb.Message.setProto3IntField(this, 20, value); +}; + + +/** + * optional int32 health = 21; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.prototype.getHealth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.setHealth = function(value) { + return jspb.Message.setProto3IntField(this, 21, value); +}; + + +/** + * optional int32 willpower = 22; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.prototype.getWillpower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 22, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.setWillpower = function(value) { + return jspb.Message.setProto3IntField(this, 22, value); +}; + + +/** + * optional int32 experience_points = 23; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.prototype.getExperiencePoints = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.setExperiencePoints = function(value) { + return jspb.Message.setProto3IntField(this, 23, value); +}; + + +/** + * optional int32 beats = 24; + * @return {number} + */ +proto.models.proto.cofd.CofdSheet.prototype.getBeats = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.setBeats = function(value) { + return jspb.Message.setProto3IntField(this, 24, value); +}; + + +/** + * repeated Item items = 25; + * @return {!Array} + */ +proto.models.proto.cofd.CofdSheet.prototype.getItemsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.models.proto.cofd.CofdSheet.Item, 25)); +}; + + +/** + * @param {!Array} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this +*/ +proto.models.proto.cofd.CofdSheet.prototype.setItemsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 25, value); +}; + + +/** + * @param {!proto.models.proto.cofd.CofdSheet.Item=} opt_value + * @param {number=} opt_index + * @return {!proto.models.proto.cofd.CofdSheet.Item} + */ +proto.models.proto.cofd.CofdSheet.prototype.addItems = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 25, opt_value, proto.models.proto.cofd.CofdSheet.Item, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.clearItemsList = function() { + return this.setItemsList([]); +}; + + +/** + * repeated Attack attacks = 26; + * @return {!Array} + */ +proto.models.proto.cofd.CofdSheet.prototype.getAttacksList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.models.proto.cofd.CofdSheet.Attack, 26)); +}; + + +/** + * @param {!Array} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this +*/ +proto.models.proto.cofd.CofdSheet.prototype.setAttacksList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 26, value); +}; + + +/** + * @param {!proto.models.proto.cofd.CofdSheet.Attack=} opt_value + * @param {number=} opt_index + * @return {!proto.models.proto.cofd.CofdSheet.Attack} + */ +proto.models.proto.cofd.CofdSheet.prototype.addAttacks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 26, opt_value, proto.models.proto.cofd.CofdSheet.Attack, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.clearAttacksList = function() { + return this.setAttacksList([]); +}; + + +/** + * map other_data = 27; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.models.proto.cofd.CofdSheet.prototype.getOtherDataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 27, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.clearOtherDataMap = function() { + this.getOtherDataMap().clear(); + return this;}; + + +/** + * optional CoreFields core = 28; + * @return {?proto.models.proto.cofd.CoreFields} + */ +proto.models.proto.cofd.CofdSheet.prototype.getCore = function() { + return /** @type{?proto.models.proto.cofd.CoreFields} */ ( + jspb.Message.getWrapperField(this, proto.models.proto.cofd.CoreFields, 28)); +}; + + +/** + * @param {?proto.models.proto.cofd.CoreFields|undefined} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this +*/ +proto.models.proto.cofd.CofdSheet.prototype.setCore = function(value) { + return jspb.Message.setOneofWrapperField(this, 28, proto.models.proto.cofd.CofdSheet.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.clearCore = function() { + return this.setCore(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.models.proto.cofd.CofdSheet.prototype.hasCore = function() { + return jspb.Message.getField(this, 28) != null; +}; + + +/** + * optional MageFields mage = 29; + * @return {?proto.models.proto.cofd.MageFields} + */ +proto.models.proto.cofd.CofdSheet.prototype.getMage = function() { + return /** @type{?proto.models.proto.cofd.MageFields} */ ( + jspb.Message.getWrapperField(this, proto.models.proto.cofd.MageFields, 29)); +}; + + +/** + * @param {?proto.models.proto.cofd.MageFields|undefined} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this +*/ +proto.models.proto.cofd.CofdSheet.prototype.setMage = function(value) { + return jspb.Message.setOneofWrapperField(this, 29, proto.models.proto.cofd.CofdSheet.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.clearMage = function() { + return this.setMage(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.models.proto.cofd.CofdSheet.prototype.hasMage = function() { + return jspb.Message.getField(this, 29) != null; +}; + + +/** + * optional ChangelingFields changeling = 30; + * @return {?proto.models.proto.cofd.ChangelingFields} + */ +proto.models.proto.cofd.CofdSheet.prototype.getChangeling = function() { + return /** @type{?proto.models.proto.cofd.ChangelingFields} */ ( + jspb.Message.getWrapperField(this, proto.models.proto.cofd.ChangelingFields, 30)); +}; + + +/** + * @param {?proto.models.proto.cofd.ChangelingFields|undefined} value + * @return {!proto.models.proto.cofd.CofdSheet} returns this +*/ +proto.models.proto.cofd.CofdSheet.prototype.setChangeling = function(value) { + return jspb.Message.setOneofWrapperField(this, 30, proto.models.proto.cofd.CofdSheet.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.models.proto.cofd.CofdSheet} returns this + */ +proto.models.proto.cofd.CofdSheet.prototype.clearChangeling = function() { + return this.setChangeling(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.models.proto.cofd.CofdSheet.prototype.hasChangeling = function() { + return jspb.Message.getField(this, 30) != null; +}; + + +goog.object.extend(exports, proto.models.proto.cofd); + + +/***/ }) + +}]); +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9fcHJvdG8vY29mZF9hcGlfcGIuanMiLCJ3ZWJwYWNrOi8vLy4vX3Byb3RvL2NvZmRfcGIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGNBQWMsbUJBQW1CO0FBQ2pDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSxXQU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0gZnVuY3Rpb24odmFsdWUpIHtcbiAgcmV0dXJuIGpzcGIuTWVzc2FnZS5zZXRPbmVvZldyYXBwZXJGaWVsZCh0aGlzLCAzMCwgcHJvdG8ubW9kZWxzLnByb3RvLmNvZmQuQ29mZFNoZWV0Lm9uZW9mR3JvdXBzX1swXSwgdmFsdWUpO1xufTtcblxuXG4vKipcbiAqIENsZWFycyB0aGUgbWVzc2FnZSBmaWVsZCBtYWtpbmcgaXQgdW5kZWZpbmVkLlxuICogQHJldHVybiB7IXByb3RvLm1vZGVscy5wcm90by5jb2ZkLkNvZmRTaGVldH0gcmV0dXJucyB0aGlzXG4gKi9cbnByb3RvLm1vZGVscy5wcm90by5jb2ZkLkNvZmRTaGVldC5wcm90b3R5cGUuY2xlYXJDaGFuZ2VsaW5nID0gZnVuY3Rpb24oKSB7XG4gIHJldHVybiB0aGlzLnNldENoYW5nZWxpbmcodW5kZWZpbmVkKTtcbn07XG5cblxuLyoqXG4gKiBSZXR1cm5zIHdoZXRoZXIgdGhpcyBmaWVsZCBpcyBzZXQuXG4gKiBAcmV0dXJuIHtib29sZWFufVxuICovXG5wcm90by5tb2RlbHMucHJvdG8uY29mZC5Db2ZkU2hlZXQucHJvdG90eXBlLmhhc0NoYW5nZWxpbmcgPSBmdW5jdGlvbigpIHtcbiAgcmV0dXJuIGpzcGIuTWVzc2FnZS5nZXRGaWVsZCh0aGlzLCAzMCkgIT0gbnVsbDtcbn07XG5cblxuZ29vZy5vYmplY3QuZXh0ZW5kKGV4cG9ydHMsIHByb3RvLm1vZGVscy5wcm90by5jb2ZkKTtcbiJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/static/scripts/build/blah.bundle.js b/static/scripts/build/blah.bundle.js new file mode 100644 index 0000000..0504145 --- /dev/null +++ b/static/scripts/build/blah.bundle.js @@ -0,0 +1,23 @@ +(self["webpackChunk"] = self["webpackChunk"] || []).push([["blah"],{ + +/***/ "./src/blah.ts": +/*!*********************!*\ + !*** ./src/blah.ts ***! + \*********************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var cofd_api_pb_1 = __webpack_require__(/*! ../_proto/cofd_api_pb */ "./_proto/cofd_api_pb.js"); +var x = new cofd_api_pb_1.UpdateSkillValueRequest(); +x.setCharacterId(1); +x.setCharacterUsername("guy"); +console.log("hello", x); + + +/***/ }) + +}, +0,[["./src/blah.ts","runtime","vendors-node_modules_google-protobuf_google-protobuf_js","_proto_cofd_api_pb_js"]]]); +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvYmxhaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUVBLGdHQUFnRTtBQUVoRSxJQUFJLENBQUMsR0FBRyxJQUFJLHFDQUF1QixFQUFFLENBQUM7QUFDdEMsQ0FBQyxDQUFDLGNBQWMsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUNwQixDQUFDLENBQUMsb0JBQW9CLENBQUMsS0FBSyxDQUFDLENBQUM7QUFDOUIsT0FBTyxDQUFDLEdBQUcsQ0FBQyxPQUFPLEVBQUUsQ0FBQyxDQUFDLENBQUMiLCJmaWxlIjoiYmxhaC5idW5kbGUuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBncnBjIH0gZnJvbSBcIkBpbXByb2JhYmxlLWVuZy9ncnBjLXdlYlwiO1xuaW1wb3J0IHsgQ29mZEFwaSB9IGZyb20gXCIuLi9fcHJvdG8vY29mZF9hcGlfcGJfc2VydmljZVwiO1xuaW1wb3J0IHsgVXBkYXRlU2tpbGxWYWx1ZVJlcXVlc3QgfSBmcm9tIFwiLi4vX3Byb3RvL2NvZmRfYXBpX3BiXCI7XG5cbmxldCB4ID0gbmV3IFVwZGF0ZVNraWxsVmFsdWVSZXF1ZXN0KCk7XG54LnNldENoYXJhY3RlcklkKDEpO1xueC5zZXRDaGFyYWN0ZXJVc2VybmFtZShcImd1eVwiKTtcbmNvbnNvbGUubG9nKFwiaGVsbG9cIiwgeCk7XG4iXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file diff --git a/static/scripts/build/index.bundle.js b/static/scripts/build/index.bundle.js new file mode 100644 index 0000000..ca8afeb --- /dev/null +++ b/static/scripts/build/index.bundle.js @@ -0,0 +1,21 @@ +(self["webpackChunk"] = self["webpackChunk"] || []).push([["index"],{ + +/***/ "./src/index.ts": +/*!**********************!*\ + !*** ./src/index.ts ***! + \**********************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var cofd_api_pb_1 = __webpack_require__(/*! ../_proto/cofd_api_pb */ "./_proto/cofd_api_pb.js"); +var x = new cofd_api_pb_1.UpdateSkillValueRequest(); +console.log("hello from index"); + + +/***/ }) + +}, +0,[["./src/index.ts","runtime","vendors-node_modules_google-protobuf_google-protobuf_js","_proto_cofd_api_pb_js"]]]); +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFFQSxnR0FBZ0U7QUFFaEUsSUFBSSxDQUFDLEdBQUcsSUFBSSxxQ0FBdUIsRUFBRSxDQUFDO0FBS3RDLE9BQU8sQ0FBQyxHQUFHLENBQUMsa0JBQWtCLENBQUMsQ0FBQyIsImZpbGUiOiJpbmRleC5idW5kbGUuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBncnBjIH0gZnJvbSBcIkBpbXByb2JhYmxlLWVuZy9ncnBjLXdlYlwiO1xuLy8gaW1wb3J0IHsgQ29mZEFwaSB9IGZyb20gXCIuLi9fcHJvdG8vY29mZF9hcGlfcGJfc2VydmljZVwiO1xuaW1wb3J0IHsgVXBkYXRlU2tpbGxWYWx1ZVJlcXVlc3QgfSBmcm9tIFwiLi4vX3Byb3RvL2NvZmRfYXBpX3BiXCI7XG5cbmxldCB4ID0gbmV3IFVwZGF0ZVNraWxsVmFsdWVSZXF1ZXN0KCk7XG4vLyB4LnNldENoYXJhY3RlcklkKDEpO1xuLy8geC5zZXRDaGFyYWN0ZXJVc2VybmFtZShcImd1eVwiKTtcbi8vIGNvbnNvbGUubG9nKFwiaGVsbG9cIiwgeCk7XG5cbmNvbnNvbGUubG9nKFwiaGVsbG8gZnJvbSBpbmRleFwiKTtcbiJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/static/scripts/build/runtime.bundle.js b/static/scripts/build/runtime.bundle.js new file mode 100644 index 0000000..49975eb --- /dev/null +++ b/static/scripts/build/runtime.bundle.js @@ -0,0 +1,146 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({}); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ if(__webpack_module_cache__[moduleId]) { +/******/ return __webpack_module_cache__[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/******/ // the startup function +/******/ // It's empty as some runtime module handles the default behavior +/******/ __webpack_require__.x = x => {} +/************************************************************************/ +/******/ /* webpack/runtime/global */ +/******/ (() => { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop) +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // Promise = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ "runtime": 0 +/******/ }; +/******/ +/******/ var deferredModules = [ +/******/ +/******/ ]; +/******/ // no chunk on demand loading +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ var checkDeferredModules = x => {}; +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var [chunkIds, moreModules, runtime, executeModules] = data; +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0, resolves = []; +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ resolves.push(installedChunks[chunkId][0]); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) runtime(__webpack_require__); +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ while(resolves.length) { +/******/ resolves.shift()(); +/******/ } +/******/ +/******/ // add entry modules from loaded chunk to deferred list +/******/ if(executeModules) deferredModules.push.apply(deferredModules, executeModules); +/******/ +/******/ // run deferred modules when all chunks ready +/******/ return checkDeferredModules(); +/******/ } +/******/ +/******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ +/******/ function checkDeferredModulesImpl() { +/******/ var result; +/******/ for(var i = 0; i < deferredModules.length; i++) { +/******/ var deferredModule = deferredModules[i]; +/******/ var fulfilled = true; +/******/ for(var j = 1; j < deferredModule.length; j++) { +/******/ var depId = deferredModule[j]; +/******/ if(installedChunks[depId] !== 0) fulfilled = false; +/******/ } +/******/ if(fulfilled) { +/******/ deferredModules.splice(i--, 1); +/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]); +/******/ } +/******/ } +/******/ if(deferredModules.length === 0) { +/******/ __webpack_require__.x(); +/******/ __webpack_require__.x = x => {}; +/******/ } +/******/ return result; +/******/ } +/******/ var startup = __webpack_require__.x; +/******/ __webpack_require__.x = () => { +/******/ // reset startup function so it can be called again when more startup code is added +/******/ __webpack_require__.x = startup || (x => {}); +/******/ return (checkDeferredModules = checkDeferredModulesImpl)(); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +/******/ // run startup +/******/ return __webpack_require__.x(); +/******/ })() +; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svcnVudGltZS9nbG9iYWwiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svcnVudGltZS9oYXNPd25Qcm9wZXJ0eSBzaG9ydGhhbmQiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svcnVudGltZS9qc29ucCBjaHVuayBsb2FkaW5nIiwid2VicGFjazovLy93ZWJwYWNrL3N0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WRNb2R1bGUubGVuZ3RoOyBqKyspIHtcblx0XHRcdHZhciBkZXBJZCA9IGRlZmVycmVkTW9kdWxlW2pdO1xuXHRcdFx0aWYoaW5zdGFsbGVkQ2h1bmtzW2RlcElkXSAhPT0gMCkgZnVsZmlsbGVkID0gZmFsc2U7XG5cdFx0fVxuXHRcdGlmKGZ1bGZpbGxlZCkge1xuXHRcdFx0ZGVmZXJyZWRNb2R1bGVzLnNwbGljZShpLS0sIDEpO1xuXHRcdFx0cmVzdWx0ID0gX193ZWJwYWNrX3JlcXVpcmVfXyhfX3dlYnBhY2tfcmVxdWlyZV9fLnMgPSBkZWZlcnJlZE1vZHVsZVswXSk7XG5cdFx0fVxuXHR9XG5cdGlmKGRlZmVycmVkTW9kdWxlcy5sZW5ndGggPT09IDApIHtcblx0XHRfX3dlYnBhY2tfcmVxdWlyZV9fLngoKTtcblx0XHRfX3dlYnBhY2tfcmVxdWlyZV9fLnggPSB4ID0+IHt9O1xuXHR9XG5cdHJldHVybiByZXN1bHQ7XG59XG52YXIgc3RhcnR1cCA9IF9fd2VicGFja19yZXF1aXJlX18ueDtcbl9fd2VicGFja19yZXF1aXJlX18ueCA9ICgpID0+IHtcblx0Ly8gcmVzZXQgc3RhcnR1cCBmdW5jdGlvbiBzbyBpdCBjYW4gYmUgY2FsbGVkIGFnYWluIHdoZW4gbW9yZSBzdGFydHVwIGNvZGUgaXMgYWRkZWRcblx0X193ZWJwYWNrX3JlcXVpcmVfXy54ID0gc3RhcnR1cCB8fCAoeCA9PiB7fSk7XG5cdHJldHVybiAoY2hlY2tEZWZlcnJlZE1vZHVsZXMgPSBjaGVja0RlZmVycmVkTW9kdWxlc0ltcGwpKCk7XG59OyIsIi8vIHJ1biBzdGFydHVwXG5yZXR1cm4gX193ZWJwYWNrX3JlcXVpcmVfXy54KCk7XG4iXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file diff --git a/static/scripts/build/vendors-node_modules_google-protobuf_google-protobuf_js.bundle.js b/static/scripts/build/vendors-node_modules_google-protobuf_google-protobuf_js.bundle.js new file mode 100644 index 0000000..0330d73 --- /dev/null +++ b/static/scripts/build/vendors-node_modules_google-protobuf_google-protobuf_js.bundle.js @@ -0,0 +1,537 @@ +(self["webpackChunk"] = self["webpackChunk"] || []).push([["vendors-node_modules_google-protobuf_google-protobuf_js"],{ + +/***/ "../../node_modules/google-protobuf/google-protobuf.js": +/*!*************************************************************!*\ + !*** ../../node_modules/google-protobuf/google-protobuf.js ***! + \*************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e=e}},"es6","es3");$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3"); +$jscomp.polyfill("String.prototype.startsWith",function(a){return a?a:function(a,c){var b=$jscomp.checkStringArgs(this,a,"startsWith");a+="";var e=b.length,f=a.length;c=Math.max(0,Math.min(c|0,b.length));for(var g=0;g=f}},"es6","es3"); +$jscomp.polyfill("String.prototype.repeat",function(a){return a?a:function(a){var b=$jscomp.checkStringArgs(this,null,"repeat");if(0>a||1342177279>>=1)b+=b;return d}},"es6","es3");var COMPILED=!0,goog=goog||{};goog.global=this||self;goog.isDef=function(a){return void 0!==a};goog.isString=function(a){return"string"==typeof a};goog.isBoolean=function(a){return"boolean"==typeof a}; +goog.isNumber=function(a){return"number"==typeof a};goog.exportPath_=function(a,b,c){a=a.split(".");c=c||goog.global;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&goog.isDef(b)?c[d]=b:c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}}; +goog.define=function(a,b){if(!COMPILED){var c=goog.global.CLOSURE_UNCOMPILED_DEFINES,d=goog.global.CLOSURE_DEFINES;c&&void 0===c.nodeType&&Object.prototype.hasOwnProperty.call(c,a)?b=c[a]:d&&void 0===d.nodeType&&Object.prototype.hasOwnProperty.call(d,a)&&(b=d[a])}return b};goog.FEATURESET_YEAR=2012;goog.DEBUG=!0;goog.LOCALE="en";goog.TRUSTED_SITE=!0;goog.STRICT_MODE_COMPATIBLE=!1;goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG;goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1; +goog.provide=function(a){if(goog.isInModuleLoader_())throw Error("goog.provide cannot be used within a module.");if(!COMPILED&&goog.isProvided_(a))throw Error('Namespace "'+a+'" already declared.');goog.constructNamespace_(a)};goog.constructNamespace_=function(a,b){if(!COMPILED){delete goog.implicitNamespaces_[a];for(var c=a;(c=c.substring(0,c.lastIndexOf(".")))&&!goog.getObjectByName(c);)goog.implicitNamespaces_[c]=!0}goog.exportPath_(a,b)}; +goog.getScriptNonce=function(a){if(a&&a!=goog.global)return goog.getScriptNonce_(a.document);null===goog.cspNonce_&&(goog.cspNonce_=goog.getScriptNonce_(goog.global.document));return goog.cspNonce_};goog.NONCE_PATTERN_=/^[\w+/_-]+[=]{0,2}$/;goog.cspNonce_=null;goog.getScriptNonce_=function(a){return(a=a.querySelector&&a.querySelector("script[nonce]"))&&(a=a.nonce||a.getAttribute("nonce"))&&goog.NONCE_PATTERN_.test(a)?a:""};goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/; +goog.module=function(a){if(!goog.isString(a)||!a||-1==a.search(goog.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!goog.isInGoogModuleLoader_())throw Error("Module "+a+" has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide."); +if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");goog.moduleLoaderState_.moduleName=a;if(!COMPILED){if(goog.isProvided_(a))throw Error('Namespace "'+a+'" already declared.');delete goog.implicitNamespaces_[a]}};goog.module.get=function(a){return goog.module.getInternal_(a)}; +goog.module.getInternal_=function(a){if(!COMPILED){if(a in goog.loadedModules_)return goog.loadedModules_[a].exports;if(!goog.implicitNamespaces_[a])return a=goog.getObjectByName(a),null!=a?a:null}return null};goog.ModuleType={ES6:"es6",GOOG:"goog"};goog.moduleLoaderState_=null;goog.isInModuleLoader_=function(){return goog.isInGoogModuleLoader_()||goog.isInEs6ModuleLoader_()};goog.isInGoogModuleLoader_=function(){return!!goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.GOOG}; +goog.isInEs6ModuleLoader_=function(){if(goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.ES6)return!0;var a=goog.global.$jscomp;return a?"function"!=typeof a.getCurrentModulePath?!1:!!a.getCurrentModulePath():!1}; +goog.module.declareLegacyNamespace=function(){if(!COMPILED&&!goog.isInGoogModuleLoader_())throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module");if(!COMPILED&&!goog.moduleLoaderState_.moduleName)throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace.");goog.moduleLoaderState_.declareLegacyNamespace=!0}; +goog.declareModuleId=function(a){if(!COMPILED){if(!goog.isInEs6ModuleLoader_())throw Error("goog.declareModuleId may only be called from within an ES6 module");if(goog.moduleLoaderState_&&goog.moduleLoaderState_.moduleName)throw Error("goog.declareModuleId may only be called once per module.");if(a in goog.loadedModules_)throw Error('Module with namespace "'+a+'" already exists.');}if(goog.moduleLoaderState_)goog.moduleLoaderState_.moduleName=a;else{var b=goog.global.$jscomp;if(!b||"function"!=typeof b.getCurrentModulePath)throw Error('Module with namespace "'+ +a+'" has been loaded incorrectly.');b=b.require(b.getCurrentModulePath());goog.loadedModules_[a]={exports:b,type:goog.ModuleType.ES6,moduleId:a}}};goog.setTestOnly=function(a){if(goog.DISALLOW_TEST_ONLY_CODE)throw a=a||"",Error("Importing test-only code into non-debug environment"+(a?": "+a:"."));};goog.forwardDeclare=function(a){}; +COMPILED||(goog.isProvided_=function(a){return a in goog.loadedModules_||!goog.implicitNamespaces_[a]&&goog.isDefAndNotNull(goog.getObjectByName(a))},goog.implicitNamespaces_={"goog.module":!0});goog.getObjectByName=function(a,b){a=a.split(".");b=b||goog.global;for(var c=0;c>>0);goog.uidCounter_=0;goog.getHashCode=goog.getUid; +goog.removeHashCode=goog.removeUid;goog.cloneObject=function(a){var b=goog.typeOf(a);if("object"==b||"array"==b){if("function"===typeof a.clone)return a.clone();b="array"==b?[]:{};for(var c in a)b[c]=goog.cloneObject(a[c]);return b}return a};goog.bindNative_=function(a,b,c){return a.call.apply(a.bind,arguments)}; +goog.bindJs_=function(a,b,c){if(!a)throw Error();if(2{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')}); +a("es7",function(){return b("2 ** 2 == 4")});a("es8",function(){return b("async () => 1, true")});a("es9",function(){return b("({...rest} = {}), true")});a("es_next",function(){return!1});return{target:c,map:d}},goog.Transpiler.prototype.needsTranspile=function(a,b){if("always"==goog.TRANSPILE)return!0;if("never"==goog.TRANSPILE)return!1;if(!this.requiresTranspilation_){var c=this.createRequiresTranspilation_();this.requiresTranspilation_=c.map;this.transpilationTarget_=this.transpilationTarget_|| +c.target}if(a in this.requiresTranspilation_)return this.requiresTranspilation_[a]?!0:!goog.inHtmlDocument_()||"es6"!=b||"noModule"in goog.global.document.createElement("script")?!1:!0;throw Error("Unknown language mode: "+a);},goog.Transpiler.prototype.transpile=function(a,b){return goog.transpile_(a,b,this.transpilationTarget_)},goog.transpiler_=new goog.Transpiler,goog.protectScriptTag_=function(a){return a.replace(/<\/(SCRIPT)/ig,"\\x3c/$1")},goog.DebugLoader_=function(){this.dependencies_={}; +this.idToPath_={};this.written_={};this.loadingDeps_=[];this.depsToLoad_=[];this.paused_=!1;this.factory_=new goog.DependencyFactory(goog.transpiler_);this.deferredCallbacks_={};this.deferredQueue_=[]},goog.DebugLoader_.prototype.bootstrap=function(a,b){function c(){d&&(goog.global.setTimeout(d,0),d=null)}var d=b;if(a.length){b=[];for(var e=0;e\x3c/script>";b.write(goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createHTML(d):d)}else{var e=b.createElement("script");e.defer=goog.Dependency.defer_;e.async=!1;e.type="text/javascript";(d=goog.getScriptNonce())&&e.setAttribute("nonce",d);goog.DebugLoader_.IS_OLD_IE_? +(a.pause(),e.onreadystatechange=function(){if("loaded"==e.readyState||"complete"==e.readyState)a.loaded(),a.resume()}):e.onload=function(){e.onload=null;a.loaded()};e.src=goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createScriptURL(this.path):this.path;b.head.appendChild(e)}}else goog.logToConsole_("Cannot use default debug loader outside of HTML documents."),"deps.js"==this.relativePath?(goog.logToConsole_("Consider setting CLOSURE_IMPORT_SCRIPT before loading base.js, or setting CLOSURE_NO_DEPS to true."), +a.loaded()):a.pause()},goog.Es6ModuleDependency=function(a,b,c,d,e){goog.Dependency.call(this,a,b,c,d,e)},goog.inherits(goog.Es6ModuleDependency,goog.Dependency),goog.Es6ModuleDependency.prototype.load=function(a){function b(a,b){a=b?'